Changes to php.ini not taking effect
Apr 18, 2012 09:00am
Question:
I modified my php.ini file to fix a PHP problem, but the changes didn't take effect. Why won't it work?
Answer:
This is commonly caused by one of the following issues: - If the changes is being made for the Centova Cast web interface, did you restart Apache after modifying php.ini? The changes will not take effect until Apache is restarted.
- Did you edit the correct php.ini file? It is surprisingly common to find servers with several unused php.ini files in various locations, and if you edit the wrong one, it will have no effect.
To determine the location of the correct php.ini file, launch the following URL in your web browser:
http://url-to-centovacast/diagnostics.php
Replace
url-to-centovacast to the actual URL to your Centova Cast
installation. Under "Checking PHP version", the path to the correct
php.ini file will be displayed. This is reported directly by your web server's PHP interpreter, so it is guaranteed to be correct.
- Bear in mind that some Linux distributions (most notably Debian, and derivatives like Ubuntu) use separate php.ini files for the PHP CLI and PHP Apache modules. If you are using such a system, you must make your changes in not just one, but TWO php.ini files.
The two php.ini files can be located by following the instructions in step 2 above to launch the diagnostics script, and then looking at the following items:
- For the PHP Apache module's php.ini file, look under "Checking PHP version" as described in step 2. - For the PHP CLI's php.ini file, look under under "Checking PHP CLI binary".
Make your changes in BOTH php.ini files and restart Apache to make the changes take effect.
If the problem persists, it is likely that the option you're trying to change is already set correctly in php.ini, but is being overridden by a "php_flag" or "php_admin_flag" value in your Apache configuration file, or in an .htaccess file somewhere on your server. You'll need to locate the relevant .htaccess or Apache configuration file and make the necessary changes there. Unfortunately there is no easy way to locate these files; you'll need to consult with an administrator who is familiar with your OS and hosting control panel software (if applicable).
Posted by Centova Technologies
|