php7.2 mysql.so extension php7 添加mysql扩展

 

download

http://git.php.net/?p=pecl/database/mysql.git;a=summary

mysql-386776d.tar.gz

phpize

./configure --with-php-config=php-config

make

sudo make install

mysql-386776d$ sudo make install
Installing shared extensions:     /usr/lib/php/20170718/

ls /usr/lib/php/20170718/

is mysql.so  on this Directory not php_mysql.so

edit php.ini

extension=mysql.so

 

on apache2.4  vhost.conf

<VirtualHost *:80>
DocumentRoot /home/web/www/cto
ServerName www.cto.com
<Directory "/home/web/www/cto">
allow from all
Options None
Require all granted
</Directory>
DirectoryIndex index.php index.html
</VirtualHost>

.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    rewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

 


版权声明:本文为uuq原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。