Back
Registry Instantiation
PHP Settings
Base Libraries
Forward


Next, we make sure that a few PHP settings are set correctly:

<?php

// Set the error reporting level in accordance with the config settings.
error_reporting($conf['debug_level']);

// Set the maximum execution time in accordance with the config settings.
set_time_limit($conf['max_exec_time']);

// set the umask according to config settings
if (isset($conf['umask'])) {
    
umask($conf['umask']);
}

?>

  • error_reporting() controls what level of PHP errors will be displayed to the user or logged to the php error_log file.
  • set_time_limit() controls how long scripts are allowed to execute; 0 means no limit.
  • If we create any files, we need to make sure that the umask is set correctly first.