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 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭