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

将什么类型的错误写入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.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题