zoukankan      html  css  js  c++  java
  • win7 PHP7.0的PDO扩展

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

    image

    而我的centos中yum安装的php,pdo是好用的。

    image

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

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

    extension=php_pdo.dll
    extension=php_pdo_mysql.dll

    但是我的php.ini文件中根本没有第一个,ext文件夹中也确实没有php_pdo.dll。

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

    image

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

    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:

    • 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开启。

  • 相关阅读:
    电容
    IC行业常见用语
    MOSFET 的 I / V 特性曲线
    MOS 预夹断到底是什么
    [ Skill ] 如何 flatten 一个 list
    Metal 线宽如何选择
    [ Skill ] 如何读取一个文件并打印出来
    PHP 当前时间秒数+数值,然后再转换成时间。
    PHP HTTP GET POST
    做一个菜鸟,写一些自己自己编程错误的地方。个人所遇到的问题 保存处
  • 原文地址:https://www.cnblogs.com/mihe/p/6219008.html
Copyright © 2011-2022 走看看