Installing PHP (Apache and IIS) By The_deViL | Niklas Bivald Thursday, 08 August 2002, 22:13 GMT By: Niklas Bivald (The_deViL) (Webmaster@bivald.nu) Free-lance webdesigner and php coder for roothack.org I like to thank to phpportalen.net (swedish) thats were I learnt this. If you are Swedish I strongly recommend going there. The guides are pretty much the same since I learned it from the site. So again, thanks to phpportalen.net for everything Note: This is just an quick step-by-step. Since it was a while ago I did it the settings may have changed (Updates and such) but I am sure you can figure it out Install PHP (Both apache and IIS) Download php from www.php.net. There is a few diffrens between the versions, there is self-installers/configures. But it is better to do it yourself according to me. It is really simple. 1. Unzip the file and its content to C:\PHP (Default) 2. Find the file php.ini-dist in C:\PHP (Default) and copy it to you windows folder (C:\Windows, C:\winnt40 or C:\WINNT depending on os). Rename it to php.ini 3. Change the value to doc_root to the document root you have. Example: doc_root = "C:Program FilesApache GroupApachehtdocs" (Were you have your www-folder, Default for iis is c:\inetpub\wwwroot) 4. Edit value extension_dir to the folder were the PHP Dll:s is. These PHP dll:s is the dll's that is in the PHP cat and starts with php. Should be: C:\PHP (default catalog) What we now need to do is to config the webserver to know how to handle the php files. Apache: 1. Open your httpd.conf file ( C:ProgramApache GroupApacheconf ) by default I think. This is the lines that needs to be added and then to the bottum): ScriptAlias /php/ "C:/php/" AddType application/x-httpd-php .php .php3 .phtml Action application/x-httpd-php "/php/php.exe" Remember, apache needs to be restarted everytime any of the confs is changed IIS: This could be trickier since it would be better with screens, but I have none. And no time either. Note: the names may change 1. Open "Internet Services Manager" ( Start > Settings > Control panel > Administrative tools > Internet services manager 2. Choose Default web site by clicking in the meny to the left 3. Rightclick on it and choose "properties" 4. Click on the tab "home directory", "virtual directory" or "directory" depending on vs 5. Click on "configuration" and then the tab "App mappings" 6. Click on "add" and then fill in the first textform with this: C:PHPphp.exe %s %s (The %s %s is very important!) 7. In the box (Exenstions box) you write the pages that should be defined and "php files". Recomended: .php , .php3 and .phtml. You need to redo the latest step for every file extension you add Then just restart and it should work. Take care. // The_deViL