How do I get PHP and MySQL working on IIS 7.0?
Question
Okay, I've looked all over the internet for a good solution to get PHP and MySQL working on IIS7.0. It's nearly impossible, I've tried it so many times and given up in vain. Please please help by linking some great step-by-step tutorial to adding PHP and MySQL on IIS7.0 from scratch. PHP and MySQL are essential for installing any CMS.
Solution
Have you taken a look at this:
http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis7/
MySQL should be pretty straight forward.
Let us know what problems you're encountering...
OTHER TIPS
I've been given a PHP / MySQL web site that I'm to host with IIS 7.0 on 64-bit Windows Server 2008.
I'm a .NET / MSSQL developer, and am unfamiliar with either PHP or MySQL.
Kev wrote:
Have you taken a look at this…
I don't know if any one implementation of Win64 PHP is more authoratative or popular than another.
I'm going to try following the steps in Kev's Enable FastCGI support in IIS7.0 article with file php-5.2.5-x64-2007-11-12.zip from fusion-x lan.
It's "PHP Version 5.2.5 (x64)", but according to php.net, the latest version is PHP 5.2.6. Oh, well.
Make sure "ISAPI Extensions" are installed in IIS (mine were).
Download and then unzip php-5.2.5-x64-2007-11-12.zip
Copy contents of folder php-5.2.5 (x64) into *C:\php*
Copy file C:\php\php.ini-dist into folder *C:\Windows*
Rename file C:\Windows\php.ini-dist as php.ini
Edit php.ini in Notepad. Remove leading semi-colon (;) from line:
;extension=php_mysql.dll
Save and close
Copy file C:\php\ext\php_mysql.dll into folder *C:\Windows\System32*
Within IIS Manager's "Handler Mappings", choose "Add Script Map…"
Request path: *.php Executable: C:\php\php5isapi.dll Name: PHP
Install MySQL (someone had already installed MySQL 5.0 for me).
Create file C:\inetpub\wwwroot\test.php as
<html> <head> <title>PHP Information</title> </head> <body> <?php phpInfo(); ?> </body> </html>
Navigate to http://localhost/test.php in your web browser. You will see a page of information about PHP.
It's supposed to work via FastCGI. But I haven't had great success (using Vista). I can get PHP to run, but it crashes after a page loads (FastCGI does). So I'm modding you up. I'd like to see a reliable answer myself.
From my experience with windows/apache it's just a matter of install MySQL, I can't Imagine that IIS/Apache has anything to do with this.
Apache is a major pain to get running in Vista. And II7 (and 6) are suppose to run PHP fine. So why bother with Apache?
I would suggest if you are going for a PHP and MySQL install to instead use WAMP. It works great and is easy to add extensions and modify everything. I use it for work and love it.
One of the IIS developers has an excellent walkthrough here:
http://blogs.iis.net/bills/archive/2006/10/31/PHP-on-IIS.aspx
However, for the love of god why?