Simple installation of apache2, PhP5, mysql5, and Zend in Windows XP

Source: Internet
Author: User
Tags mysql functions php source code

Introduction: This is a detailed page of simple processes for installing apache2, PhP5, mysql5, and Zend in Windows XP. It introduces the knowledge, skills, and experience related to PhP, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 324010 'rolling = 'no'>
I ,:

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]

I won't even mention the software installation. Only the zip package under PHP can be decompressed directly.

The installation sequence is the sequence listed above. Zend is installed only after all running tasks are complete.

Ii. simple installation process:

(1) Apache:
The installation of apache2.0.50 is very simple. I directly mounted it to the root directory of the E disk (I use the C disk as the system disk and the D disk as the temp disk, occasionally, using a partition in Windows to store temporary files does not affect the system speed. This can improve the system running speed. If you are interested, try it ), after installation, My Apache directory is E: \ apache2.

(2) PHP:
I directly decompress the package and put it under the PHP Directory of the E disk, which makes it much easier to find the file.

(3) MYSQL:
Directly mounted to E: \ mysql. Its default directory is too long. It is stored on drive C. Even drive C is not stored except Windows files.

(4) Zend:
After all the debugging operations are normal, I mounted Zend to E: \ Program Files \ Zend.

Iii. configuration process:

(1) HTTP. conf

I have changed this file to several places:
Run php directly as a module of 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 created a WWW directory under the E: \ apache2 directory to store my site files. In HTTP. conf, I changed the following sentence:
Change DocumentRoot "E:/apache2/htdocs" to DocumentRoot "E:/apache2/www"

Compared with 1.3.x, apache2.0.x cannot directly list directories by default. If you feel uncomfortable, you can change it:
Run the following statement under DocumentRoot "E:/apache2/www ":

Code: [copy to clipboard]

Options followsymlinks
AllowOverride none

Changed:

Code: [copy to clipboard]

Options indexes followsymlinks
AllowOverride none

Set the default Apache characters to simplified Chinese characters:
Adddefacharcharset gb2312

Modify the default homepage of a directory:
After directoryindex, write the file name you want to set as the homepage, for example, index.html index. php.

Nothing else.

Note that to make these configurations take effect, restart Apache.

(2) PHP. ini

I used php4.x in the past and thought it was very simple to configure it, So I even used PhP5 to configure it directly. Who knows that MySQL cannot be used after it is finished, saying that it cannot be connected to a dynamic library, I carefully checked the existence of php_mysql.dll, but I couldn't find it, which made me feel depressed for a long time. Even if I decompress PhP5 again, it would be useless, later, I found this sentence in the install document of PHP: php_mysql.dll MySQL functions php> = 5.0.0, requires libmysql. DLL (bundled)

So I found the cause ......

Configure php5.0.2 as follows:

Copy PHP. ini-Dist to c: \ windows and change it to PhP. ini. (You have installed PHP before)

Then, I modified the following parts:
Extension_dir = "E: \ PHP \ Ext" (specify the directory of the dynamic Connection Library. The difference between PhP5 and PhP4 is that its dynamic Connection Library directory has changed, this is detailed in its document structure)

Remove the semicolon in the following sentence
; 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, we modified some file uploads and the maximum memory usage limit:
Memory_limit = 20 m
Post_max_size = 20 m
Upload_max_filesize = 20 m

Nothing else can be changed. After modifying PHP. ini, You need to restart Apache.

Next, copy libmysql. dll and libmysqli. dll under the PHP Directory to Windows/system32. If this is not done, the MySQL dynamic Connection Library cannot be loaded normally.

(3) configuration of MySQL and Zend

Now both Apache and PHP have been configured. Enter localhost in the browser to check the result and run it successfully. Then, enter localhost/phpMyAdmin. Depressed, phpMyAdmin prompts the error message:

Quote:
MySQL returns:

#1251-client does not support Authentication Protocol requested by server; consider upgrading MYSQL client

It's strange, even though the latest MySQL version is installed, how can the Client Version be too low? It's really depressing.

After a few tests, I gave up and played kof97.

Then, with the help of CCF. pandatv and im286.ceo, I finally found the cause:

Outdated CEO: "upgrade the client

The new version of MySQL uses the new password verification method.

Using old_password to set the MySQL password can solve this problem"

CCF. pandatv: "Use old_password" to reset the password ".

Thanks to the two friends, the specific solution is as follows:

I do not know how to upgrade the client, because in windows, the server and client are installed in a bundle, so 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 successful!

More articles about apache2, PhP5, mysql5, and Zend installation in Windows XP

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/324010.html pageno: 15.

Related Article

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.