Installing PHP (ISAPI) in Windows 2000 Professional (#10

  

10) Tweak the Window's System Registry 



Tweaking the system registry file can be destructive and not recommended for the weak at heart because no one (not even we) will take any responsibility if the changes you attempt do not work out as hoped for.  But the PHP 4.4.1 installation procedure for Windows requires changes/additions to the system registry (either directly or indirectly).  It should be clearly stated that no one (but yourself) will take responsibility if your attempt to change the registry causes your  system to stop working, work erratically or worse, destroys your important files/data.  If you have no confidence in what you might be required to do to tweak the registry, don't do it -- ask a friend who knows enough to know what not to do to avoid or minimize risks.

There are several ways to tweak the registry.  The most direct (and consequently the most risky) is to run Window's built-in registry editor (regedit.exe) and interactively edit the contents of the registry.  This windows utility program allows you to add, delete or make changes on any entry in the registry.  We will not attempt to do it this way for obvious reason.

Another way to add or make changes to a registry is to first create or edit a text file, give it a name with a file extension of ".reg".  When you double click such a file, the contents of the text file will be entered into the registry.  What you type into the text file is crucial because if you make mistakes, such mistakes will be committed to the contents of the registry.  The folks at PHP.NET have been kind enough to provide a "reg" file template to make this procedure easy, but we should be careful not to make any mistakes, nonetheless.  So on we go...


Open an empty Notepad window (A)

then open the PHP folder (B) and select the file named pws-php4isapi.reg (C). This file is the template which we will edit to suit our particular PHP installation environment.

Drag and Drop the pws-php4isapi.reg file (C) into the Notepad window (A)

so that the contents of the .reg file is opened in Notepad (A).  The text is long so you will need to drag Notepad's horizontal scroll bar to the right to see the rest of the text. 

Near the end of the text you will see [PUT PATH HERE] (D).    In place of these words ([PUT PATH HERE]), type C:\\PHP  . The double back slashes (\\) is intentional -- you should type the path exactly as shown with the two back slashes.   There should also be NO spaces between PHP and \\php4isapi.dll so that the full path between the double quotes (") should read C:\\PHP\\php4isapi.dll .

This is how it should look ( (A), with the path underlined in red only as an attention marker) without any spaces between any of the double quotes, letters, colon, and back slashes.  Also, you may have noticed some weird upright rectangle characters such as at the very end of the text -- those rectangles are important so do not remove and edit them.  Actually, except for the changes to the path itself, no other parts of the text should be touched or changed.

If all is exactly as described above, you can safely click on Notepad's "File" and "Save" menu choices and close Notepad.  

Back in the PHP folder window (B), we can now double click on the pws-php4isapi.reg file (C)  to make the needed addition to the systems registry...

And Window's Registry Editor (E)  will politely seek your confirmation if you really want to add the information from the reg file into the registry.  You can click on the "Yes" button (F) to complete the operation.



At this point, we believe we have actually finished installing PHP 4.4.1 in Windows 2000 Pro running IIS5 (PWS) as ISAPI.    Because we have just added some entries to the systems registry, it is obvious we will need to restart Windows before anything else.

So what next after a reboot?

According to the PHP manual, we can (in fact, should) skip the step involving "ISAPI Filter" if we do not want PHP to perform the HTTP Authentication.  Not knowing exactly whether we want PHP to do the HTTP Authentication or not, we decided to bite the bullet and perform the "ISAPI Filter" installation procedures anyway (before testing the PHP installation at this stage).  Our purpose for installing PHP in W2KPro cum IIS5 (PWS) was to evaluate how these software combination perform together.


Previous Step: 9B) Configure PWS (Personal Web Server) to use PHP ISAPI  (continued...)

Next Step      : 11A) Set the ISAPI Filter

Previous Next

Copyright © 2006 Chiba, Japan, asiawide.or.jp (All Rights Reserved).