Install intl PHP extension OSX High Sierra

前端 未结 12 1053
予麋鹿
予麋鹿 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:12

    I'm running the brew 1.6.2, on OS High Sierra. The intl extension is not available in brew packages so far.

    The @Mondy solution worked fine for me. After run the

    curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1
    

    The packages will be available in /usr/local/php5 or /usr/local/php5-7.0.27-20180201-135220.

    So in your /usr/local/etc/php/7.0/php.ini you can place the following lines to enable the intl extension:

    [intl]
    extension="/usr/local/php5/lib/php/extensions/no-debug-non-zts-20151012/intl.so"
    

    In my case I prefered to create a file 'ext-intl.ini' in /usr/local/etc/php/7.0/conf.d/, just for a better organization.

提交回复
热议问题