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開啓。

相關文章
相關標籤/搜索