PHP settings
PHP has many settings that an ISPmanager administrator or user can set up and modify.PHP parameters may vary depending on a PHP mode. PHP modes "CGI", "FastCGI (Apache)" and "FastCGI (Nginx + PHP-FPM)" utilize user settings. The "Apache module" uses the settings specified by the administrator. If a user has not changed the parameter, the user value will be changed into the one specified by the administrator.
Variable values are displayed in different colors:
- Red — the values for these parameters are not defined in the PHP configuration file and have been received from the PHP interpreter.
- Green — the values for these parameters are defined in the global PHP configuration file for an administrator and in the user configuration file for a user.
- Blue — the values for these parameters are not defined.
- Yellow — read-only values (for users).
Editing variables
Perform the following steps to edit a variable:
- Log in as an administrator and go to Web-server settings→ PHP → Settings. Log in as a user and go to WWW → PHP → Settings. Note.The administrator can define what values will be displayed to users by default. To do so, go to Web server settings → PHP → Settings→ select the variable and click on Display.
- Select the variable and click on Edit.
- Enter a new Value for the variable.
The global configuration file is kept in:
- CentOS: /etc/php.ini for a PHP native and in /opt/
/etc/php.ini for alternative versions. - Debian: every PHP mode has an individual file. /etc/php5/apache2/php.ini, /etc/php5/cgi/php.ini and /etc/php5/fpm/php.ini.
User configuration files are kept in /var/www/
To modify the user configuration files manually edit the php.ini file and duplicate the changes in the /var/www/
New configuration file template
The /usr/local/mgr5/etc/templates/php.ini file is used as a template for user configuration files. When creating a new user the PHP settings are modified according to the template. The template contains the following strings by default:
User configuration file template
session.save_path = "$HOMEDIR/bin-tmp/"
upload_tmp_dir = "$HOMEDIR/bin-tmp/"
sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@example.com
/usr/local/mgr5/sbin/mgrctl -m ispmgrnode exit
Settings for the PHP modes "CGI" and "FastCGI (Apache)"
When an ISPmanager user saves the modified PHP settings:
- The modified values are specified in the configuration file of modified parameters.
- The content of the user configuration file is fully changed into the content of the global file.
- Values from the configuration file of the modified parameters change the corresponding values in the user configuration file.
When an ISPmanager administrator saves the modified PHP settings:
- The values are specified in the global configuration file.
- For every ISPmanager user:
- The content of the user configuration file is fully changed into the content of the global file.
- Values from the configuration file of the modified parameters change the corresponding values in the user configuration file.
Settings for the PHP mode "FastCGI (Nginx + PHP-FPM)"
When an ISPmanager user saves the modified PHP settings the modified values are specified into the PHP-FPM configuration file of the user of the corresponding PHP version.
When an ISPmanager administrator saves the modified PHP settings the modified values are specified into the PHP-FPM global configuration file of the corresponding PHP version.
Settings for the PHP mode "Apache module"
A user cannot change the PHP settings in this mode.
When an ISPmanager user saves the changed PHP settings the modified values are specified into the Apache mode configuration file of the user of the corresponding PHP version.
Inital PHP configuration
The main PHP parameters are grouped to facilitate the initial configuration:
- Go to Web-server settings → PHP → Settings → Basic.
- Select the Time zone that will be used by default by all the date and time functions. It is specified in the "date.timezone" variable.
- Enter the Execution time of the PHP-script in seconds. The script will not start if it cannot be executed during the specified period. It is specified in the "max_execution_time" variable.
- Max. post size - enter the maximum size of post data allowed in MiB. It is specified in the "post_max_size" variable.
- Max. files size - provide the maximum size of an uploaded file in MiB. It is specified in the "upload_max_filesize" variable.
- Memory limit - provide the maximum amount of memory in bytes that a script is allowed to allocate. It is specified in the "memory_limit" variable.
- display_errors - select the checkbox to enable PHP to send information about errors to the browser. For security reasons, we recommend that you disable this option after debugging.
- log_errors - select the checkbox to store PHP error messages in the log files. Set the list of errors that will be added into the log. To do so, enable the option Report all errors and in the Ignore errors select the errors that won't be logged.
Disable the option Report all errors and in the Display errors field select the error that will be added into the log.
Restoring the variable value
To restore a variable value as an administrator, perform the following steps:
- Go to Web-server settings → PHP → Restore.
- The modified value is deleted from the PHP global configuration file.
- For every ISPmanager user:
- The content of the user configuration file is fully changed into the content of the global file.
- Values from the configuration file of the modified parameters change the corresponding values in the user configuration file.
To restore a variable value as a user, perform the following steps:
- Go to WWW → PHP → Restore.
- The modified value is deleted from the PHP user configuration file.