Server solutions are simple in Windows
Solving method
Get rid of the php.ini inside.
| The code is as follows |
Copy Code |
Extension=php_mysqli.dll |
The semicolon in front of this line ";" and then restart the Iis/apache, it's OK, if it's still not OK we can php_mysqli.dll the PHP directory to the System32 directory, another open mysqli expansion, that is, the php.ini; Extension=php_mysqli.dll before the semicolon removed, restart the service, it should have.
And then restart Iis/apache.
Solution in Linux is a little more complicated, because it's all command mode.
| The code is as follows |
Copy Code |
CD php-5.2.8//There's a mysqli in the Ext folder underneath. CD Ext/mysqli
|
Linux will be the source file compiled should have configure it, but here is not, after we have installed PHP, php5 folder in the command directory bin there is a file called phpize, use it can generate configure files, continue to
| The code is as follows |
Copy Code |
/usr/local/php5/bin/phpize//Here Enter the run, after the execution of the Configure file, ./configure–prefix=/usr/local/mysqli–with-php-config=/usr/local/php5/bin/php-config–with-mysqli=/usr/local/ Mysql/bin/mysql_config |
Direct return, no problem will continue.
| The code is as follows |
Copy Code |
Make Make Test Make Install//(no error will show installing shared extensions:/usr/local/php5/lib/php/extensions/no-debug-non-zts-20041030/) |
Now the mysqli.so file is coming out.
It's OK to load this file directly in the php.ini.
| The code is as follows |
Copy Code |
Extension_dir= "/usr/local/php5/ext" Extension=mysqli.so |
Find the first line above to change to this, and then add the second line. Wq Save exit.
mysqli.so this file CP to/usr/local/php5/ext.