win7 PHP7.0的PDO扩展

一个很是棘手的问题,win7(64位)环境,编译安装的mysql,php没法使用pdo扩展。php

image

而个人centos中yum安装的php,pdo是好用的。mysql

image

百度了一大堆,都没法解决。sql

基本上百度到的都是要开启这两个:windows

extension=php_pdo.dll
extension=php_pdo_mysql.dllcentos

可是个人php.ini文件中根本没有第一个,ext文件夹中也确实没有php_pdo.dll。dom

而我查看http://windows.php.net/download/这里面的7.0和7.1版本,也所有都没有php_pdo.dll这个dll,可能百度到的攻略所有是针对php5的。curl

image

而后怀疑是这里的问题,结果比对之下这里一抹同样ide

image

 

各类怀疑,而后找了个测试文件,测试各个php扩展是否能用,这下好了curl也是不能用的,而curl也是我必需要用的。测试

Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:ui

  • You are missing the curl extension
  • You are missing the gd extension
  • You are missing the pdo_mysql extension

The following requirements were successfully met:

  • You have PHP 5.2.0 (or greater)
  • Safe Mode is off
  • You have MySQL 4.1.20 (or greater)
  • You have the dom extension
  • You have the hash extension
  • You have the iconv extension
  • You have the mcrypt extension
  • You have the pcre extension
  • You have the pdo extension
  • You have the simplexml extension

 

实在没辙了,网上连英文的都搜了,也没有,只好去php文件夹一个一个看。万幸真的看出了问题

image

 

万般无奈之下开始找各类其余Apache下载,最后找到了伟大的phpstudy,真没有作广告,发现只有这个好使,它的配置是这样的,只要按照这个配置,我其余十几个Apache全好使了。

extension=php_bz2.dll
extension=php_curl.dll

;extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll      ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll

 

感想:

1:开源软件,非必须的扩展,别TM开启。

相关文章
相关标签/搜索