为什么不会的Apache 2.1.7在登陆WAMP PHP错误到PHP错误日志? [英] Why won't Apache 2.1.7 in WAMP log PHP errors to the PHP error log?
问题描述
我有WAMP安装并决定使用默认的Apache 2.1.7在WAMP的最新版本;原因是我的主机服务器里我的网站也使用2.1.7。 previously,我使用Apache 2.2.11在WAMP,因为我的最后一台主机也使用该版本。
I have WAMP installed and decided to use the default Apache 2.1.7 in the latest version of WAMP; the reason is my host server where my site is also uses 2.1.7. Previously, I was using Apache 2.2.11 in WAMP, because my last host also used that version.
我现在的问题是我似乎有一些调试器什么的,当我得到它的显示像下面的图片在一个PHP错误,没有记录到PHP错误日志中的错误,即使它的启用等。在的php.ini
。当我切换回早期Apache的版本,所有的错误都将记录在PHP错误日志。
The problem I have now is I seem to have some debugger on or something as when I get a PHP error it's shown like in the image below and the error is not logged to the PHP error log even though it's enabled, etc. in php.ini
. When I switch back to an earlier Apache version, all errors are logged in the PHP error log.
所以它必须是Apache的。基本上我想要的PHP错误记录到PHP错误日志喜欢它用来做什么。这究竟是为什么,我该如何改变呢?
So it must be Apache. Basically I want PHP to log errors to the PHP error log like it used to do. Why is this happening and how I can change it?
我不介意,则显示错误的方式,因为它可以帮助无论如何,因为我可以看到它好多了,但我还是喜欢它登录到PHP错误日志为好。
I don't mind the way the error is displayed as it helps anyway, because I can see it much better, but I still like it to log to the PHP error log as well.
下面是一个PHP的错误看起来像自WAMP切换Apache的版本;
Here's what a PHP error looks like since switching the Apache version in WAMP;
下面的图片:
推荐答案
我设法排序。要重新启用PHP错误日志只是做到以下几点:
I managed to sort it. To re-enable PHP error logging again just do the following:
- 在WAMP的图标,左键点击在任务栏
- 然后移动鼠标移到 PHP>
- 然后再往并单击的php.ini
- 现在,查找:
;的error_log =C:/wamp/logs/php_error.log
(请注意您的位置可能会不同计算机上和我的不一样。)现在只是删除;从行的开始,并保存 PHP。 INI
并重新启动所有WAMP服务。
(Note your location may be different on your computer and not the same as mine.) Now just remove the ; from the start of the line and save the php.ini
and restart all WAMP services.
要犯错误看起来像他们通常做PHP和删除在的php.ini
文件的外观为橙色盒子:
To make errors look like they normally do in PHP and to remove that orange box in the php.ini
file look for:
的zend_extension =C:/wamp/bin/php/php5.3.5/zend_ext/php_xdebug-2.1.0-5.3-vc6.dll
,并添加 到行的开始,并重新启动WAMP。现在WAMP将恢复正常试。
AND ADD a ; to the start of the line and restart WAMP. Now WAMP will be back to normal again.
看来新WAMP禁用PHP文件错误日志记录和日志,而不是在Apache的错误日志PHP错误。我不知道,如果它这样做previously,但无论哪种方式,它解决了我的问题。
It seems the new WAMP disables the PHP file error logging and instead logs PHP errors in the Apache error log. I am not sure if it did that previously, but either way, it solved my problem.
这篇关于为什么不会的Apache 2.1.7在登陆WAMP PHP错误到PHP错误日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!