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, after decompressing installation package) containing setup.exe)
prompt:
1. For other versions of PHP and MySQL, you can also push it accordingly. 2. The content of this article also applies to other Windows-based operating systems 3. The main contents of this article are included in the self-proposed documentation of three components, and they only refine them as a reference.
step:
1. Install apache.
2. Unzip PHP into a directory (assuming to decompress into x: / php) and rename the php.ini-recommended file in this directory to php.ini.
3. Find the ./conf/httpd.conf file in the Apache installation directory, 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. At this point Apache has been able to resolve the PHP file.
5. Install MySQL. (Suppose is installed to x: / mysql)
6. Find my.ini under the Windows directory, add the following lines:
[mysqld] basedir = x: / mysql datadir = x: / mysql / data
7. Find the mysql service in the Control Panel -> Administrative Tools -> Services and start.
8. Open the PHP.INI file just now, find:
Extension_dir = "./"
Change it to:
EXTENSION_DIR = "./ext/"
(In fact, this is a process of specifying an extension directory, you can see this version of the PHP's extension directory to "ext", pay attention to the last "/")
Then find:
EXTENSION = php_mysql.dll
Remove the semicolon.
This is done throughout the installation process. You already have a server that supports PHP MySQL.
discuss:
PHP's install.txt said that mysql function has been integrated into PHP, do not have to set an extension, but it turns out that if you don't remove the semicolons and fingers in step 8
You cannot use the mysql feature to set the EXTENSION directory. Is it wrong in the PHP INSTALL.INI? I hope to get a friend's answer.
Instructions 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 loading Any Additional Extensions in ORDER TO Use these functions. See your distributions readme.txt or install.txt or this table for a list of build in modules.