What is php.ini ?

The php.ini file is a special file for suPHP (pronounced sue-p-h-p).

The php.ini file is where you declare changes to your PHP settings. You can edit the existing php.ini, or create a new text file in any subdirectory and name it php.ini.

If you need a php.ini file for your account, please contact us via phone or live chat. We are glad to create a replete file for you.

Some common changes that you must make when moving from non-secure php environment to suPHP:

For example, if your site had these settings in a .htaccess file:

php_flag upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 30

SuExec users must put them in a php.ini file instead. Here is the proper syntax:

upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 30

Article Comments

Please add a link to doc which explains where you can find the php.ini file

It does not already exist. You must create your own from scratch.

Alternatively, you can contact HostGator and we will create this file for you.

If I create a site specific php.ini, that works fine but then I find that extensions that are loaded in the server php.ini (eg IonCube Decoder and APC) no longer get loaded for the site. You can copy the full file from /usr/local/lib/php.ini to your site but that doesn't seem to be a very good approach, as it will miss future server level adjustments.

That is a great reason to get a copy of the php.ini from HostGator and adjust only the settings needed.

Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment