I was busy installing softwares at my new computer. The LCD monitor of my Dell laptop stopped working normally. It’s time to change to a new computer. I was using Windows XP because I am not interested in try new but unstable softwares. This time I have to change to Vista since Xudong warned me it’s hard to find some device drivers if I continue to use Windows XP.
I never know it’s so hard to let open source softwares running on Vista. I am not the only person who meet so many problems. Whenever I met the problem, I always found many people had already met the same problems. Fortunately I could find the solutions for the problems although some of them didn’t work for my computer. Here I’d like to share my installations.
1. Installation sequence
My installation sequence is Apache -> PHP -> MySQL -> phpMyAdmin. My friend recommended me to install PHP before Apache. From my experience (I tried both), the sequence between them doesn’t matter.
2. Install Apache
Download Apache from http://httpd.apache.org/download.cgi. At first I installed Apache 2.2.8. But I downgraded to Apache 2.0.63 when I found PHP 5.2 couldn’t work on Apache 2.2.8.
2.1. Problems
1. Cannot stop or restart apache.
2. Cannot edit httpd.conf.
3. Cannot load php5apache2.dll.
2.2. Solution
1. Download apache_2.0.63-win32-x86-no_ssl.msi.
2. Turn off UAC (optional if you don’t want to restart computer and don’t think it’s annoying that you get continuous comfirm windows during the installation.).
1. start ->control panel
2. ->user accounts and family safety
3. ->user accounts
4. ->turn user account control on or off
5. uncheck “user account control”
6. click OK
7. restart computer
3. Install Apache as administrator.
1. start ->accessories
2. right click command prompt -> run as administrator
3. go to the diretory where you save apache_2.0.63-win32-x86-no_ssl.msi
4. type “msiexec /i apache_2.0.63-win32-x86-no_ssl.msi”
5. follow the instruction to install Apache
4. Visit http://localhost/ in the browser to test Apache. If Apache is installed successfully, you will get:
It works!
5. Edit httpd.conf if you want to change config parameters.
1. start ->accessories
2. right click notepad -> run as administrator
3. edit and save httpd.conf in notepad
4. restart Apache to let config go into effect
3. Install PHP 5.2
1. Download PHP zip package from http://www.php.net/downloads.php.
2. Unzip the zip file into a dirctory of your choice.
3. Save php.ini-recommended as php.ini.
3. Add following script in httpd.conf.
LoadModule php5_module “c:/php/php5apache2.dll”
AddType application/x-httpd-php .php
PHPIniDir “C:/php”
(suppose you extract php package at C:\)
4. Install MySQL 5.0
1. Download MySQL 5.0 setup.exe from http://dev.mysql.com/downloads/mysql/5.0.html#win32.
2. Unzip the zip file and run setup.exe.
3. Follow the instructions to install MySQL.\
4.1. Problem
1. Fail to open “MySQL server instant config wizard”.
1. Download ResourceHacker from http://www.angusj.com/resourcehacker/.
2. Run ResourceHacker and open “C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe”
3. Edit last resource entry (24 -> 1 -> 1033), change level=”asAdministrator” to level=”requireAdministrator” .
4. Click “Compile script”.
2. Fail to connect MySQL in PHP.
1. Uncomment “extension=php_mysql.dll”.
2. Print phpinfo() to check Apache PATH. If php installation directory is not included in the path. You need copy libmysql.dll at php installation directory to any directory included in Apache PATH.
5. Install phpMyAdmin
1. Download phpMyAdmin from http://www.phpmyadmin.net/home_page/downloads.php.
2. Unzip the zip file in your web server’s document root.
3. Create config.inc.php file and edit as following:
<?php
$i=0;
$i++;
$cfg[’Servers’][$i][’user’] = ‘root’;
$cfg[’Servers’][$i][’password’] = ‘cbb74bc’; // use here your password
?>
Read document.html at phpMyAdmin directory for more information.
5.1. Problem
Get error message “cannot load mysql extension, please check your PHP configuration”. Refer to problem 2 in section 4.1 for solution.
Finally I got them all runing on Vista. Good luck!