Installing PHP with nginx-server under windows

By: Donald  

There is a way to install PHP with nginx-server under windows (current version is 0.7.60) 

Step-1 (install nginx server) 
Just extract nginx-0.7.60.zip in C:\nginx-0.7.60 

In C:\nginx-0.7.60\conf\nginx.conf uncomment and edit following lines 

        location ~ \.php$ { 
            root           html; 
            fastcgi_pass   127.0.0.1:9000; 
            fastcgi_index  index.php; 
            fastcgi_param  SCRIPT_FILENAME  C:/nginx-0.7.60/html$fastcgi_script_name; #this is the one line for edition 
            include        fastcgi_params; 
        }

and run C:\nginx-0.7.60\nginx.exe (the server is started) 

Step-2 (install PHP5) 
Just extract php in C:\PHP5 

Create (or modify) php.ini 

extension_dir="ext/" ;for extensions 

And run C:\PHP5\php-cgi.exe -b 127.0.0.1:9000


Archived Comments

1. acupuhua
View Tutorial          By: acupuhua at 2017-08-09 04:21:18

2. avezino
View Tutorial          By: avezino at 2017-08-09 04:07:35

3. php-cgi.exe return popup "is not a valid Win32 application"
but is is the x86 versi

View Tutorial          By: noob at 2013-06-30 09:47:38

4. Wow! thank you! after an hour of frustration! this works like a charm thanks!
View Tutorial          By: vaultdweller123 at 2012-02-14 02:49:44


Most Viewed Articles (in PHP )

Error: Length parameter must be greater than 0

Installing PHP with nginx-server under windows

Exception in module wampmanager.exe at 000F15A0 in Windows 8

.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

The new keyword and constructors in PHP

Perl's Encoding::FixLatin equivalent in PHP

Warning: session_start(): open .... failed - PHP error

PHP 5.1.4 INSTALLATION on Solaris 9 (Sparc)

Building PHP 5.x with Apache2 on SuSE Professional 9.1/9.2

Installing PHP 5.x with Apache 2.x on HP UX 11i and configuring PHP 5.x with Oracle 9i

Cannot load /usr/local/apache/libexec/libphp4.so into server: ld.so.1:......

Setting up PHP in Windows 2003 Server IIS7, and WinXP 64

error: "Service Unavailable" after installing PHP to a Windows XP x64 Pro

Function to force strict boolean values in PHP

Function to sort array by elements and count of element in PHP

Latest Articles (in PHP)

Comment on this tutorial