开发者

PHP display_errors=Off in php.ini settings issue

I have a custom php.ini file I created in my public_html directory. It works as I have checked the settings set are co开发者_高级运维rrect using phpinfo().

But the strange problem is the php.ini settings do not seem to apply to all sub_folders in the public_html directory?

Any ideas perhaps theres a setting needed in php.ini to apply to all subdirectories in public_html?

I found the answer myself you have to add the line into .htaccess file so it uses the custom php.ini file you created in public_html instead of having to copy php.ini file in every subdirectory you create.

Add this to .htaccess does the trick obviously replacing username

SetEnv PHPRC /home/USERNAME/public_html/php.ini


Not really a solution, but you can disable overriding the display_error setting by using php_admin_flag in your sites configuration. If it still happens then, you have set an error handler which misbehaves.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜