macos - mac自带php注释配置拓展无效,是什么原因呢?
黄舟
黄舟 2017-05-16 13:12:57
0
6
576

【问题】:注释了这些拓展,还是会生效,这是什么原因?

PS:apache已重启,电脑也重启,都无效,这是mac自带的php,版本为:
PHP 5.5.38 (cli) (built: Aug 21 2016 21:48:49)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all (6)
为情所困

The PHP.ini configuration file is in the wrong location, only the extension suffix on windows is .dll

On linux and mac it’s .so

phpinfo(); take a look at loadphpini

    漂亮男人

    Is there a dll suffix on mac?

      Peter_Zhu

      The wrong file should be corrected.

        Peter_Zhu

        These extensions are compiled into PHP

        在对应的php.ini文件中修改 extesnion_dir=/your/path/to/extensions 指定一个目录, 将相应扩展放到相应目录, 然后在php.ini文件中添加 extension=pdo.so
          大家讲道理

          I took a closer look and found that the php.ini that comes with mac does indeed have such a section

          ; 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
          ;
          ; ... or with a path:
          ;
          ; extension=/path/to/extension/msql.so
          ;
          Now only Just change the suffix dll to .so and it’s done

            phpcn_u1582

            This item is the actual loaded configuration file

              Latest Downloads
              More>
              Web Effects
              Website Source Code
              Website Materials
              Front End Template
              About us Disclaimer Sitemap
              php.cn:Public welfare online PHP training,Help PHP learners grow quickly!