New Install APACHE2,PHP5,MYSQL5 under Win XP

Source: Internet
Author: User
Tags copy ini mysql mysql client mysql functions temporary file storage phpmyadmin zend
APACHE|MYSQL|PHP5 See Php,mysql, all out of a new version, want to taste fresh, try to install a bit, and then the installation process down, hope to learn some of the novice PHP help, the owner can consider fine

A simple process for new installation of Apache2,php5,mysql5,zend under Windows XP

First, download the address:
apache2.0.50:http://httpd.apache.org/download.cgi
Php5.0.2:http://cn2.php.net/get/php-5.0.2-win32.zip/from/a/mirror
Mysql5.0.2:http://dev.mysql.com/downloads/mysql/5.0.html
ZEND2.5.2:HTTP://WWW.ZEND.COM/STORE/FREE_DOWNLOAD.PHP?PID=13]

Software Installation I will not say, which only PHP under the ZIP package, directly decompression on it.
The order of installation is the order listed above, Zend I am the last to wait for all the operation is no problem after the install.

Second, the simple installation process:
(a) Apache:
Apache2.0.50 installation is very simple, I directly loaded him into the e-packing directory (I c disk is the system disk, D disk is the temp disk, I found that under Windows to take a separate partition to do temporary file storage to the speed of the system impact is not small, so that can improve the speed of the system to run, interested friends can try it out, installed After my Apache directory is E:\apache2.
(b) PHP:
I am directly uncompressed put into the e-disk PHP directory, so find the file will be more convenient.
(iii) Mysql:
Directly installed under the E:\MYSQL, its default directory is too long, is under the C disk, my C disk is in addition to the Windows file all the other things.
(iv) Zend:
After all the debugging was normal, I loaded the Zend under E:\program files\zend.

Third, the configuration process:
(i) http.conf

This file I changed a few places:
To run PHP directly as a module in Apache, I added two sentences to it:

CODE: [Copy to Clipboard]
LoadModule php5_module "E:/php/php5apache2.dll"
AddType application/x-httpd-php. php

I set up a www directory in the E:\apache2 directory to store My site files, in the http.conf to change such a word:
The DocumentRoot "E:/apache2/htdocs" changed to DocumentRoot "E:/apache2/www"

apache2.0.x in 1.3.x compared to 2.0.x default can not directly column directory, I feel bad, it changed:
Put DocumentRoot "E:/apache2/www" under the following sentence

CODE: [Copy to Clipboard]

Options FollowSymLinks
AllowOverride None


To

CODE: [Copy to Clipboard]

Options Indexes FollowSymLinks
AllowOverride None


Set the default character of Apache to Chinese Simplified:
Adddefaultcharset GB2312

To modify the default home page for a directory:
DirectoryIndex write the name of the file you want to set as the home page, such as: index.html index.php, etc.

There's no other place to move.

Note that in order for these configurations to take effect, you need to restart Apache

(ii) php.ini
Used to php4.x when the configuration is very simple, so I used PHP5 also directly so with, who knows that the MySQL can not use, said is unable to connect dynamic library, I carefully checked the PHP_ Mysql.dll obviously exist, can say can't find, this let me depressed for a long time, I unzipped php5 also useless, later in PHP install document found such a word: php_mysql.dll mysql functions php >= 5.0.0, requires Libmysql.dll (bundled)
So I found the reason ...
Configuration php5.0.2 is the case:
Copy Php.ini-dist to C:\windows under the name of PHP.ini (installed PHP have done it)
And then modified a few places:
Extension_dir = "E:\php\ext" (specifies the directory of the Dynamic Connection library, where php5 and PHP4 differ in that its dynamic Connection library directory has changed, which is described in detail in its document structure)
Then remove the semicolon in front of the following sentences
; Extension=php_dba.dll
; Extension=php_dbase.dll
; Extension=php_filepro.dll
; Extension=php_gd2.dll
; Extension=php_imap.dll
; Extension=php_mysql.dll

Next, some file uploads and maximum memory usage restrictions are modified:
Memory_limit = 20M
Post_max_size = 20M
Upload_max_filesize = 20M
There's nothing else to change, and here's a modified php.ini to restart Apache after

The next point is very important is to copy the PHP directory under the Libmysql.dll and Libmysqli.dll to Windows/system32, if not to do so, the MySQL dynamic Connection library can not load properly.

(iii) MySQL and Zend Configuration
Now Apache and PHP have been configured, in the browser input localhost to see the results, run successfully, and then enter the Localhost/phpmyadmin look also successful. Depressed, phpMyAdmin tip error message:

QUOTE:
MySQL return:

#1251-client does not support authentication protocol requested by server; Consider upgrading MySQL client

Strange, I clearly installed the latest version of MySQL How the client version is too low, really depressing ah
Put a bit of this, after many tests are still unsuccessful on the first give up a bit, played a KOF97
Then, with the help of CCF Panda and Im286.ceo, finally found the reason:
Outdated CEO: "Upgrade Client
New version of MySQL uses a new password authentication method
Using Old_password when setting up a MySQL password can solve the problem.
CCF Panda: "Use Old_password to reset your password".
Thanks to these two friends, the specific solution is as follows:
Since I don't know how to upgrade the client, because the server and client are bundled up under Windows, I use the Old_password method:

QUOTE:
mysql> UPDATE mysql.user SET Password = Old_password (' newpwd ')
-> WHERE Host = ' some_host ' and User = ' some_user ';
mysql> FLUSH privileges;

Then browse "Http://localhost/phpmyadmin", OH yeah! Test success!



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.