lamp环境搭建discuz出现依赖问题:

lamp搭建discuz缺少依赖 mysqli_connect()_第1张图片

解决办法重新编译安装php:

./configure   --prefix=/usr/local/php   --with-apxs2=/usr/local/apache2/bin/apxs   --with-config-file-path=/usr/local/php/etc   --with-mysql=/usr/local/mysql   --with-libxml-dir --with-mysqli --with-gd   --with-jpeg-dir   --with-png-dir   --with-freetype-dir   --with-iconv-dir   --with-zlib-dir   --with-bz2   --with-openssl   --with-mcrypt=/usr/local/libmcrypt   --enable-soap   --enable-gd-native-ttf   --enable-mbstring   --enable-sockets   --enable-exif   --disable-ipv6 
make && make install

然后重启apache和mysql就ok