, , , , , ,

PHP: Manual Installation on Windows Systems

RE: php-5.1.2-Win32.zip

In the past, on a few different Windows XP systems, I have installed PHP as an Apache module, and i’ve been thrilled by achieving a functional Apache / PHP configuration without having to troubleshoot as i simply never experienced any problems with the installations. However, on this particular XP setup, Apache and PHP ceased to function properly in this unique situation– Apache was installed on C: and PHP on a slave HDD, E:, then having removed E:, attempting to install php on C: was problematic, so i decided to try my first go at PHP / IIS configuration.

it’s not without a bit of shame that I report that I proved to be unsuccessful in my attempt to use the following method for installing PHP on Windows XP / IIS 5.1. As stated below, it is preferred to install PHP as a SAPI module, but after several attempts, tweaking configuration settings here and there each time, every time I attempted to load a .php file on localhost (IIS, serving pages from c:inetpubwwwroot, where phpinfo.php resided in the wwwroot directory), both Internet Explorer and Firefox prompted to save the file instead of parsing the php code and displaying a browser view (the expected result, of course, had the PHP 5 installation been functional). But, below are the instructions, copied verbatim from the manual at php.net, which i followed, step-by-step, to the letter (as far as i’m aware). At risk of overstating the obvious, there must be some XP / IIS / PHP dynamics discussed neither in Chapter 6 of the PHP.net documentation, Installation [of PHP5] on Windows Systems, nor in the IIS documentation which bear upon the functional aspects of these two popular softwares’ interaction with each other. I’m not one who’s afraid to, or who typically has difficulty finding, verifying, and tweaking advanced settings of the OS or php, Apache, etc., but i really felt at a loss in this situation. Admittedly, i could probably benefit from a more thorough study of IIS itself, which would likely require more thorough understanding of Windows XP’s inner wiring– which in and of itself makes me cringe a little at the thought! I’m at the point where i’m ready to begin study of Linux based systems, and not very interested in rehasing studies of XP. ah, but i digress, as usual! hopefully i’ll come back to the instructions below some day soon and acheive success– in round two! *ding*
(end commentary)

Server modules provide significantly better performance and additional
functionality compared to the CGI binary. The CLI version is designed to
let you use PHP for command line scripting. More information about CLI is
available in the chapter about using
PHP from the command line


The SAPI modules have been significantly improved as of the 4.1 release,
however, in older systems you may encounter server errors or other
server modules failing, such as ASP.

The CGI and CLI binaries, and the web server modules all require the
php4ts.dll (php5ts.dll) file to
be available to them. You have to make sure that this file can be found
by your PHP installation. The search order for this DLL is as follows:

  • The same directory from where php.exe is called,
    or in case you use a SAPI module, the web server’s directory (e.g.
    C:Program FilesApache GroupApache2bin).

  • Any directory in your Windows PATH environment

To make php4ts.dll / php5ts.dll
available you have three options: copy the file to the Windows system
directory, copy the file to the web server’s directory, or add your PHP
directory, C:php to the
PATH. For better maintenance, we advise you to follow
the last option, add C:php to the
PATH, because it will be simpler to upgrade PHP in the
future. Read more about how to add your PHP directory to
PATH in the corresponding FAQ entry (and
then don’t forget to restart the computer – logoff isn’t enough).

PHP.NET – “the Manual”
Ch. 6 – Installation on Windows Systems

Whatchu do

Leave a Reply

Your email address will not be published. Required fields are marked *