全部博文(107)
分类: Python/Ruby
2012-09-25 16:00:09
编辑php.ini,将log_errors设置为on:
log_errors = On
然后重启apache即可。
如成功开启,就可以跟踪到对应的错误提示:
[Mon Sep 24 16:57:01 2012] [error] [client 218.5.80.210] PHP Warning: fsockopen() has been disabled for security reasons in /home/bccgi-bin/fsockopen.php on line 2
[Mon Sep 24 16:57:02 2012] [error] [client 218.5.80.210] PHP Warning: fsockopen() has been disabled for security reasons in /home/bccgi-bin/fsockopen.php on line 2
[Mon Sep 24 16:57:03 2012] [error] [client 218.5.80.210] PHP Warning: fsockopen() has been disabled for security reasons in /home/bccgi-bin/fsockopen.php on line 2
[Mon Sep 24 16:57:04 2012] [error] [client 218.5.80.210] PHP Warning: fsockopen() has been disabled for security reasons in /home/bccgi-bin/fsockopen.php on line
如果是Windows环境,除了将log_errors设置为on外,还需要定义error_log的路径及文件名:
error_log = d:/temp/error.log
(此目录需要授予php标识用户的修改权限,否则日志文件无法生成)
因为IIS没有error_log的概念,需要另外定义。