问题原文
原帖链接 · Fcoder · CC BY-SA 3.0
When I make any changes in php.ini located in /usr/local/lib on centos, the changes don't appear to be applied, for example, when I clear all the content of php.ini and restart Apache everything works fine...
I searched for php.ini and it is in one place in system... what's the problem? How can I fix this?
已采纳解答
原帖链接 · Gryphius · CC BY-SA 3.0
if you're unsure what php.ini is being used, create a new file in your webfolder, name it phpinfo.php for example , with the following content
<?php
phpinfo();
?>
then open the url in your browser (http://www.example.com/phpinfo.php). it will show the path to the php.ini being used.
when you have identified the correct file, make your desired changes, and be sure to remove the leading ; in case there is one to activate the setting.
restart apache and reload the phpinfo page, your changed setting should now show up. if it doesn't, make sure you don't have a .htaccess file in your webroot that overrides php settings.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
