When the IIS services and all of the dependent services have stopped, you can restart IIS by entering the following command:NET START W3SVC
Keep in mind that you'll have to manually restart any other services that might have been stopped along with the IIS services. Testing PHP
Once you have PHP up and running, you can test it. If you don't already have some PHP scripts you can use to test the server, create a file called Test.php in your Web site's root directory, containing the following code:
![]() |
When you do, the script should produce the output shown in Figure F.
| Figure F |
![]() |
| You can run a sample script to see if PHP is working correctly. |
At this point, everything should be working well. But just in case something has gone wrong, I'll try to point you in the right direction for troubleshooting the problem. The way that the PHP interpreter works is simple. Basically, the Php.exe executable interprets PHP scripts. For this to happen, IIS must associate a file extension with the executable, as we saw in Figure E. Therefore, this should be the first thing that you check when troubleshooting. Verify that the path to the Php.exe file is correct and that you've used the right file extension. Once you've verified the path and extension, double-check your test script. Begin by verifying that the script is accessible. You can tell by whether you receive a 404 error or some other type of error. If you're getting a 404 error, you're directing your Web browser incorrectly. Otherwise, Internet Explorer is finding the script, but the script is having some other problem. If this is the case, take a moment to verify that your test script ends in the .php extension. The PHP interpreter will interpret only scripts with the .php extension, unless you've set up other file extensions. If all of this checks out, double-check the %Systemroot%\system32 directory to make sure that Php4ts.dll exists and that any other DLL files that you plan to use have been copied to this location. If the DLL files do exist, double-check to make sure that the Php.ini file exists in the %Systemroot% folder and that the parameters within the file point to the correct location for the DLL files (%Systemroot%\system32). If you've verified all of these things, try completely rebooting your server. Make sure that the Web site you've configured PHP for is running after the reboot. You should also make sure that your IIS service account has full access to your PHP folder. If you're still having problems, check www.php.net for patches that might have been released since this article was written.
Enterpise newsletter. Find out what's where in the new Tech Update with our
Guided Tour. Tell us what you think in the
Enterprise Mailroom.









Talkback
Hi, nice site, good work! Thank you!
This post has been removed by a moderator.