Installing PHP on Windows XP
Posted: Fri Nov 29, 2002 3:52 am
Ok, undoubtedly I have mis configured my php. But i am sure I followed these instructions step by step. But I'm still gettin a File Download box when trying to view my info.php page.
Unzip the file you downloaded into a directory of your choice. I recommend C:\PHP and will refer to this directory from here onward, but feel free to choose another directory if you like.
Find the file called php4ts.dll in the PHP folder and copy it to the System32 subfolder of your Windows folder (e.g. C:\Windows\System32).
Find the file called php.ini-dist in the PHP folder and copy it to your Windows folder. Once there, rename it to php.ini.
Open the php.ini file in your favorite text editor (use WordPad if Notepad doesn't display the file properly). It's a large file with a lot of confusing options, but look for a line that begins with extension_dir and set it so that it points to the extensions subfolder of your PHP folder:
extension_dir = C:\PHP\extensions
A little further down, look for a line that starts with session.save_path and set it to your Windows TEMP folder:
session.save_path = C:\WINDOWS\TEMP
Save the changes you made and close your text editor.
On your Start Menu, choose Programs, Apache httpd Server, Configure Apache Server, Edit Configuration. This will open the httpd.conf file in NotePad.
All of the options in this long and intimidating configuration file should have been set up correctly by the Apache install program. All you need to do is add the following three lines to the very bottom of the file:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
Be sure the LoadModule line points to the php4apache.dll file on your system, and note the use of slashes instead of backslashes.
Save your changes and close Notepad.
Restart Apache by choosing Programs, Apache httpd Server, Control Apache Server, Restart on the Start menu. If all is well, Apache will start up again without complaint.
You're done! PHP is installed!
Is This Article Current?
Unzip the file you downloaded into a directory of your choice. I recommend C:\PHP and will refer to this directory from here onward, but feel free to choose another directory if you like.
Find the file called php4ts.dll in the PHP folder and copy it to the System32 subfolder of your Windows folder (e.g. C:\Windows\System32).
Find the file called php.ini-dist in the PHP folder and copy it to your Windows folder. Once there, rename it to php.ini.
Open the php.ini file in your favorite text editor (use WordPad if Notepad doesn't display the file properly). It's a large file with a lot of confusing options, but look for a line that begins with extension_dir and set it so that it points to the extensions subfolder of your PHP folder:
extension_dir = C:\PHP\extensions
A little further down, look for a line that starts with session.save_path and set it to your Windows TEMP folder:
session.save_path = C:\WINDOWS\TEMP
Save the changes you made and close your text editor.
On your Start Menu, choose Programs, Apache httpd Server, Configure Apache Server, Edit Configuration. This will open the httpd.conf file in NotePad.
All of the options in this long and intimidating configuration file should have been set up correctly by the Apache install program. All you need to do is add the following three lines to the very bottom of the file:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
Be sure the LoadModule line points to the php4apache.dll file on your system, and note the use of slashes instead of backslashes.
Save your changes and close Notepad.
Restart Apache by choosing Programs, Apache httpd Server, Control Apache Server, Restart on the Start menu. If all is well, Apache will start up again without complaint.
You're done! PHP is installed!
Is This Article Current?