Translations of this page:

Enabling PHP in Publish

There is a high risk that someone can inject malicious PHP script that can damage the system when they are editing the page. If you are certain that this won’t be the case you can proceed. Claromentis held no responsibility for data lost caused by such action.

Step 1 - Enabling Global PHP switch in config.php

Add these line below to enable PHP file into

/intranet/common/config.php

// Flag showing if we allow inserting PHP code in publish fields
// But even if it's allowed, it'll work only on external pages unless $cfg_execute_PHP_in_publish is set to true
$cfg_allow_PHP_in_publish = true;

// Flag showing if we allow executing PHP code in publish fields when showing
// page in Claromentis (not external)
$cfg_execute_PHP_in_publish = true;

Step 2 - Enabling PHP in FCK Config

Add this line below to

/intranet/publish/fckconfig_publish_custom.js

If you don’t have this file on your system you need to create one.

FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ;	// PHP style server side code

Also read

* What is Config File

 
customisation/general/enabling_php.txt · Last modified: 07/06/2011 04:49 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki