an error occurred while processing this directive
an error occurred while processing this directive 解决方法
问:
访问站点的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
返回浏览站点,正常
Host Monster
虚拟主机中国地区购买优惠入口:
http://www.hostmonster.com/track/chinese