How to Modify the Configuration File of a PHP Web Hosting

It is possible for you to modify the configuration file of your PHP web hosting to a limited extent. Some parameters can’t be changed. The list of these unmodifiable parameters is below.

How to Modify Your php.ini

Access your web hosting with SFTP and download the file /lamp0/etc/php/php-custom.ini. Locally edit the file, putting in the values you want to change. Values that remain unmodified will remain at the defaults.​ ​(See default phpinfo). When you are satisfied with your version of the file, upload it to your web hosting, replacing the original, lamp0/etc/php/php-custom.ini.

To make your changes effective, you need to reboot your web hosting.

Note

Alternatively you can modify the php-custom.ini file from within your web hosting’s Control Panel under the “Edit PHP Configuration” section.

Unmodifiable Parameters

Here is the list of unmodifiable parameters and their default values. Entries in your php-custom.ini for one of these settings will be ignored:

log_errors = On
ignore_repeated_errors = On
ignore_repeated_source = On

memory_limit = 128M
# memory_limit = 192M for a Medium size web hosting
# memory_limit = 256M for a Large size web hosting
# memory_limit = 512M for an XXL size web hosting

max_execution_time = 180

upload_tmp_dir = "/srv/data/tmp"
upload_max_filesize = 128M
post_max_size = 128M

include_path = ".:/usr/share/php:/srv/data/web/includes"

variables_order = GPCS

output_buffering = 8192

mail.log = "/srv/data/var/log/www/phpmail.log"

[apc]
apc.gc_ttl = 1200
apc.ttl = 0
apc.user_ttl = 0
apc.slam_defense = 0
apc.write_lock = 1
apc.file_update_protection = 0
apc.max_file_size = 10M

[opcache]
opcache.max_file_size = 10M
opcache.lockfile_path = "/srv/run/php"
opcache.max_accelerated_file = 50000
opcache.memory_consumption = 48M
# opcache.memory_consumption doubles in size with each upgrade (Small - 48M, Medium - 96M, Large - 192M, etc)

[session]
session.save_path = "/srv/data/var/php/www"

[mysql]
mysql.default_socket="/srv/run/mysqld/mysqld.sock"
mysql.default_user="root"
mysql.default_pw=""

[mysqli]
mysqli.default_socket="/srv/run/mysqld/mysqld.sock"
mysqli.default_user="root"
mysqli.default_pw=""

[pdo_mysql]
pdo_mysql.default_socket="/srv/run/mysqld/mysqld.sock"