I am having a bit of difficulty installing Apache & PHP on Windows 98 and configuring Apache to interpret PHP. First of all I downloaded the following Apache version: apache_1.3.27-win32-x86-no_src.msi. I saved the file to my C: drive in a folder called Apache. I double clicked the file I had just downloaded in order to start the installation process.
During the installation procedure the wizard prompted me to enter a Network Domain, where I typed "localdomain" & a Server Name where I typed "localhost". After this I selected a radio button to make Apache 'Run when started manually'.
I tested the installation by opening a web browser and typing ' The Apache server page was displayed correctly as expected. To start the Apache server I go to the Windows Start Menu, select 'Programs', then select 'Apache HTTP Server', and select the option 'Start Apache in Console'. This brings up a DOS window stating "Apache/1.3.27 (Win32) running...". Is this a correct way of starting the Apache server?
To stop Apache I simply click the cross in the right-hand corner of the DOS window. Is this the correct way of stopping the Apache server?
Now I come to the installation of PHP. I visited the website and went to the section called ‘Windows Binaries’ and downloaded the zip file called PHP 4.3.0 zip package. I downloaded the zip file to my C: drive in a folder I named php. I then extracted all the files in the zip file to the same folder. I copied one of the extracted files called ‘php.ini-dist’ to C:\WINDOWS and renamed it as ‘php.ini’.
Finally I had to configure Apache for PHP. (This is where I am having major problems.) I did this by going into the following file C:\Apache\conf\httpd.conf. I opened the httpd.conf file in Notepad (a text editor). I went to the section of the file that had ‘AddType’ instructions. I inserted the following four lines:
“AddType application/x-httpd-php .phtml .php .php3 .php4”
“AddType application/x-httpd-php-source .phps”
“ScriptAlias /php/ “c:/php/”
“Action application/x-httpd-php “/php/php.exe”
Are the four lines correct? The full location for the php.exe file is: C:\php\php-4.3.0-Win32. I am not sure whether the last ‘Action’ line that I added was correct. The main question I have is what additions have to be made to the php.ini file that I copied into C:WINDOWS? There is something in the php.ini file called doc_root and user_dir in a section called Paths and Directories. Should they both be assigned something?
To carry out a test I created a PHP script in Notepad as follows: ‘<?php phpinfo(); ?>’. I named the file as phpinfo.php and saved it to the ‘htdocs’ folder in C:\Apache. To run the script I opened a web browser and typed ‘ The result was that ‘<?php phpinfo(); ?>’ was outputted to the screen. This is not correct. The problem is something to do with the configuration. Please can someone help me?
During the installation procedure the wizard prompted me to enter a Network Domain, where I typed "localdomain" & a Server Name where I typed "localhost". After this I selected a radio button to make Apache 'Run when started manually'.
I tested the installation by opening a web browser and typing ' The Apache server page was displayed correctly as expected. To start the Apache server I go to the Windows Start Menu, select 'Programs', then select 'Apache HTTP Server', and select the option 'Start Apache in Console'. This brings up a DOS window stating "Apache/1.3.27 (Win32) running...". Is this a correct way of starting the Apache server?
To stop Apache I simply click the cross in the right-hand corner of the DOS window. Is this the correct way of stopping the Apache server?
Now I come to the installation of PHP. I visited the website and went to the section called ‘Windows Binaries’ and downloaded the zip file called PHP 4.3.0 zip package. I downloaded the zip file to my C: drive in a folder I named php. I then extracted all the files in the zip file to the same folder. I copied one of the extracted files called ‘php.ini-dist’ to C:\WINDOWS and renamed it as ‘php.ini’.
Finally I had to configure Apache for PHP. (This is where I am having major problems.) I did this by going into the following file C:\Apache\conf\httpd.conf. I opened the httpd.conf file in Notepad (a text editor). I went to the section of the file that had ‘AddType’ instructions. I inserted the following four lines:
“AddType application/x-httpd-php .phtml .php .php3 .php4”
“AddType application/x-httpd-php-source .phps”
“ScriptAlias /php/ “c:/php/”
“Action application/x-httpd-php “/php/php.exe”
Are the four lines correct? The full location for the php.exe file is: C:\php\php-4.3.0-Win32. I am not sure whether the last ‘Action’ line that I added was correct. The main question I have is what additions have to be made to the php.ini file that I copied into C:WINDOWS? There is something in the php.ini file called doc_root and user_dir in a section called Paths and Directories. Should they both be assigned something?
To carry out a test I created a PHP script in Notepad as follows: ‘<?php phpinfo(); ?>’. I named the file as phpinfo.php and saved it to the ‘htdocs’ folder in C:\Apache. To run the script I opened a web browser and typed ‘ The result was that ‘<?php phpinfo(); ?>’ was outputted to the screen. This is not correct. The problem is something to do with the configuration. Please can someone help me?