Trouble Shooting

Troubleshooting a HTTP 500 error with PHP can be a bit of a can of worms. So much of it depends on things specific to your local environment, such as what Windows operating system you are using, how you have the PHP application mapping configured in IIS, under what security context your IIS application is run and even your php.ini configuration. In this article we'll look at some common causes of what can cause a HTTP 500 error in your PHP environment.

Submitted by Brashquido on Mon, 2007-12-03 00:00.

Configuring PHP to run on IIS is usually a relatively straight forward task, but as there are many steps when configuring your server it can be a real pain to back track your steps when something goes wrong. Being prompted to download a php file or having your browser window fill with PHP code rather than it being processed by your server are among the most common problems encountered when configuring PHP on IIS. In this article we'll look at some possible causes and resolutions.

Submitted by Brashquido on Wed, 2007-11-21 00:00.

One of the most common ways a PHP application will try and launch an external program is to use the exec function. However, if you are trying to use a script using this exec function and you are an IIS user using the default anonymous IIS user account then you'll almost certainly experience the Warning: exec() [function.exec]: Unable to fork error. This is because by default the anonymous IIS user account has minimal access to your system, and in particular every executable file in your Windows system32 directory are explicitly set to deny access to this account. Now that we know why you get this error, lets see if we can get a working solution.

Submitted by Brashquido on Wed, 2007-10-24 23:00.

If you are using IIS 5.1 on XP and are being presented with an "Unexpected Error 0x8ffe2740 Occurred" error message when trying to start your website from the IIS Admin panel, then it is likely that you have a port conflict on your system. That's the easy part, now what do you do to track this conflict down and fix it?

Submitted by Brashquido on Wed, 2007-10-17 23:01.

Running PHP on IIS in CGI mode is slow and a potential security risk, using ISAPI is fast as it uses the native multi threaded architecture of IIS but has compatibility issues with some of the PECL extensions as they are not thread safe. This is where FastCGI comes in which is an extension to the CGI specification that offers far superior performance and scalability. It is a seemingly little known fact that the father of PHP on Windows, Shane Caraveo, wrote a FastCGI module for IIS way back in 2002. I personally have been using this extension since late 2003 with great success, and it is even used in the IIS Aid PHP Installer you can download from this site. It can be a little tricky to setup at first, and in this article we'll explore some of the more common reasons for being unable to connect to the FastCGI interface when using the PHP scripting language.

Submitted by Brashquido on Tue, 2007-02-06 04:43.

If you do a search of the Xoops forums you'll find pages upon pages of users reporting that they are getting a "Could not insert forum post" error when trying to submit posts to their forums. Most are told that it probably is a firewall issue relating to the blocking of HTTP referers, and others also advise to do a CHECK and REPAIR on their MySQL Database. Seems sound advice, and in a lot of instances these approaches will work. I never thought anything of these reported issues before as I had never experienced them first hand. Last week that changed though as I went to reply to a post on my forum and the dreaded "Could not insert forum post" message appeared. I followed all the advice I could find about firewalls and database maintainence from the Xoops forums, but the problem persisted. The solution I found was totally different to anything that I could find mentioned before.

Submitted by Brashquido on Fri, 2006-03-03 05:54.