【发布时间】:2014-11-08 03:39:26
【问题描述】:
我无法安装 Mysqli。
我正在使用 Centos 6、apache 2.2.x 和 php 5.4 MySql 5.5.37-cll
我试过了:
yum install php-pdo php-mysqli
我看到了:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.clouvider.net
* elrepo: mirrors.coreix.net
* extras: centos.hyve.com
* updates: mirrors.coreix.net
Setting up Install Process
No package php-pdo available.
No package php-mysqli available.
Error: Nothing to do
我试过了:
yum install php-mysqli
我明白了:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.openitc.uk
* elrepo: mirrors.coreix.net
* extras: centos.hyve.com
* updates: mirrors.coreix.net
Setting up Install Process
No package php-mysqli available.
在我的动态扩展部分的 php.ini 中,我没有安装任何模块(我想。)如果我错了,请纠正我。 php.ini -> 动态扩展
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
;extension=php_curl.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_domxml.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xslt.dll
;extension=php_yaz.dll
;extension=php_zip.dll
顺便说一句,以上所有模块都是针对 windows 的,我是否需要为 Centos 编辑/激活任何模块?我需要 mysql 和 mysqli 连接到数据库。
更新
我用 easyapache 重建了 apache 并检查了 mysqli 扩展。我会发布结果。
【问题讨论】: