search

Home  >  Q&A  >  body text

macos - Mac's built-in PHP annotation configuration extension is invalid, what is the reason?

< /p>

< /p>

[Question]: These extensions will still take effect even if they are commented out. What is the reason?

PS: Apache has been restarted and the computer has been restarted, but it is ineffective. This is the PHP that comes with mac. The version is:
PHP 5.5.38 (cli) (built: Aug 21 2016 21:48:49) < br>Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

黄舟黄舟2817 days ago655

reply all(6)I'll reply

  • 为情所困

    为情所困2017-05-16 13:14:57

    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

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-16 13:14:57

    Is there a dll suffix on mac?

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 13:14:57

    The wrong file should be corrected.

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 13:14:57

    These extensions are compiled into PHP

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

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-16 13:14:57

    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

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:14:57

    This item is the actual loaded configuration file

    reply
    0
  • Cancelreply