In this section you can change the most important PHP configuration settings for your account.
Please note: We assume no responsibility for PHP scripts that do not function correctly as a result of incorrect settings. You are responsible for understanding the purpose of each of these configuration variables and how they affect your scripts.
Some of the settings affect the security of your account.
You can set up the standard PHP version. All files ending in «.php» are automatically parsed with this PHP version. In addition, the following attributions are standard:
- File ending .php80 -> PHP 8.0
- File ending .php74 -> PHP 7.4
- File ending .php73 -> PHP 7.3
- File ending .php72 -> PHP 7.2
It is also possible to set up the PHP version in the directory. Set up a file in the desired directory called «.htaccess» with the following content:
FcgidWrapper "/home/httpd/cgi-bin/php72-fcgi-starter.fcgi" .php
FcgidWrapper "/home/httpd/cgi-bin/php73-fcgi-starter.fcgi" .php
FcgidWrapper "/home/httpd/cgi-bin/php74-fcgi-starter.fcgi" .php
FcgidWrapper "/home/httpd/cgi-bin/php80-fcgi-starter.fcgi" .php
If you want to parse .html files or any other file extension by PHP, you need to add the following to your .htaccess file.
FcgidWrapper "/home/httpd/cgi-bin/php71-fcgi-starter.fcgi" .html FcgidWrapper "/home/httpd/cgi-bin/php71-fcgi-starter.fcgi" .htm <FilesMatch "\.(html|htm)$"> SetHandler fcgid-script </FilesMatch>
(Example for PHP 7.2 and .htm/.html files)
You can use the following PHP command line interpreter (CLI):
Note: The command line call
/usr/bin/php now uses the PHP version set in the konsoleH under "Settings" > "PHP configuration".
- PHP-CLI (the set php version): /usr/bin/php
- PHP 7.2-CLI:
- PHP 7.3-CLI:
- PHP 7.4-CLI:
- PHP 8.0-CLI:
You can also change the PHP version of the current SSH session as follows:
Not all the configuration settings offered are available for all versions of PHP. There is a help text for each setting that explains which version of PHP each setting corresponds to. You will also see a hint if a setting is not available for your chosen default version of PHP. However, the setting might be used if you have set up a PHP version in a directory via .htaccess.
If you activate this option, PHP errors will be visible in the browser.
If you activate this option, you can incorporate content from foreign sites.
Warning: If you make programming mistakes with this function, you may accidentally make it possible to introduce malicious code into your account.
If you activate this option, you can incorportate content from foreign sites per include. (allow_url_fopen also needs to be active!)
Warning: If you make programming mistakes with this function, you may accidentally make it possible to introduce malicious code into your account.!
If this option is activated, information between inverted commas is masked. This reduces the likelihood of successful attack on badly programmed PHP scripts. Only deactivate this option if you insert scripts which do not function with active magic_quotes_gpc. Warning: With bad programming this function can lead to malicious code being introduced into your account!
If you activate this option, the PHP version you use is disclosed in HTTP page headers.
This option is needed by some scripts to handle UTF8 data correctly. See https://www.php.net/mbstring.overload in the PHP manual for further details.
This is the maximum available storage for your PHP scripts. Only increase this value if necessary.
This is the maximum available time (in seconds) for running your PHP scripts. Only increase this value if necessary.
This is the maximum size for uploaded files. Only increase this value if necessary.
This is the maximum number of simultaneous uploads. Increase or decrease this only if you really need to.
This lets you embed PHP extensions «ImageMagick», «MongoDB», OPCache», «Zend Optimizer/Zen Guard», «IonCube Loader», «APCu» or «Source Guardian» if needed. The additional modules are required by some scripts or generally improve PHP performance. To see if this is the case, check the script documentation. Warning: Not all combinations of these extensions are compatible. If you encounter problems after activating one of these extensions, please deactivate the extension.
You can easily set a lot of PHP settings directly via .htaccess file:
php_value [Setting_1] [value] php_flag [Setting_2] [0 or 1]
- Use php_value for all settings requiring a value (number or string).
- Use php_flag for PHP settings which can only be turned on or off.
You can find a comprehensive overview of all configuration settings which you can set in the PHP manual: https://www.php.net/manual/en/ini.list.php
To log PHP errors, you need to first add an empty log file (e.g. over FTP). After that, add the following lines to your .htaccess file to activate the error log:
php_flag log_errors on php_value error_log /usr/home/«login»/php.log
(In this example, the file is php.log and is in the home folder of the account. You need to replace «login» with the FTP user name of the account.)