Basic steps to add extensions: 1, enter the php source code directory: # cd/tmp/php-5.2.14/2, and then enter the mysqli extension source code directory to add: # cdext/mysqli/2. call phpize: #/usr/local/php/bin/phpize3 in compiled php, and then configure: # & n to add extensions:
1, enter the php source code directory: # cd/tmp/php-5.2.14/
2. go to the mysqli extension source code directory to be added: # cd ext/mysqli/
2. call phpize in compiled php: #/usr/local/php/bin/phpize
3. then configure :#. /configure -- with-php-config =/usr/local/php/bin/php-config -- with-mysqli =/usr/local/mysql/bin/mysql_config
(/Usr/local/mysql is the installation directory of mysql)
4. make & make install
5. after compilation, mysqli. so is automatically put to the default php extension directory, my/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
(Phpinfo can be viewed or run the command/usr/local/php/bin/php-config -- extension-dir)
Modify php. ini and find the default extension_dir path extension_dir = "./".
Add extension = "mysqli. so" below to save
Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613 /"
Extension = "mysqli. so"
6. restart apache: # service httpd restart