Install intl PHP extension OSX High Sierra

前端 未结 12 1042
予麋鹿
予麋鹿 2020-12-01 04:39

How can I install intl PHP extension in PHP 7.1.7, which is delivered with osx high sierra?

12条回答
  •  旧巷少年郎
    2020-12-01 05:15

    I installed php7.2 with brew and linked with that version on Mac, but cannot see even the version number 7.2 in phpinfo(). It always showed the last version(7.1) even though uninstall with brew, so the intl extension. I found we have to modify httpd.conf file(in my case in /etc/apache2/httpd.conf), in that file you can find the

    LoadModule php7_module libexec/apache2/libphp7.so
    

    in that line you have to override with your new php72 path: in my case it was

     LoadModule php7_module /usr/local/Cellar/php@7.2/7.2.31_1/lib/httpd/modules/libphp7.so
    

    And restart apache, it works fine.

提交回复
热议问题