duanpie2414 2015-12-15 23:35
浏览 67
已采纳

将什么类型的错误写入cgi_error_log?

EDIT: The phpinfo() output that I direct you to below, shows display_errors off but that is overridden in a Wordpress configuration file --- I think. At least I'm seeing PHP errors so I assume it is overridden.

But, as it goes, when you assume you make an ass out of you and me. I'll change it in the php.ini file and report the results in another edit.

EDIT: I set display_errors On and display_startup_errors On and produced the errors again and the cgi_error_log is still empty.

Original questions beings below ------------------------

This is pretty elementary but I'm having a problem and I'm unable to get my brain out of first gear today and I'm in need of a reality check.

I wanted to empty the cgi_error_log file and tried to replace it with an empty file via FileZilla. FileZilla reported it was uploaded but when I looked on the server, it had not been replaced.

I finally used the hosting company's File Manager and deleted the file and uploaded an empty file. That succeeded and now the cgi_error_log is empty - it has been since I uploaded the empty file December 14, 2015 at 1941 (local time).

I expected something to have been logged by now.

One of the last messages in the cgi_error_log before I deleted in and uploaded an empty file, was:

20151214T181242: www.example.com/index.php
Failed loading /usr/local/lib/ioncube/ioncube_loader_lin_5.2.so:  /usr/local/lib/ioncube/ioncube_loader_lin_5.2.so: wrong ELF class: ELFCLASS32
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:  /usr/local/Zend/lib/ZendExtensionManager.so: wrong ELF class: ELFCLASS32

I changed the actual URL,l in the message, to www.example.com etc, as is standard here.

Don't worry about why the error occurred, I already asked a question about that issue, got a reply, and am now waiting on my hosting company to respond to service ticket I submitted about it.

I have not changed the file that was producing the above error and thus, I would expect errors of that type to be occurring and be logged to the cgi_error_log file.

My problem right now is that nothing is in the cgi_error_log file and I'm wondering about permissions and such on the file. I submitted a service ticket about this but got the usual uninformed responds.

This my question here as a reality check. If PHP errors should be written to cgi_error_log, then something is wrong. If not, I try a different approach to determine why the cgi_error_log is still empty.

The server is running Apache.

If you want to see the output of phpinfo(), look at this file.

Assume the following error (I forced it to occur with 1/0;):

Warning: Division by zero in /hermes/bosoraweb081/b1107/myd.sugarcatsimon/public_html/pdmeoff/pdroot/welg/wp-content/themes/thingspissed/functions.php on line 3

and, this one I caused by simply typing "This will cause an error" in a PHP function:

Parse error: syntax error, unexpected 'will' (T_STRING) in /hermes/bosoraweb081/b1107/myd.sugarcatsimon/public_html/pdmeoff/pdroot/welg/wp-content/themes/thingspissed/functions.php on line 3

I know that I'm asking more than one question, below, but they are all about the same matter - what and where is logged for PHP errors.

1) Should those be logged to a file?

2) If so, are they logged to cgi_error_log or some other file?

3) If it is not cgi_error_log, where would they be written?

4)What type of errors, if not PHP, are written to cgi_error_log?

5) How can I cause a message, of any type, to be written to cgi_error_log, besides using the error_log() function?

If I don't get it all in gear, I'm going to drop my brain off at the repair shop and have them give it a good overhaul.

Thanks in advance.

  • 写回答

1条回答 默认 最新

  • doujian1954 2015-12-17 04:19
    关注

    The cgi_error_log replacement had the wrong permissions. It was 644 and should have been 664.

    For future searches - The cgi_error_log file needs to have permissions set to 664 for logging to succeed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频
  • ¥15 按键修改电子时钟,C51单片机