[英]Disable strict error on OSX in XAMPP
I have installed one of the last version of XAMPP(1.8.2) into my OSX system with mavericks but I retrieve strict error into my localhost(in other computer works fine). 我已经使用特立独行的程序将XAMPP(1.8.2)的最新版本之一安装到OSX系统中,但是我在我的本地主机中检索到严格的错误(在其他计算机上工作正常)。
The problem is the php.ini file. 问题是php.ini文件。 I have print with phpinfo() the information (some of the information): 我已经用phpinfo()打印了信息(一些信息):
Configuration File (php.ini) Path /Applications/XAMPP/xamppfiles/etc
Loaded Configuration File /Applications/XAMPP/xamppfiles/etc/php.ini
I have copied the path of the php.ini I have tried to modify it into this the configuration error: 我已复制php.ini的路径,并尝试将其修改为此配置错误:
error_reporting=E_ALL & ~E_NOTICE
not works 不起作用
I have tried to set (a very bad solution) 我尝试设置(一个非常糟糕的解决方案)
display_errors=Off
not works, already strict file enabled. 不起作用,已启用严格文件。
this is my actual configuration with phpinfo() 这是我用phpinfo()的实际配置
display_errors On Off
display_startup_errors On On
docref_ext no value no value
docref_root http://php.net/ no value
enable_dl Off Off
enable_post_data_reading On On
error_append_string no value no value
error_log /Applications/XAMPP/xamppfiles/logs/php_error_log /Applications/XAMPP/xamppfiles/logs/php_error_log
error_prepend_string no value no value
How can I disabled strict error? 如何禁用严格错误?
Is obvious that every edit of php.ini I have restart the server 很明显,我对php.ini的每次编辑都重新启动了服务器
Thanks 谢谢
Adding these lines in your PHP code will hide E_STRICT errors: 将这些行添加到PHP代码中将隐藏E_STRICT错误:
ini_set('display_errors', 'On');
error_reporting(E_ALL & ~E_STRICT);
See my post Handle PHP errors and exceptions for more information. 有关更多信息,请参见我的文章处理PHP错误和异常 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.