mysql是用php的吗,Mysql是不是用PHP編譯的?

I am using php 5.3 Centos6. I have installed mysql. But when i see "configure command" in phpinfo, it shows '--without-mysql'.

我使用的是php 5.3 Centos6。我已經安裝了mysql。但是當我在phpinfo中看到“configure command”時,它會顯示'--with-mysql'。

How to add '--with-mysql' in PHP configuration file.

如何在PHP配置文件中添加“--with-mysql”。

4 个解决方案

#1

1

You must install php-mysqlnd or php-mysqli extension. Look here for explanation.

您必須安裝php-mysqlnd或php-mysqli擴展。看這里解釋一下。

yum install php-mysqlnd

#2

1

The --without-mysql and --with-mysql refers to a compilation setting. There's a good chance you're installing pre-compiled binaries with the yum command.

--without-mysql和--with-mysql指的是編譯設置。您很有可能使用yum命令安裝預編譯的二進制文件。

To be clear: --with-mysql is not a php configuration setting but rather something that is done with the php source.

要明確: - with-mysql不是php配置設置,而是用php源完成的。

As @Andrew suggested it makes the most sense to install the php-mysqlnd extension. This is essentially a snippet of the php source with the --with-mysql directive given. (That last sentence is heavily paraphrased).

正如@Andrew建議的那樣,最有意義的是安裝php-mysqlnd擴展。這本質上是一個php源代碼片段,給出了--with-mysql指令。 (最后一句話被大量釋義)。

#3

-1

My phpinfo page is look like this,

我的phpinfo頁面看起來像這樣,

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu

--target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-

prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --

datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --

libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --

mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --

with-libdir=lib64 --with-config-file-path=/etc --with-config-file-scan-

dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-

bz2 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --

with-xpm-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-

gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pcre-regex=/usr --

with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --

enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-

kerberos --enable-ucd-snmp-hack --enable-shmop --enable-calendar --without-

sqlite --with-libxml-dir=/usr --enable-xml --with-system-tzdata --with-

apxs2=/usr/sbin/apxs --without-mysql --without-gd --disable-dom --disable-dba --

without-unixODBC --disable-pdo --disable-xmlreader --disable-xmlwriter --

without-sqlite3 --disable-phar --disable-fileinfo --disable-json --without-

pspell --disable-wddx --without-curl --disable-posix --disable-sysvmsg --

disable-sysvshm --disable-sysvsem

#4

-1

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: Module 'PDO' already loaded in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0

Configure Command => './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-tidy=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-recode=shared,/usr'

/etc/php.d/mysql.ini,

/etc/php.d/mysqli.ini,

/etc/php.d/pdo_mysql.ini,

PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in Unknown on line 0

PATH => /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/:/usr/local/mysql/bin/:/usr/local/vivek/mysqlinstall/mysql5.6/bin/

_SERVER["PATH"] => /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/:/usr/local/mysql/bin/:/usr/local/vivek/mysqlinstall/mysql5.6/bin/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值