Why isn't my custom php.ini working?

There are a few common reasons why custom php.ini files won't work.

Check the file name
Often if you're saving it in Windows - for example with Notepad - the file may have been accidentally named "php.ini.txt". Please ensure this isn't the case.
Do you have more than one php.ini in your webspace?
php.ini files in child directories take precedence over any parent directories. Make sure you don't have an additional php.ini file which is taking precedence. Best practise is to include a single php.ini file in your public_html directory, this will affect all PHP scripts within your webspace, including all subdirectories.
Have you set any PHP directives within your site's code?
This is very common within certain CMS systems. If you set one memory limit within a php.ini file, and another within your site's code, the latter will take precedence.
Are your directives syntactically correct?
If commands are misspelt or malformed, they will not function correctly. Consult http://www.php.net to ensure that your commands are correct.

If you are still having difficulties, please contact support. Make sure you include any settings that you are attempting to modify, the expected results of the setting along with the actual results.

  • 67 Users Found This Useful
Was this answer helpful?

Related Articles

My CGI/ASP/PHP script is giving an error when trying to write to a file.

This applies to Linux hosting accounts only.This is almost certainly down to incorrect...

Why does my script produce a 'file permissions error'?

CGI scripts need certain file permissions to be set if they are to work properly. In general CGI...

Why does my PHP script fail with 'Fatal error: Allowed memory size of 8388608 bytes exhausted'?

PHP has a built-in limit on the amount of memory it will allocate. If that limit is reached, the...

My PHP script gives the error 'Call to undefined function: mysql_connect()'

This error is usually caused by unecessary or incorrect directives in a custom php.ini file.We...

Accesses to all files result in '500 Internal Server Error' messages

500 Internal Server Error messages on every page are typically an indication of a misconfigured...

Powered by WHMCompleteSolution