- 青橘子
- soulstice99
问:
访问站点的php文件时,提示[an error occurred while processing this directive]出错,但html文件正常,如何是好?
答:
直接原因之一是执行脚本出错,应该返回出错页(500.php),但Apache(Server Side Includes)找不到,即有提问中的出错提示信息。
过程:
- 登录到控制面板,查看出错日志有如下记录:
MAIN error_log:
--------------------------------------------------------------------------------
[Wed Oct 10 20:43:40 2007] [error] [client 75.8.82.183] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
[Wed Oct 10 20:43:47 2007] [error] [client 75.8.82.183] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
[Wed Oct 10 20:43:50 2007] [error] [client 75.8.82.183] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
[Wed Oct 10 20:44:00 2007] [error] [client 59.36.96.60] Premature end of script headers: /home/name/public_html/bbs/index.php
[Wed Oct 10 20:44:00 2007] [error] [client 59.36.96.60] invalid CGI ref "/500.php" in /home/name/public_html/bbs/500.shtml
- 查看高级栏中,点击Process Manager(进程管理器)
- 在进程管理器中,将怀疑运行不正常的进程终止(点击Kill Process或Force Kill Process),如下例进程显示:
Running Processes (Refresh):Process ID Process Name Running Since Action
29743 pure-ftpd (IDLE) Today at 20:30 Kill Process / Force Kill Process
30730 /usr/bin/php article_add_action.php Today at 19:49 Kill Process / Force Kill Process
22777 /usr/bin/php article_add_action.php Today at 19:38 Kill Process / Force Kill Process
24031 /usr/bin/php article_add_action.php Today at 19:40 Kill Process / Force Kill Process
22762 /usr/bin/php article_add_action.php Today at 19:38 Kill Process / Force Kill Process
21649 /usr/bin/php article_add_action.php Today at 19:36 Kill Process / Force Kill Process
25806 /usr/bin/php article_add_action.php Today at 19:42 Kill Process / Force Kill Process
18949 /usr/bin/php article_add_action.php Today at 19:33 Kill Process / Force Kill Process
29485 /usr/bin/php article_add_action.php Today at 19:47 Kill Process / Force Kill Process
26997 /usr/bin/php article_add_action.php Today at 19:44 Kill Process / Force Kill Process
- 返回浏览站点,正常
参考:
- 解决"an error occurred while processing this directive"出错提示一例(wiki - anqun.cn)
- an error occurred while processing this directive
- Apache Tutorial: Introduction to Server Side Includes
附:
站点目录下默认的505.php文件内容:
<!-- PHP Wrapper - 500 Server Error -->
<html><head><title>500 Server Error</title></head>
<body bgcolor=white>
<h1>500 Server Error</h1>
A misconfiguration on the server caused a hiccup.
Check the server logs, fix the problem, then try again.
<hr>
<?php
echo "URL: http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]<br>\n";
echo `checksuexec`;
?>
</body></html>
图1:

Tags: 505.php SSI Apache cPanel Process Manager an error occurred while processing this directive HostMonsterWenDa QingJuZi HostMonster
QQ群:2611874
安群网维基:http://anqun.cn
安群网论坛:http://bbs.anqun.cn
