Version:
--- Windows 2000 Professional
--- Apache 2.0.50 (apache_2.0.50-win32-x86-no_ssl.exe)
--- PHP 5.0.2 (php-5.0.2-win32.zip)
--- MySQL 4.0.21 (mysql-4.0.21-win.zip, and the installation package containing setup.exe is decompressed)
Tip:
1. Other versions of PHP and MySQL can also be pushed accordingly.
2. This article also applies to other WindowsNT-based operating systems.
3. The main content of this article is included in the three-component self-report documents. Here we will extract them for reference.
Steps:
1. install Apache.
2. Decompress PHP to a directory (assuming it is decompressed to X:/PHP), and rename the php. ini-recommended file in the directory to PhP. ini.
3. Find the./CONF/httpd. conf file in the Apache installation directory and add the following lines at the end of the file:
ScriptAlias/PHP/"X:/PHP /"
Addtype application/X-httpd-PHP. php
Action application/X-httpd-PHP "/PHP/php-cgi.exe"
4. Now Apache can parse the PHP file.
5. Install MySQL. (Assume that the installation is under X:/MySQL)
6. Find my. ini in the Windows directory and add the following lines:
[Mysqld]
Basedir = x:/MySQL
Datadir = x:/MySQL/Data
7. Choose Control Panel> Administrative Tools> services to find and start the MySQL service.
8. Open the php. ini file and find:
Extension_dir = "./"
Change it:
Extension_dir = "./EXT /"
(In fact, this is the process of specifying the extension directory. You can see that the extension directory of this version of PHP is "Ext". Note the last "/")
Then find:
; Extension = php_mysql.dll
Remove the semicolon.
So far, the entire installation process has been completed. You already have a server that supports PHP + MySQL.
Discussion:
In phpinstall.txt, MySQL has been integrated into PHP and no extension is needed. However, it turns out that if you do not remove the semicolons and
If the extension directory is specified, the MySQL function cannot be used. Is it wrong in install. ini of PHP? Hope to get answers from enthusiastic friends.
The following is a description in PHP:
Note: in PHP 4.3.1 bcmath, calendar, COM, ctype, FTP, MySQL, ODBC,
Overload, PCRE, session, tokenizer, wddx, XML and zlib support is
Built in. You don't need to load any additional extensions in order
To use these functions. See your distributions readme.txt or
Install.txt or this table for a list of built in modules.