Running PHP on IIS

All my experience with PHP is on Apache servers with MySQL on the backend. I have a client that uses IIS and was wondering if I get them to install PHP on the IIS server will I continually run into issues or should this be a relatively seamless process to develop in PHP connected to MS SQLServer? Thanks for any words of wisdom.

I have no personal experience with PHP on IIS, but I do know I’ve seen a lot of “this function - this OS” type of notices in the documentation.

In other words, depending on the code, things may be more or less “seamless”. I recommend you don’t simply “throw the switch” and thoroughly test on a staging server before going live.

On one hand, you may have some IIS-only capabilities that you like having, but on the other, you may break something.

Thanks, this would be a ground up development. Of course using components I have developed along the way. I’m more afraid of committing to this and just continually running into issues or things you can’t do or have to do differently. Like clean URLs for example and how they are handled. I rely heavily on .htaccess for navigation in my sites. Maybe this is too general a question.

I managed a site on Linux server and the owner was offered a free “upgrade” to IIS. The owner had the host move the site over without telling me and from memory most of it worked except the contact form which had permission problems.
I think permissions may be a problem; not unsumountable but may cost you time and effort to overcome. I had the site moved back as at the time I had other things on my plate without spending time on getting it working.

I assume other people have done it and there must be tutorials around. You could always try getting php installed and testing some code.

1 Like

Try something such as php iis incompatibility - Google Search. I do not find anything significant. I assume that any OS-dependent behavior cannot be OS-independent.

I found something indicating that an Application Pool for .Net might not be efficient for PHP but there are probably solutions for that, you should research that.

Thanks for the input. I’ll see where it goes… maybe. I’m inclined to stay away. My experience regarding MS playing well with others has not been overly positive but it’s been a while. If I learn anything I will share it in the future.

Rather than running php directly on the server you could run it in a containerized linux environment using docker on windows.

I have no experience of setting up PHP on IIS, but there is one site I manage which is on IIS and using PHP.
As far as the PHP is concerned I don’t see any real defference.

Where I struggle is handling URLs in the absence of .htaccess. The IIS equivilent is web.config which does the same job, but the syntax is totally different, it’s in XML format.
This is probably mainly that I’m much more familiar with working with .htaccess and don’t know web.config too well.
But I find it much harder to find info and support for it. Eg, ask a question here about it, and no one knows because they don’t use IIS.
Sometimes after searcing for a solution the answers I find don’t work, not sure if it’s to do with different versions, or it’s just wrong.

To run PHP on IIS follow these steps:

Download and install PHPManagerForIIS-1.2.0-x64 Windows 7 OR
Download and install PHPManagerForIIS-1.3.0-x64 Windows 8, 8.1 OR
Download and install PHPManagerForIIS-1.4.0-x64 Windows 10

Download, install and run wpilauncher
Select PHP version you want to install

Open IIS service manager, check for Default Document (whether index.php is added or not, if not then add it)

Now you are ready to run PHP on IIS

There is a forum for asp.net that would be appropriate for this question but the moderators probably don’t want me to post the URL. Well, actually I did.

How does that help? The OP is about PHP on IIS not ASP on IIS.

ASP.Net is part of IIS. Did you look at the other forums? There are many questions and answers there about PHP in IIS.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.