500内部服务器错误? [英] 500 Internal Server Error?

查看:283
本文介绍了500内部服务器错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我把我的项目是PHP +智者+ MYSQL在我的httpd服务器。但是,我遇到了一个错误,指出:

Recently, I put my project which is php+smarty+mysql in my httpd server. But I encountered an error that says:

500 Internal Server Error

我的操作系统是的ArchLinux,并在httpd服务器和PHP安装了这样的:

My OS is archlinux, and the httpd server and php were installed like this:

sudo pacman -S apache php

如果我用一个测试机PHP文件,该文件包含以下内容:

If I use a test native php file which contains the following:

  <html>
    <head>
    <title>PHP Test Page</title>
    </head>
    <body>
    This is Arch Linux, running PHP.
    <?php
      phpinfo();
    ?>
    </body>
    </html>

它正常运行。它告诉我,PHP可以很好地工作。但是,为什么是我与智者不工​​作计划?有没有谁遇到这个问题的任何一个?

it runs correctly. It tells me that the php can work well. But why is my project with smarty not working? Is there any one who has encountered this problem?

推荐答案

通过您所提供它的信息是很难说。

With the info you provided it's difficult to say.

错误500是因为您在code是应该产生页或code做了一些错误产生一些未处理的异常。
我的建议是访问,让你的500错误页面,然后尝试注释掉所有code。看看问题是否仍是present。如果不是,取消code,直到你发现源自错误的关键部分。可以是任何东西,一个错字,没有找到一个文件,一个逻辑上的错误,任何东西。

Error 500 happens because you did some error in the code that is supposed to produce the page, or the code generates some unhandled exception. My suggestion is to visit the page that gives you the 500 error, and then try to comment out all your code. See if the issue is still present. If not, uncomment the code until you find the critical part that originates the error. Could be anything, a typo, a file not found, a logical error, anything.

另外,请检查Web服务器日志,如果你可以阅读它们。

Also, check in the webserver logs, if you can read them.

这篇关于500内部服务器错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆