中午的时候都是500错误,有时404错误,其他时间倒没有什么问题
|
|
中午一两个钟头 都是500错误,有时404错误,其他时间倒没有什么问题,请问什么原因
下面是错误日志:- [Fri Nov 30 00:32:12 2007] [error] [client 202.213.200.170] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:32:12 2007] [error] [client 202.213.200.170] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:32:12 2007] [error] [client 66.249.65.193] File does not exist: /home/do123/public_html/500.shtml
- [Fri Nov 30 00:32:12 2007] [error] [client 66.249.65.193] Premature end of script headers: /home/do123/public_html/viewthread.php
- [Fri Nov 30 00:32:09 2007] [error] [client 70.87.68.194] Premature end of script headers: /home/do123/public_html/incool/wp-cron.php
- [Fri Nov 30 00:32:08 2007] [error] [client 202.213.200.170] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:32:08 2007] [error] [client 202.213.200.170] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:32:02 2007] [error] [client 202.213.200.170] Premature end of script headers: /home/do123/public_html/nicefood/index.php
- [Fri Nov 30 00:32:02 2007] [error] [client 202.213.200.170] Premature end of script headers: /home/do123/public_html/nicefood/index.php
- [Fri Nov 30 00:32:02 2007] [error] [client 70.87.68.194] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:32:02 2007] [error] [client 70.87.68.194] Premature end of script headers: /home/do123/public_html/incool/wp-cron.php
- [Fri Nov 30 00:32:00 2007] [error] [client 70.87.68.194] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:32:00 2007] [error] [client 70.87.68.194] Premature end of script headers: /home/do123/public_html/incool/wp-cron.php
- [Fri Nov 30 00:31:31 2007] [error] [client 61.4.177.14] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:31:31 2007] [error] [client 61.4.177.14] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:31:24 2007] [error] [client 61.135.219.12] File does not exist: /home/do123/public_html/500.shtml
- [Fri Nov 30 00:31:24 2007] [error] [client 61.135.219.12] Premature end of script headers: /home/do123/public_html/viewthread.php
- [Fri Nov 30 00:31:23 2007] [error] [client 61.4.177.14] Premature end of script headers: /home/do123/public_html/nicefood/index.php
- [Fri Nov 30 00:31:23 2007] [error] [client 61.4.177.14] Premature end of script headers: /home/do123/public_html/nicefood/index.php
- [Fri Nov 30 00:31:14 2007] [error] [client 61.135.219.12] File does not exist: /home/do123/public_html/500.shtml
- [Fri Nov 30 00:31:14 2007] [error] [client 61.135.219.12] Premature end of script headers: /home/do123/public_html/viewthread.php
- [Fri Nov 30 00:31:09 2007] [error] [client 61.135.219.12] File does not exist: /home/do123/public_html/500.shtml
- [Fri Nov 30 00:31:09 2007] [error] [client 61.135.219.12] Premature end of script headers: /home/do123/public_html/viewthread.php
- [Fri Nov 30 00:31:06 2007] [error] [client 124.133.48.130] File does not exist: /home/do123/public_html/500.shtml
- [Fri Nov 30 00:31:06 2007] [error] [client 124.133.48.130] Premature end of script headers: /home/do123/public_html/forumdisplay.php
- [Fri Nov 30 00:31:06 2007] [error] [client 61.4.177.14] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:31:06 2007] [error] [client 61.4.177.14] Premature end of script headers: /home/do123/public_html/incool/index.php
- [Fri Nov 30 00:31:06 2007] [error] [client 61.135.219.12] File does not exist: /home/do123/public_html/500.shtml
复制代码 |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2007-11-30 16:03:11
|
显示全部楼层
日志项:Premature end of script headers(脚本程序标题过早结束)
出错的原因:这个出错消息说明了这样一种情况,即你的脚本程序在运行,而C G I模块的h e a d e r函数输出的C o n t e n t - Ty p e标题并不是脚本程序发出的第一个消息。有时在日志文件中的这个消息前面或后面还会出现一条辅助消息。这个辅助消息更有助于确定出错的原因。你可以试用下面的方法来确定出错的原因:
• 在调用h e a d e r函数前,务必不要输出任何信息,包括出错消息。在h e a d e r函数之前输出的任何东西都会导致这个错误。
在程序的开始处而不是在调用h e a d e r函数时,你会看到Perl CGI程序输出“C o n t e n t - Ty p e:t e x t / h t m l \ n \ n”这条消息。显然输出这个消息和调用h e a d e r函数被认为是做同样的事情,但实际并非如此。h e a d e r函数要考虑这样一个问
题,即\ n \ n在每个服务器上并不总是表示相同的意思,它会为该服务器输出相应的序列。
一个称为输出缓冲的问题会导致s y s t e m函数在h e a d e r函数输出之前产生输出,并在输出中出现反引号( ` ` )。若要确保h e a d e r函数的输出总是显示在前面,可以将Perl CGI程序的开始部分重新编写为下面的形式:
#!/usr/bin/perl -wt
use strict;
use CGI;
$|=1; #确保header 的输出一直在最前端
print header; |
|
|
|
|
|
|
|
|
|
|
lamon
发表于 2007-11-30 17:11:55
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
lamon
发表于 2007-11-30 17:41:40
|
显示全部楼层
|
这个错误会导致 cpu超标?? 联系了官方 说我cpu超过 25%了,,,我郁闷..才2000 IP不到一天 |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2007-11-30 19:32:34
|
显示全部楼层
|
应该是程序有问题,在header之前有信息传递,可能是因为修改.htaccess引起的或者程序本身的问题 |
|
|
|
|
|
|
|
|
|
|
lamon
发表于 2007-12-4 21:48:05
|
显示全部楼层
我用的是 官方的wp博客程序和模板.没有任何修改,情况还是一样! 我郁闷了,在其他空间都很正常,
就是在HG空间,我发布文章几分钟以后 ,就开始500错误! |
|
|
|
|
|
|
|
|