郁闷了2天的500 internal server error

来自http://tunps.com/500-internal-server-error-2-days

闲来无事,觉得这个博客的空间没有完全的被利用起来,所以想制作一个图片站。域名到godaddy上面去晃荡了一会儿,发现还是.info域名比较厚道,才$1左右,且这个域名前两天才过期,这里就不说出来了,就买下来了。因为很久没有用支付宝了,需要数字证书验证,数字证书又需要手机验证码,手机当时又不知何处(后来知道被老妹拿到其他房间去了)我勒个去。就是因为这个间歇,付款没能继续,所以重新来过,所以就支付了两次$1,还好是1刀,如果是10刀,那……

域名算是买到了,进入正题:
买了域名后,在空间新建了一个子目录来放程序文件,用phpcms搭建,phpcms确实很强大,我看了看写的代码都是很规范的那种,模块化(新闻、视频、图片、问答)都很清晰。用phpcms做图片展开始我就觉得是大才小用,其实后来才发现phpcms不适合做图片展,如果你不是很懂代码,最好不要用phpcms做图片站。

程序上传完成后开始发布第一个图片集,点发送后,悲剧就此产生了。直接弹出500 internal server error错误:

500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

这个错误绝对是最无奈的,因为重这个错误中你得不到任何有用的消息。然后刷新整个站点,全部500报错,连另外之前的博客程序也被殃及池鱼。所有php文件全部报错500。

登录cpanel,查看了apache的错误日志,发现一条有价值的错误:

File does not exist: /home/tun/public_html/500.shtml
[Mon Jul 07 07:24:21 2008] [error] [client -.-.-.-] SoftException in Application.cpp:544: Directory "/home/tun/public_html/index.php" is writeable by group

看来apache有异常,和权限有关系,并且不能让group属组用户对index.php有写权限,我查看了程序文件,文件夹755,文件644,全部都是正常权限,我狂晕!

搜索了国内外各大博客,修改.htaccess,说是用suphp语句改变php的执行用户为当前用户,而非nobody,但是还是无效。

最后无奈的向空间提供商要求重新开一个cpanel帐号,结果搞定,历时1天多到2天。

这次经历,让我算是怕了phpcms了。那种没有重启动apache的权限、没有改配置文件权限的感受真实相当不爽。

 

About tunpishuang

just 4 fun·····
This entry was posted in 未分类. Bookmark the permalink.

One Response to 郁闷了2天的500 internal server error

  1. saisai says:

    这种情况我也碰到了 chmod 755 .当前目录就行了

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>