views:

519

answers:

2

I know this has been asked a few times here. But none of the suggestions or answers related to PHP on IIS have helped.

I have tried installing PHP ON IIS 5.1 (XP SP 3) on two computers and it still doesn't work. I've even began to think that all of the articles and installers for PHP on IIS are a huge prank...and that PHP on IIS doesn't actually work.

I've spent the last 6 hours trying to get it to work. Nothing does. As of right now when I navigate to http://localhost/phpinfo.php all that shows up is: "The specified module could not be found." My IIS applications still work perfectly.

phpinfo.php contains:

<?php echo phpinfo(); ?>

Even loading test.php with "Hello World." in it gives me the same error message.

The current installation of PHP was installed from http://php.iis.net/ (the big blue button in the middle of the page). This installed PHP in my pograms directory (F:\PHP).

That didn't configure PHP to work so I manually added the Application Mapping in "Web Sites" > Properties > Home Directory > Configuration > Mappings > Add. I added C:\WINDOWS\system32\inetsrv\fcgiext.dll, ext .php, "GET,HEAD,POST"

Anyone have any idea what my problem is?

+1  A: 

I think the DLL you are using for getting PHP to work have a missing dependency. Why don't you get a WAMP.

Do you really need to use IIS, using Apache would be far more easy IMHO. If you really want to use IIS, I advise to install the official PHP release they have a good README which describe all the steps to configure IIS or even an installer.

RageZ
My first attempts where using the official PHP 5.3 installer. Then installing using the "manual" approach from several articles i found online. In total, I've installed and uninstalled PHP from my dev machine about 7 times today (6 times for the uninstall) and twice on another machine. I'll take a look at WAMP; though that is not an optimal solution. I want to run php and .net applications - together...with no hassle. <rant>After googling "PHP Sucks" and reading a few of the 11,000,000 articles I don't see any reason PHP should even exist.</rant>
David Murdoch
what kind of problem did you got with the official install ? for your remark on the "PHP sucks" I would find anyone who can say the same of any language. plus in that case php is installable in 10 second on apache, it take 10~15 minutes to do the same thing on IIS. the IIS way of doing stuff is really not user userfriendly IMHO
RageZ
When navigating to phpinfo.php I would be asked if I wanted to save or open the file. The default selected progam is CLI. Sorry about the "PHP sucks" rant...I was just fustrated. I am really thankful for the help. I've actually uninstalled PHP and fastcgi and reinstalled from the official php 5.3 installer and am once again getting the error about opening or saving the file.
David Murdoch
+1  A: 

Sounds like you've not installed the FastCGI components (which to be honest you don't really need on your local development machine). Can I suggest mapping the .php extension to:

F:\php\php-cgi.exe (or wherever the PHP binaries are installed)

Also make sure you give your site's anonymous user account at least read access to the F:\PHP folder and children.

Kev
I uninstalled fastcgi and php and then reinstalled from the official PHP 5.3 installer. This didn't actually getting it working for the get go. I had to map ".php" to F:\php\php-cgi.exe in both "Web Sites" AND its "Default Web Site" node...which no article I've read said I needed to do. Any idea why that part is left out?
David Murdoch
To be honest we never use the PHP installers. On our hosting platform we just unzip the distribution to `c:\php` then either map the `.php` extension globally or per-site depending on our customer's hosting plan.
Kev