Building Chinese Web Sites using PHP - Version 2.14, by Dr. Herong Yang
php_mysql.dll - Configuring PHP to Use MySQL Module
This section describes how to configure PHP load MySQL module, php_mysql.dll, to use MySQL functions.
If you want to access MySQL database servers from PHP scripts, you need to use MySQL functions provided by the MySQL module, php_mysql.dll. This tutorial shows you how to load and configure php_mbstring.dll.
1. Check the PHP configuration file, \local\php\php.ini. If not exist, copy it from \local\php\php.ini-dist:
C:\> copy \local\php\php.ini-dist \local\php\php.ini
2. Open \local\php\php.ini in a text editor, like notepad.
3. Change the setting to allow PHP to load php_mysql.dll from the \local\php\ext directory:
... ;extension_dir = "./" extension_dir = "./ext" ... ;extension=php_mysql.dll extension=php_mysql.dll ...
The following settings in php.ini file are used by MySQL module. You can take the default values:
mysql.allow_persistent = On mysql.max_persistent = -1 mysql.max_links = -1 mysql.default_port = mysql.default_socket = mysql.default_host = mysql.default_user = mysql.default_password = mysql.connect_timeout = 60 mysql.trace_mode = Off
Last update: 2015.
Table of Contents
PHP Installation on Windows Systems
Integrating PHP with Apache Web Server
charset="*" - Encodings on Chinese Web Pages
Chinese Characters in PHP String Literals
Multibyte String Functions in UTF-8 Encoding
Input Text Data from Web Forms
Input Chinese Text Data from Web Forms
MySQL - Installation on Windows
►MySQL - Connecting PHP to Database
►php_mysql.dll - Configuring PHP to Use MySQL Module
mysql_connect() - Creating MySQL Connections
INSERT INTO - Inserting New Records
SELECT - Running Database Queries
UPDATE - Modifying Database Records
MySQL - Character Set and Encoding
MySQL - Sending Non-ASCII Text to MySQL
Retrieving Chinese Text from Database to Web Pages