Solved

PHP on IIS

Posted on 2009-05-18
8
421 Views
Last Modified: 2012-05-07
We are trying to get PHP 5.2.9 to run on IIS 6.0 on our server.  Currently we can get PHP 5.1 to work on IIS 6.0 and we can get PHP 5.2.9 to work with Apache on the same server, any ideas?  Thanks.
0
Comment
Question by:sharkbot221984
  • 5
  • 3
8 Comments
 
LVL 17

Assisted Solution

by:Chris Harte
Chris Harte earned 500 total points
ID: 24417422
There is a windows build of 5.2.9 This (5.2.9-2) could be the one you are after.

http://www.php.net/archive/2009.php#id2009-04-08-1
0
 
LVL 8

Author Comment

by:sharkbot221984
ID: 24417436
Is 5.2.9-1 not for windows?

Also can I run 5.2.9-1 or 2 alongside 5.1.6?  Seems to me that it would be conflicting, we already have sites running on this webserver for 5.1.6.
0
 
LVL 8

Author Comment

by:sharkbot221984
ID: 24417464
Upon further inspection of the 5.2.9-1 setup looks like it wasn't fully configured, at least not according to this guide I've found:

http://www.iis-aid.com/articles/how_to_guides/installing_php_5_on_iis_in_5_simple_steps?page=0,0

Basically there was a C:\PHP directory (5.1.6) already set up, and someone setup C:\PHP-5.9.2-1 as well.  Environment Variables were not configured for the C:\PHP-5.9.2-1 folder, and neither was a web service extension.  Seems to me that adding these would conflict with the existing stuff, correct?  Or is it okay as long as we call the specific directory we want to actually use?


0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 17

Assisted Solution

by:Chris Harte
Chris Harte earned 500 total points
ID: 24417530
You can run multiple versions of php on the same server.
Each version must have its own PHP.ini.
The binaries must be in seperate directories.
Create FastCGI application process pools for each version.

This link has the code on how to create the process pool (search for multiple)

http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/
0
 
LVL 8

Author Comment

by:sharkbot221984
ID: 24417604
I believe the binaries are in 2 different directories, C:\PHP\ext and C:\PHP-5.2.9-1\ext.  I do also have 2 different php.ini files, one is in C:\Windows\php.ini, and the other is in C:\PHP-5.2.9-1\php.ini

The current version 5.1.6 is using ISAPI, can I configure the second version for FastCGI and leave the first, or should I change the first to FastCGI as well?
0
 
LVL 17

Assisted Solution

by:Chris Harte
Chris Harte earned 500 total points
ID: 24420690
Microsoft recommend the use of fastCGI with their servers.,
0
 
LVL 8

Author Comment

by:sharkbot221984
ID: 24424917
This site is more along the lines of what's needed for multiple versions side by side:

http://www.iis-aid.com/articles/how_to_guides/running_multiple_versions_php_iis

I have them isolated now, and my sites that use 5.1.6 are up and running and not effected by what i'm doing to my 5.2.9 settings.  I setup a new phpinfo.php page to use the 5.2.9 settings and it did not work (which is to be expected since the developers don't want me to restart the server yet).  So I pushed ahead to convert the 5.2.9 ISAPI to use FastCGI instead, configured my fcgiext.ini and php.ini files to reflect FastCGI settings, changed only the site I'm testing to use the fcgiext.dll and I get "No Input File Specified" HTTP 404 error.
0
 
LVL 8

Accepted Solution

by:
sharkbot221984 earned 0 total points
ID: 24425675
The above link was a big part of it.  I had everything right up to the "No Input File Specified" part, the final bit was editing the php.ini file to reflect the actual root directory of my phpinfo.php file, in the end I had it setup exactly the way that we wanted it, because as soon as I got it configured for my phpinfo.php file I undid it all to work for the development site already established but running under 5.1.6, just switched the php5isapi.dll file over to the fcgiext.dll and it works perfect.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to access a remote mysql database with xampp 3 24
php help 34 58
Ajax and PHP 9 29
Reference key in foreach loop 4 18
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question