500 Internal Server Error?

apache, mysql, php, smarty

Solution

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

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.

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

Problem

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 ``` My OS is archlinux, and the httpd server and php were installed like this: ``` sudo pacman -S apache 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> ``` 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?

Original source