![]() |
Installing Wordpress On Windows (2000 and XP) -Part 2 Installing PHPThe next step is to install PHP. I used version 4.4 as I already had the download on my machine from an install last year. Here is the link to the download page. I would suggest you use the 4.6 version (march 2007). You may find that there is a windows installer and a zip package. You should get them both as the installer package doesn't contain all of the files you may need. I prefer to use the installer as the setup is easier and I'm not worried about security as its on a local network anyway. If you don't get an installer (there isn't one with the 4.6) then you need to extract them using winzip which puts them in the required folders under a directory called php-4.4.6-win32. Just rename it to php4. For php4 you will need to copy all of the files from the sapi and dls folders to the php4 folder. Now you need to edit the httpd.conf file. You may need to modify the directories like C:\php to reflect your configuration and Note that the configuration file httpd.conf uses forward slashes!! You will normally find the http.conf file in program files\apache group\apache2\ ,but it depends on how you did the install. Blue highlight are for a php4 configuration which is what I did
In addition:
Tells apache to treat files with a .php extension as scripts. If you want apache to process normal .htm or .html files as scripts (often done as some don't like using the .php extension) the add them as well like this.
Next locate the directoryIndex line which should read like this DirectoryIndex index.html index.htm.var change it to this DirectoryIndex index.html index.htm.var index.htm index.php This tells apache what file to serve if the visitor only types the directory path e.g. If you type www.build-your-website.co.uk and not www.build-your-website.co.uk/index.htm then Apache will server either:-index.html, index.htm.var, index.htm or index.php depending on which one it finds in the directory. If more than one is present then the order they appear in the DirectoryIndex statement is the order of preference. PHP.INI Configuration Filephp.ini is the main configuration file for php. Locate the php.ini-recommended. This doesn't need editing yet but you need to rename it to php.ini and place it in the windows search path. This is either c:\windows or c:\winnt depending on whether you are using XP or windows 2000. Note: I prefer to make a copy rather than renaming it just in case I need to go back to the original. To do that just open it with Notepade and use save as to save it as php.ini. (again beware that it is php.ini.txt) You should also locate the php4ts.dll or php5ts.dll (depending on the php version) and copy it to the c:\winnt\system or c:\windows\system directory. Testing The InstallTo test you need to place a php file on the web server and access it. The standard test is to use a phpinfo.php file which will display the server setup details. This is a simple file with single entry. Here it is: <?phpinfo()?> Just open notepad type in the above and save as phpinfo.php. Make sure that you don't save it as phpinfo.php.txt. This is a common mistake as Windows XP turns off file extensions by default. So enable them by opening a folder go to Tools>folder options and click the view tab an untick the hide extensions for known file types box. Place the phpinfo.php in the htdocs folder and open a web browser and type http://localhost/phpinfo.php You should see something like this :
Now its time to Install MYSQL
|
||||
|