Configure the APACHE+PHP5+MYSQL5 under WINDOWS2000ADV

Source: Internet
Author: User
Tags apache download config iis ini mysql php download win32 phpmyadmin

In the past for the convenience of the diagram, the package is used. The version is long, it is apache1. X.mysql4.x,php4. X's. It's been out of date for a long time. And there's a lot of holes, but luckily I'm just using it locally ... But in order to catch the tide, it Chine slightly.

Version of the software 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 to each major download website. or directly to the official website download. And the configuration tutorial is a lot of, I will not do detailed technical literature.

PHP's official website http://www.php.net/? There are Chinese language services, you can even find the latest Chinese PHP manual
PHP download page http://www.php.net/downloads.php

The official website of Apache http://www.apache.org/
Apache download page http://archive.apache.org/dist/httpd/


MySQL as a database software The biggest feature is free, of course, he is also very efficient, and PHP similar features
MySQL official website http://www.mysql.com/

phpMyAdmin for Windows V2.6.2

I am to the Sky Software station download: http://www.skycn.com/soft/10687.html

Zendoptimizerwindows, this is used to parse some of the source code and optimization. I downloaded it to the Sky Software station.

Zend Optimizer V2.5.7 for Windows:

Also to the Sky software station download: http://www.skycn.com/soft/20133.html

After all the programs have been installed, start configuring.:

First Configure Apache2
Open the httpd.conf configuration file under the Apache2conf folder
To the last join
LoadFile c:/php/php5ts.dll//load Php5ts.dll, either Apache or IIS must have been the link library
LoadModule php5_module c:/php/php5apache2.dll//load PHP5 Apache module
AddType application/x-httpd-php. php
' Www.knowsky.com
Find DocumentRoot, followed by "C:/apache2/htdocs" may vary depending on the installation path,
is the Web page directory location, can be changed to their own needs, note that the slash "/" is not a backslash "", after all, this is under Linux transplanted
Look for DirectoryIndex, followed by index.html Index.html.var
This is the default first name, to add index.php index.htm

Then configure PHP
to rename the php.ini-recommended under the c:php folder to PHP.ini
PHP.ini: For security and efficiency reasons, It is recommended that you use php.ini-recommended as the blueprint for php.ini instead of using Php.ini-dist. At the same time, the php.ini lookup path is no longer limited to the%systemroot% of the PHP4 era, PHP5 the following path to find php.ini:

     * Phpinidir (Apache 2 module only)
     * Registry key value: Hkey_local_ Machinesoftwarephpinifilepath
     * environment variable:%phprc%
     * PHP5 directory (for CLI), or the Web server directory (for
       SAPI modules)
     * Windows directory ( C:windows or C:winnt)
in these five scenarios, it is best to use Phpinidir when cooperating with Apache2, followed by the use of%phprc% environment variables, and on NTFS, remember to open php.ini Read permissions to the server.
Open php.ini, look for Extension_dir later to "C:/php/ext", look at that folder and see what it is.
Find Windows Extensions, there's a row below; extension=php_* **.dll
start to semicolon, remove is support component
at least
         Extension=php_gd2.dll
         Extension=php_mbstring.dll
          Extension=php_mysql.dll
Before the semicolon removed
PHP5 started by default does not support MySQL, so we have to add support for him, in addition to EXTENSION=PHP_ Mysql.dll away from the semicolon
There is a libmysql.dll file in the PHP directory, copy it to the System32 folder of the system, copy php.ini to the Windows directory

After all is the online tutorial. No way, lazy ah.

PHP.ini I put it under the C:\Winnt\System32. PHP can be parsed, and MySQL will work as well. It's just that I turned on IIS. It's already 80 ports, so I chose the 8080 port when I installed Apache. And not to load Apache into a service.

But when running phpMyAdmin, it shows: unable to load the MySQL extension, please check the PHP configuration.

It must be a problem connecting to MySQL. First with a little bit of a stupid way, modify the phpMyAdmin configuration file, open config.inc.php, find: $cfg [' Servers '] [$i] [' Host '], fill in the local address, General fill localhost on it. The following options, such as User,password, are also configured.

Restart Apache, still the same, no, it seems to be php.ini problems. Find: Extension=php_***.dll, these are extension files, I put most of the extensions ahead of '; removed, let it support more extensions. The Dead Horse is a live horse medicine oh. Oh.. To restart Apache again, another disappointment.

Think of the head is dizzy, can't think of there is a mistake, phpinidir and%phprc% are all right. Hey, no matter, copy php.ini, put it under C:\Winnt, and then install Apache into service:

CMD run: C:\Apache_PHP\Apache group\apache2\bin\apache.exe-k Install

Then: C:\Apache_PHP\Apache group\apache2\bin\apache.exe-k Restart

Pop-up a lot of error messages dialog box, prompted to say that can not find php_bz2.dll files, such as crazy click after the mouse. The miracle appears, may enter the phpMyAdmin homepage. It seems to be a little way ...

The main problem has also been solved. Then come down is to clean up, the php.ini file under the Extension=php_***.dll again add '; ' number, comment them out, do not need so many extensions, leaving only the necessary:

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


Restart Apache again, or prompt for a missing: Php_mbstring.dll file. This is a good time to copy the Php_mbstring.dll,php_mysql.dll under Php\ext to C:\winnt\system32\, Restart Apache, everything ok~! just see in phpMyAdmin's front page with a big red word hint: must be set in your profile $cfg [' Pmaabsoluteuri '] instructions!

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

The above configuration process took me two or three hours, then I tried to c:\winnt under the php.ini to C:\Winnt\System32, and then appeared: unable to load the MySQL extension, please check the PHP configuration. This error tip ... Looks like php5 and PhP4 really a little different.

Turn from: Dynamic Network production guide www.knowsky.com

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.