Thus, use caution when reviewing the following list. DO NOT go changing permissions willy-nilly "just because" one of these points indicates that that "might" be the cause of the problem.
BE SELECTIVE about what you do to try to "fix' the issue.
A little background:
The server your website is running on, uses a piece of software to do the "serving" of web page content to visitors browsers.THAT server has many rules defined inside it for how things are supposed to work. If *something* goes wrong, it throws up an error, AND it logs that error in its own server logs.
A good hosting company will have the server configured to record those logs so it can analyze a problem when it occurs.
Usually *you* will not have direct access to those logs, but the hosting company DOES.
MOST IMPORTANT POINT:
The "500 Internal Server Error" is a VERY generic catch-all error that simply means "oops, something went wrong, and I don't know what it was, or at least I'm not going to publicly tell you what it was".The actual cause of the error WILL BE LOGGED in the server. It will NOT be displayed on the screen, since many times the reason might be security-related,
and to display the "actual" cause on-screen would tell a hacker exactly what to do next to get around the security systems.
THAT is why the fastest way to find the solution to a "500 Internal Server Error" problem is to look it up in the server's logs. If that means logging a ticket with your hosting company, DO IT.
A word about Windows/IIS hosting
While Zen Cart has been known to work fine on many Windows/IIS hosting servers, it is primarily tuned best to work with Apache servers, which are more commonly driven by Linux hosts.It has also been frequently demonstrated that if a Zen Cart site is encountering 500 Internal Server Error problems on a Windows host, that moving it to a Linux host quickly removes the problem.
This often means that there was something about the Windows Server configuration that was triggering the incompatibility,
but no specific pattern describing those unique configuration settings has been identified yet, since the hosting companies haven't been willing to share those details.
So, switching from Windows/IIS to Linux/Apache is definitely worthy of consideration. It's easier to support and configure on Linux anyway!
POSSIBLE CAUSES (in no particular order):
Security System (mod_security) |
mod_security is a security system that runs on the webserver to detect common hacker activity and trip them up if they try to do something rogue. It looks for patterns of commonly-used hacker scripts and words, and if the rule is triggered, it sends a 500 error, and might even lock out the visitor's IP address temporarily. The mod_security rule will be listed in the error logs *and* in the mod_security logs. Additional considerations if you're finding yourself getting 500 errors ONLY when editing certain products/categories via your Admin area. |
suexec | THIS IS BECOMING MORE AND MORE COMMON FOR PCI COMPLIANCE REASONS. If the server is configured to use php_suexec (which is intended to provide slightly better security in how files are stored and permissions are managed with PHP scripts), then you're not allowed to set any files or folders to "777" (aka "world-writable) permission levels. The maximum allowed in such cases is typically 755. In this situation, if you set a folder to "777", the server throws a 500 Internal Server Error and blocks access to any scripts or files in that folder. The blocked folder will be listed in the logs. So, in that case you should use 755 instead of 777 when reading instructions that suggest using "777". Additional considerations if you're using phpsuexec |
.htaccess syntax errors or .htaccess restrictions imposed by the main server configuration |
If your server's been configured to restrict you from using certain directives in .htaccess files, but you use something disallowed, then a "500 Internal Server Error" will be triggered, and your site will be inaccessible until you fix the problem. The exact rule will be recorded in the logs. Further details on .htaccess and server requirements for Zen Cart can be found *inside* the .htaccess files that come *with* Zen Cart. |
PHP errors | Sometimes when a PHP script encounters an error, either due to a timeout or a syntax problem, or something worse like a logic problem, it *might* trigger a 500 Internal Server Error. It may not always do so, but it may. In such cases, if you use the Zen Cart debug logs to review PHP errors, you might discover the cause of the problem there. |
Bad configure.php contents | If the URLs or paths, or anything else for that matter, in your configure.php files refers to information for a different server, or is not correct for *your* server, then many odd problems may occur, including possibly a 500 error. However, usually it will be very different symptoms. Just be sure that you DO NOT copy your configure.php files from one server to another, even localhost. |
Wrong email mode | If your blank-screen or 500-error is occurring at the same time as your store is attempting to send emails, this might be something to look into. Some hosts are extra strict about NOT using the "PHP" setting for Admin->Configuration->Email Options->Email Transport Protocol. Instead, set it to SMTP and specify the correct email server address in the SMTP Email Host setting, also on that screen. For even more assistance on email issues, seehttp://www.zen-cart.com/wiki/index.p...Email_Problems |