【问题标题】:error with mariadb 10.0.8 and mysqli extensionmariadb 10.0.8 和 mysqli 扩展出错
【发布时间】:2014-02-24 06:11:52
【问题描述】:

您好,我刚刚在 WHM/cpanel 服务器中安装了 mariadb 来替换 mysql,但是当我使用 mysqli extesion 运行网站时,连接到 db 时出现错误,然后我在编译 php 时调试输出,我看到了这个:

MySQL version '10.0.8' is neither 4 nor 5, skipping mysqli

我应该怎么做才能用最新版本的 mariadb 安装 mysqli?我使用这种方法来构建所有扩展和模块:

/scripts/easyapache --build

但没用,我无法安装 mysqli 扩展。

非常感谢。

【问题讨论】:

  • this page。它适用于不同的次要版本,但我认为您的错误会相似。
  • 这让我明白了,我只是手动重新编译了 php 并且工作完美,现在我可以使用 mysqli,谢谢。

标签: php mariadb


【解决方案1】:

我刚刚手动配置和编译了 php:

cd /home/cpeasyapache/src/

然后

php -i|grep configure

运行这个命令

配置命令 => './configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-29
    • 2011-04-29
    • 2010-12-21
    • 2013-02-19
    • 2013-08-30
    • 2011-10-07
    • 2013-05-21
    • 2015-02-07
    相关资源
    最近更新 更多