WDlinux官方论坛's Archiver

lvfengya 发表于 2016-12-23 22:28

lanmp cus模式安装之后没有php_mysql模块

lanmp cus模式安装之后没有php_mysql模块,导致php连接不上mysql,
怎么才能安装配置上php_mysql,使得php可以连接上mysql,
当用phpinfo 来测试php跟mysql的连接时  找不到mysql的组件,怎么搞??求大神支持

shitsui 发表于 2016-12-24 10:03

[b]回复 [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=94515&ptid=55762]1#[/url] [i]lvfengya[/i] [/b]


   直接在PHP.ini里修改呢!

lvfengya 发表于 2016-12-24 12:33

[b]回复 [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=94524&ptid=55762]2#[/url] [i]shitsui[/i] [/b]

现在是配置文件里就没有这么一项,即使手动添加这么一项 也是不好用,这个php-mysql就没有安装,在php.ini中加载了也没有用,怎么才能把php-mysql安装上呢?

shitsui 发表于 2016-12-24 15:55

[b]回复 [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=94532&ptid=55762]3#[/url] [i]lvfengya[/i] [/b]


   你重新编译php一下试试,过程如下:[code]./configure --prefix=/www/wdlinux/php-5.6.29 \
--with-config-file-path=/www/wdlinux/etc --with-mysql=/www/wdlinux/mysql \
--with-iconv=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir \
--with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath \
--enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr \
--with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp \
--with-apxs2=/www/wdlinux/apache/bin/apxs
[root@localhost tmp] make
[root@localhost tmp] make install
[root@localhost tmp] rm -f /www/wdlinx/php
[root@localhost tmp] ln -s /www/wdlinux/php-5.6.29 /www/wdlinux/php
[root@localhost tmp] systemctl restart httpd.service[/code]

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.