Configure Apache + PHP5 + MySql5 under Windows2000ADV

Source: Internet
Author: User
Tags apache download php download
Configure Apache + PHP5 + MySql5 in Windows2000ADV. For more information, see configure Apache + PHP5 + MySql5 in Windows2000ADV. in the past, we used a kit package for convenience. the version is apache1.X. mysql4.X, PHP4.X. it has been outdated for a long time .. and there are a lot of vulnerabilities. Fortunately, I only use them locally... however,

In the past, we used a kit package for convenience. the version is apache1.X. mysql4.X, PHP4.X. it has been outdated for a long time .. and there are a lot of vulnerabilities. Fortunately, I only use them locally... however, in order to catch up with the trend, we just need to change the gun ..

Software version used:

Mysql-5.0.4-beta-win32

Apache_2.0.54-win32-x86-no_ssl

Php-5.0.3-Win32

PhpMyAdmin-2.6.2-rc1

ZendOptimizerWindows-i386

The above software can be downloaded from various major download websites. or you can directly log on to the official website to download the software. There are also a lot of configuration tutorials, so I will not make detailed technical documents ..

Php official website? With Chinese language services, you can even find the latest Chinese php Manual
Php download page

Official apache website
Apache download page


MySQL, as a database software, is free of charge. of course, it is very efficient and has similar features as php.
Official MySQL website

PhpMyAdmin for Windows V2.6.2

I downloaded it from the sky software site: http://www.skycn.com/soft/10687.html.

ZendOptimizerWindows, which is used to parse some source code and optimize it. I downloaded it from the sky software site.

Zend Optimizer V2.5.7 For Windows:

Is to download the sky software station: http://www.skycn.com/soft/20133.html

After installing all the programs, configure them .:

First configure apache2
Open the httpd. conf configuration file under the Apache2conf folder.
To join
LoadFile c:/php/php5ts. dll // load php5ts. dll, which is a required link library for both apache and IIS.
LoadModule php5_module c:/php/php5apache2. dll // load the apache module of php5
AddType application/x-httpd-php. php
'Www .knowsky.com
Find DocumentRoot, followed by "C:/Apache2/htdocs", which may vary depending on the installation path,
It is the location of the web page directory and can be changed to what you need. Note that it is a slash "/" not a backslash ". after all, it is transplanted under linux.
Check for directoryindex. the value should be index.html. var.
This is the default homepage name. you need to add index. php index.htm

Then configure php
Rename php. ini-recommended in the C: php folder to php. ini.
PHP. ini: for security and efficiency considerations, we recommend that you use php. ini-recommended as the blueprint for php. ini instead of using php. ini-dist. At the same time, the search path for PHP. ini is no longer limited to % SystemRoot % in the PHP4 era. PHP5 searches for PHP. ini in the following path:

* PHPIniDir (Apache 2 module only)
* Registry key value: HKEY_LOCAL_MACHINESOFTWAREPHPIniFilePath
* Environment variable: % PHPRC %
* PHP5 Directory (for CLI) or web server directory (
SAPI modules)
* Windows directory (C: windows or C: winnt)
In these five solutions, PHPIniDir is preferred when used with Apache2, followed by % PHPRC % environment variable. In addition, remember to give the server the read permission of PHP. ini on NTFS.
Open php. ini and find the file "C:/php/ext" after extension_dir. check that folder and you will know what it is.
Look for Windows Extensions, and there is a row below; extension = php _ ***. dll
Remove the semicolon (;) to support components.
At least
Extension = php_gd2.dll
Extension = php_mbstring.dll
Extension = php_mysql.dll
Remove the semicolon
Php5 does not support mysql by default, so we need to add support for it, except for the semicolon removal of extension = php_mysql.dll
There is a libmysql. dll file in the php Directory, copy it to the system32 folder of the system, and copy php. ini to the windows directory.

It will be online tutorials in the future... no way, lazy ..

PHP. ini is stored in c: \ winnt \ system32. PHP can be parsed. mySql can also run normally. I started IIS. port 80 is occupied, so I chose port 8080 when installing Apache. it is not to load Apache into a service ..

However, when running phpmyadmin, it is displayed that the mysql extension cannot be loaded. check the PHP configuration.

It must have been a problem connecting to Mysql. first, modify the phpmyadmin configuration file and open config. inc. php, find: $ cfg ['servers'] [$ I] ['host'], fill in the local address, generally fill in localhost. the following options, such as user and password, are also configured.

Restart Apache. it's still the same. no, it seems to be PHP. there is a problem with ini. find extension = php _***. dll, these are extension files, I removed the '; before most of the extensions, so that it supports more extensions .. the dead horse is a medical doctor .. haha .. restart Apache again, again disappointed ..

When I thought of dizzy headers, I couldn't think of an error there. PHPIniDir and % PHPRC % are all correct. ah. regardless of the PHP. copy the ini file to c: \ winnt and install Apache as a service:

Run c: \ Apache_PHP \ Apache group \ Apache2 \ bin \ Apache.exe-k install in CMD.

Then: c: \ Apache_PHP \ Apache group \ Apache2 \ bin \ Apache.exe-k restart

In the pop-up dialog box with a lot of error messages, the system prompts that files such as php_bz2.dll cannot be found, and click the mouse. a miracle occurs, so you can enter the phpmyadmin homepage...

The main problem is also solved. the next step is to clean up the PHP. extension = php _ *** in the INI file _***. add the ';' sign to the dll and comment them out. there is no need for so many extensions, leaving only the necessary:

Extension = php_gd2.dll
Extension = php_mbstring.dll
Extension = php_mysql.dll


Restart Apache again, and the system prompts that files such as php_mbstring.dll are missing. in this case, copy php_mbstring.dll and php_mysql.dll under php \ ext to c: \ winnt \ system32 \ and restart Apache. everything is OK ~! The command "$ cfg ['pmaabsoluteuri']" must be set in your configuration file!

This is so easy. find the config of phpmyadmin. inc. php. this is the phpmyadmin configuration file. find $ cfg [\ 'pmaabsoluteuri \ '] and fill in the relative path of your phpmyadmin, for example, localhost \ phpmyadmin. press F5 to refresh it once, that's all right...

The above configuration took me two or three hours, and then I tried to put php under c: \ winnt. copy the ini file to c: \ winnt \ system32. the following error occurs: the mysql extension cannot be loaded. check the PHP configuration. this error prompt... it seems that php5 and php4 are a little different.

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.