This is about installing PHP 5.2.4-Win32 on IIS 7,the new Web Server running on Vista 32 bit.(If you have Apache read this Installing PHP with Apache on Vista) You can visit the PHP website and download the php version php-5.2.4-Win32.zip for the manual installation not the windows installer version,which,I believe is encountering some problems..As IIS 7 is not installed by default on Vista,you will have to install it as well.See this step by step tutorial to learn how to do it.How to install IIS 7
- Log on as Administrator First step ,assuming you have Windows Vista installed on C:\ drive,unzip the file in this directory C:\PHP .
- Then open the newly created PHP folder and copy the file php.ini-recommended and rename itphp.ini jn the same directory,this will be the configuration file for the PHP engine.To rename this file I suggest to open php.ini-recommended and click File .> Save as ,then in the dialog box type only php and in Save as type choose all files.
- To tell PHP to load particular modules when it starts ,open php.ini with notepad or any text editor ,find extension_dir and change it as extension_dir = "C:\PHP\ext" and then find Dynamic Extension,in this section there are all the modules Find out which one you need from the PHP website and to enable it just remove the ";" in front of it.For example for MySql remove the ";" before "extension=php_mysql.dll "and "extension=php_mysqli.dll". To enable the PHP graphic library remove the ";" before "extension=php_gd2.dll"
Save and close the php.ini file.
- I know that someone ,at this stage,recommends to copy php.ini and few dll to the Windows/System32 folder,but I believe it's a lot better keep all the files in the same directory,consider if you have to change some setting in the future,and you've forgotten where php.ini is or any other php file.To keep all the files in the same directory you have to tell Windows where PHP is.Click Start,Right-click Computer and choose Properties a window like below opens,click on Advanced System Settings on the left.
- Then,in the window like the one below, click on Enviroment Variables at the bottom
- In the Enviroment Variables window,under System variables, scroll down and look for the variable Path ,click on it to select it and press edit.
- In the new window(fig 3) on Variable value go to the end, and type a semicolon and the path to the PHP folder.For example," ;C:\PHP " .Then another semicolon and the path to the extensions. Example " ;C:\PHP\ext " When you finish press OK.
- You back on Enviroment Variables(fig 2)..This time click on New because you'll have to create a new variable.A window like fig 3 opens,this time will be empty,type in the Variable name " PHPRC " and in the Variable value type the directory where PHP is installed " C:\\PHP " and click OK.This is to tell the System where php.ini is located,so you can leave all the php files in the same folder.This part is very important,when you finish installing and you run phpinfo in your browser,check in the first part you should be able to read something like this :
Loaded Configuration File | C:\PHP\php.ini |
where C:\PHP\php.ini is the path we are talking about. Now press OK and close the Envirement Variables dialog box
Fig 3
Now you should reboot your computer to allow Vista to load the new setting,but I recommend to finish the second part,first,and then restart Vista.
continue pt.2
source by:http://www.maniacomputer.com
0 comments:
Post a Comment