FastCGI is a newer and better version of CGI created in the mid-90s to address these issues. CGI also can’t handle database connection reuse or in-memory caching very well. This can become quite costly in terms of performance if you receive many requests. The PHP engine will then return the output that IIS should return to the client.ĬGI starts and stops the application for every request. In our case, this means that IIS receives the incoming web request, and then passes that on to our PHP engine (a simple Windows executable). It is important that you enable CGI in your IIS instance. Once you have installed IIS, navigating to should render the default IIS page: What is CGI/FastCGI?ĬGI is short for Common Gateway Interface, and is a standard protocol for web servers to execute applications on the server. When you are prompted to select the server roles, be sure to enable CGI: On the Server Roles page, select “Web Server (IIS)”: Open the Server Manager application and go through the “Add Roles and Features” wizard. On Windows Server, there are more steps involved. Once the dialog is open, check “Internet Information Services” and “CGI.” The easiest way to open this dialog (on Windows 8 and up) is to open the Start menu and search for “windows features.” There, you should then be able to open this dialog. On a non-server edition of Windows, this is usually done in the “Turn Windows features on or off” dialog. How to do depends on the specific version of Windows that you have. If your machine isn’t running IIS yet, you will need to activate it. NET, Java, PHP, Node.js, Ruby, and Python. Try Stackify’s free code profiler, Prefix, to write better code on your workstation. We’ll look at installing PHP on IIS, and you’ll see that it isn’t that hard. Or you prefer the reliability of a solution provided by the big company that Microsoft is. Maybe you even want to use another database technology. If you already have websites running in IIS, it’s a good idea to run your PHP websites there too. They run Apache as a web server and use MySQL or MariaDB as a database server. However, these two options make some additional choices for you. There are options to run PHP on Windows like XAMPP or WampServer. IIS only runs on Windows, but keep in mind that running PHP on IIS is not the same as running PHP on Windows. You need to integrate with other Windows services like Active Directory, Windows file shares, or Microsoft Exchange.You develop Windows-only solutions locally on IIS, and also need to work on PHP solutions.You have to run ASP.NET or classic ASP applications.You have a great support contract with Microsoft.Your system engineers have more experience with IIS.Most instances of PHP applications run on an Apache or Nginx web server, but there are valid reasons to choose IIS over other options: IIS is the third most popular web server (after Apache and Nginx), running about 8.7% of all websites. IIS 10 added support for HTTP/2, HSTS, and containers. Since version 7, IIS has had a modular architecture, allowing us to add only the functionality we need. In this article, I will be using the full version of IIS 10. IIS Express only supports HTTP and HTTPS protocols and by default, merely supports local requests. There is a lightweight version of IIS called IIS Express that can be installed separately, but is intended for development purposes only. The latest version, IIS 10, comes bundled with Windows and as such, IIS is a free product. IIS (Internet Information Services) is Microsoft’s web server and has been around since 1995. The advantages of PHP (like a great community and fast results) greatly outweigh the possible performance drawback most users won’t notice. Incidentally, we will look at one such solution (WinCache) in this article. This might seem inefficient, and it would be if the engine had to do so for every request, but some smart people have created optimizations as sufficient workarounds for most use cases. The Zend Engine interprets the PHP code and compiles it on-the-fly to a format it can execute. Even though alternatives exist, the Zend Engine is the standard implementation and the only one regarded as “feature complete.” It’s also used as the name for the underlying engine that runs that application. PHP is a programming language used for web development. PHP was originally an acronym for personal home page, but now it’s short for PHP: Hypertext Processor. Luckily, getting PHP to run on IIS isn’t very hard, and gives you access to all the great PHP work that this community has produced. Running PHP on IIS might not seem like a logical choice, but it can make sense.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |