Solved

PHP on IIS

Posted on 2009-05-18
8
391 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 16

Assisted Solution

by:Chris Harte
Chris Harte earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 16

Assisted Solution

by:Chris Harte
Chris Harte earned 500 total points
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 8

Author Comment

by:sharkbot221984
Comment Utility
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 16

Assisted Solution

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

Author Comment

by:sharkbot221984
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now