Home > Article > Backend Development > Learn centos to install php mysql extension
2. Enter the mysql extension source code directory to be added:
2. Call phpize in the compiled php:
3. Then configure:
4,
5. After compilation, mysql.so is automatically placed in the default php extension directory (phpinfo can be viewed, here is /usr/local/php5/lib/php/extensions/no-debug-zts-20090626), then modify php.ini and remove the semicolon in front of;extension=php_mysql.so. Note: The name of the generated module is mysql.so, which is inconsistent with the name of php_mysql.so in php.ini. Mysql.so must be renamed to php_mysql.so. Remember~! 6. Restart apache:
Note: If step 3 passes but an error is reported in step 4, it may be a problem with the source code. You can download a new file from php.net and recompile it. |