http://anderson-web.blogspot.com/2008/01/install-windows-vista-apache-22-mysql.html
I spent some hours installing Apache-PHP on Windows vista, and I think it will be helpful to publish the detail instructions.
Suggestion: It is always a good practice, especially if you are a beginner, to make a backup of the configuration files. For example you can follow the pattern: filename-YYDDMMhhmm.ext
Installing Apache HTTP Server (2.2.6)
Download Apache 2 binaries for windows and save it in the desktop - for example. This version has fixed the problems with the Apache Monitor.
If you have any web server, like IIS, or other application using the port 80, stop it before start the installation. Type the following at the prompt for find out if the port 80 is already taken (look for the pattern '%s':80 in the second column), c:\> netstat -ao find /i "listening"
Open the command window with administrator privileges. Go to start > All programs > Accessories. Right-click on Command Prompt and select run as administrator. Note: It is not necessary to stop the User Account Control (UAC).
Run the setup from the command window just opened. Browse to the directory where you save apache, c:\users\user-name\desktop in this case, and type in the command prompt, c:\users\user-name\desktop> msiexec /i apache_2.2.6-win32-x86-no_ssl.msi
Install Apache in its default location, C:\Program Files\Apache Software Foundation\Apache2.2 , or choose one appropriate for you.
When the wizard ask you for the domain, server name, and administrator email write the appropriate values if you are installing a production server, otherwise write the values suggested between parenthesis ().
Choose the default server on port 80 for all users option.
When the install finishes you can try http://localhost/ in the web browser and it should show you "It works". :)
For stop, start, and restart Apache HTTP Server, go to Start > All programs > Apache HTTP Server 2.2.6 > Control Apache Server, and right-click on the desire option and select run as administrator.
Troubleshooting: The log file of install and general errors is located on the folder C:\Program Files\Apache Software Foundation\Apache2.2\logs. You can also use the option on Start > All programs > Apache HTTP Server 2.26 > Configure Apache Server > Test configuration to see if there is any error on the configuration file of Apache, httpd.conf.
Installing PHP (5.2.5)
Download the windows binaries zip package of php. I tried to use the installer, but I got an error configuring PHP with CGI as well as with module; something like "...Parent: Received restart signal -- Restarting the server....Child 8448: Exit event signaled. Child process is ending" in the error.log file. So we proceed with a manual installation. Anyway, manual installation is always recommended because there is more things to learn :).
Unzipped the files in c:\php. A location without spaces is preferred. (You could read the install.txt file for further information about it).
Copy the file php.ini-recommended to a new file named php.ini
Go to start and right-click on computer and click on properties. In the new opened window, click on Advanced system settings, on the left panel, and the System properties window will be opened. Select the tab advanced, and click on Environment variables button. In the system variables panel, look for the Path variable and click in the Edit button. Add at the end of the Path environment variable, the path were PHP is installed, ...;C:\php\ . This indicates the path of the file php5ts.dll, the main dll of PHP.
Open the notepad or your favorite text editor with administrator privileges and open the httpd.conf located in C:\Program Files\Apache Software Foundation\Apache2.2\conf. Append the following lines to the file httpd.conf at the end, to configure PHP as a module.
PHPIniDir "C:/php/"
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
Restart apache. Go to Start > All programs > Apache HTTP Server 2.2.6 > Control Apache Server, and right-click on the restart option and select run as administrator.
Do the following for test the Apache-PHP integration. Create a file called test.php in the folder C:\Program Files\Apache Software Foundation\Apache2.2\htdocs with he content:
Open the web browser and go to http://localhost/test.php. You should see general information about the current state of the PHP installed.
Next, I will publish general additional settings that I commonly use to personalize the developing environment.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment