Monday, September 14, 2009

HOW TO RUN PHP ON WINDOWS IIS SERVER


HOW TO RUN PHP IN WINDOWS?


WHAT IS PHP?

PHP (PREPROCESSOR HYPERTEXT LANGUAGE) or there are many acronyms of this language it was actually discovery of Rasmus Ledorf who made this language for the purpose for tracking the users who visit his online resume but actually realized many more uses of it and it was further developed to a server side language with adding functionality of object orientation and compatible on zend engine (not much known about that ). This language at its time was a tough competitor in server side and it still competing although people usually blame about its clumsiness and less implementation of object orientation approach.

WHY PHP?

Anybody may ask why php they could prefer ASP.NET or JSP or AJAX instead but what I feel and usually answer to the people that if you have a big high processing power commercial server for whom you write programs then its ok
to go with the ASP and JSP but if you want compatibility with the multi platform like the less costly Ubuntu servers for commercial or your personal web site hosting (as word press gaining popularity in bloggers it is written
in php) so you can write its script functionality yourself or want to add some cool stuff you will thank to it with its feature of PEAR DB to connect to databases like mysql (most database administrative tools available for mysql)
. So its depend upon the people's personal and professional choices, if you are good in .net then you can have faster site development or likes java's designing and thread features then you will be happy with JSP but if you want it simple and short php can be good option.











THE FOLLOWING ARE THE STEPS FOR RUNNING PHP SCRIPTS ON IIS WINDOWS XP (FOR PCs)

1.First you had to ensure that the IIS is installed on your XP (as I am a PC user
this is for simple users only not for other OSs ) by typing the URL in your web
browser "http://localhost" and you will see the default page.
2. If it is there it is good otherwise autorun your XP bootable select the
windows component and select the check box for IIS and install it (NOTE: you can use your iis server for other services like SMTP programs testing or as a simple server for web hosting for your personal use, the PC game OPEN ARENA
from QUAKE uses it as gaming server). After installation check the localhost as in step 1.
3.Now install the php software (you can get the latest version from php.net) install all the needed optional features you need such as it provides compatibility with many other extensions and PEAR DB select according to your requirement and in the server option select IIS4+CGI so that the php will get installed for IIS.
4.Now how to run php? You can write your php script with a simple text editor but with an extension .php only and then place it into Inetpub/wwwroot/ . The Inetpub folder is created in your windows drive when IIS was installed and access your php script through the web browser by URL "http://localhost/
. You can save the script with any name and yes as I told above you can simply place a file in wwwroot folder and access the
file through web browser by URL "http://localhost/
". I used it for accessing my personal pdf ebook library. So here is a simple script in php you can try.










IMPORTANT DISCLAIMER
All the above information is may not be correct as I m still learning php and not have any industrial experience and the procedure and methods defined above are may be not standard (as they work better in normal circumstances ) can harm your hardware or software so author will not be responsible for any damage caused. If you encounter any spelling or grammatical or any knowledge related mistakes please forgive me and notify me and feedbacks about this blog and query regarding more info or using php on linux are invited.

No comments:

Post a Comment