Jump to content
Admin

Preserving initdata.php Options

Recommended Posts

There are many low-level configuration options you can alter in /initdata.php, allowing you to change certain aspects of how your board operates. One common change that clients make is to alter the 'CP_DIRECTORY' constant to point to a new admin directory (for extra security), or to change the constant 'IPS_DEFAULT_PUBLIC_APP' to allow IP.Content to serve the default home page. The problem with editing these constants in initdata.php is that you will overwrite this file during upgrades, requiring you to perform these edits following each IP.Board update.

As of IP.Board 3.3.x this is no longer an issue. IP.Board 3.3.0 and above support an additional constants file that you can create in your forum root directory: constants.php. If it exists, it will be loaded automatically, and the constants defined in this file will have precedence. For instance, you can add the following to your new constants.php file, and the options will be preserved during future upgrades:

 

Share this post


Link to post
Share on other sites

IP Matching

<?phpdefine( 'IPB_ACP_IP_MATCH', 0 );?>

Define admincp directory name

<?phpdefine( 'CP_DIRECTORY', 'my_other_admin' );

Turn off ACP IP check

<?phpdefine( 'IPB_ACP_IP_MATCH', 0 );

Define default app

<?phpdefine( 'IPS_DEFAULT_PUBLIC_APP', 'ccs' );

Share this post


Link to post
Share on other sites
'CP_DIRECTORY'	=> 'admin'
'IN_DEV'	=> FALSE
'DEV_USE_WHOOPS'=> TRUE
'DEV_USE_FURL_CACHE'	=> FALSE
'DEBUG_JS'	=> FALSE
'DEV_DEBUG_JS'	=> TRUE
'DEV_DEBUG_CSS'	=> FALSE
'DEV_DEBUG_TEMPLATES'	=> FALSE
'IPS_FOLDER_PERMISSION'=> 0777
'FOLDER_PERMISSION_NO_WRITE'	=> 0755
'IPS_FILE_PERMISSION'	=> 0644
'ROOT_PATH'	=> __DIR__
'NO_WRITES'	=> FALSE
'LOG_METHOD'	=> '{}'
'STORE_METHOD'	=> 'FileSystem'
'STORE_CONFIG'	=> '{"path":"{root}/datastore"}'
'CACHE_METHOD'	=> 'None','CACHE_CONFIG'	=> '{}'
'CACHE_PAGE_TIMEOUT'	=> 180
'EMAIL_DEBUG_PATH'	=> NULL
'BULK_MAILS_PER_CYCLE'	=> 0
'JAVA_PATH'	=> ""
'ERROR_PAGE'	=> 'error.html'
'QUERY_LOG'	=> FALSE
'ENFORCE_ACCESS'	=> FALSE
'THUMBNAIL_SIZE'	=> '500x500'
'COOKIE_DOMAIN'	=> NULL
'COOKIE_PREFIX'	=> NULL
'CONNECT_NOSYNC_NAMES'	=> FALSE
'BYPASS_CURL'	=> FALSE
'NEXUS_TEST_GATEWAYS'	=> FALSE
'UPGRADE_MANUAL_THRESHOLD'	=> 150000
'UPGRADE_LARGE_THRESHOLD'	=> 100000
'SKIP_SERVER_PORT'	=> FALSE
'HTMLENTITIES'	=> ( version_compare( phpversion(),'5.4.0', '<' ) ) ? ENT_IGNORE : ENT_DISALLOWED,
'SUITE_UNIQUE_KEY'	=> md5( ( ( isset( $_SERVER['SERVER_NAME'] ) ) ? $_SERVER['SERVER_NAME'] : '' ) . '$Rev: 3023$'),'USE_DEVELOPMENT_BUILDS'	=> FALSE,'DEV_WHOOPS_EDITOR'	=> NULL,

for 4.0

'CP_DIRECTORY'	=> 'admin'
'IN_DEV'	=> FALSE
'DEV_USE_WHOOPS'=> TRUE
'DEV_USE_FURL_CACHE'	=> FALSE
'DEBUG_JS'	=> FALSE
'DEV_DEBUG_JS'	=> TRUE
'DEV_DEBUG_CSS'	=> FALSE
'DEV_DEBUG_TEMPLATES'	=> FALSE
'IPS_FOLDER_PERMISSION'=> 0777
'FOLDER_PERMISSION_NO_WRITE'	=> 0755
'IPS_FILE_PERMISSION'	=> 0644
'ROOT_PATH'	=> __DIR__
'NO_WRITES'	=> FALSE
'LOG_METHOD'	=> '{}'
'STORE_METHOD'	=> 'FileSystem'
'STORE_CONFIG'	=> '{"path":"{root}/datastore"}'
'CACHE_METHOD'	=> 'None','CACHE_CONFIG'	=> '{}'
'CACHE_PAGE_TIMEOUT'	=> 180
'EMAIL_DEBUG_PATH'	=> NULL
'BULK_MAILS_PER_CYCLE'	=> 0
'JAVA_PATH'	=> ""
'ERROR_PAGE'	=> 'error.html'
'QUERY_LOG'	=> FALSE
'ENFORCE_ACCESS'	=> FALSE
'THUMBNAIL_SIZE'	=> '500x500'
'COOKIE_DOMAIN'	=> NULL
'COOKIE_PREFIX'	=> NULL
'CONNECT_NOSYNC_NAMES'	=> FALSE
'BYPASS_CURL'	=> FALSE
'NEXUS_TEST_GATEWAYS'	=> FALSE
'UPGRADE_MANUAL_THRESHOLD'	=> 150000
'UPGRADE_LARGE_THRESHOLD'	=> 100000
'SKIP_SERVER_PORT'	=> FALSE
'HTMLENTITIES'	=> ( version_compare( phpversion(),'5.4.0', '<' ) ) ? ENT_IGNORE : ENT_DISALLOWED,
'SUITE_UNIQUE_KEY'	=> md5( ( ( isset( $_SERVER['SERVER_NAME'] ) ) ? $_SERVER['SERVER_NAME'] : '' ) . '$Rev: 3023$'),'USE_DEVELOPMENT_BUILDS'	=> FALSE,'DEV_WHOOPS_EDITOR'	=> NULL,

Share this post


Link to post
Share on other sites

Set folder and file permissions.

 

 

You can set custom default permissions for IPS4 by creating a constants.php file in the root of your site (if one does not exist) and adding.

<?phpdefine( 'IPS_FOLDER_PERMISSION', 0777);define( 'FOLDER_PERMISSION_NO_WRITE', 0755);define( 'IPS_FILE_PERMISSION', 0666);define( 'FILE_PERMISSION_NO_WRITE', 0644);

Share this post


Link to post
Share on other sites

BYPASS_ACP_IP_CHECK, true

 

<?phpdefine(

'BYPASS_ACP_IP_CHECK', true

 

'IPS_FOLDER_PERMISSION', 0777);

define( 'FOLDER_PERMISSION_NO_WRITE', 0755);

define( 'IPS_FILE_PERMISSION', 0666);

define( 'FILE_PERMISSION_NO_WRITE', 0644);

 

 

 

<?phpdefine( 'IPS_FOLDER_PERMISSION', 0777);define( 'FOLDER_PERMISSION_NO_WRITE', 0755);define( 'IPS_FILE_PERMISSION', 0666);define( 'FILE_PERMISSION_NO_WRITE', 0644);
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×