PHP Installation Intl Extension code sharing under Mac

Source: Internet
Author: User
Tags install brew intl php website
Recently working on a project, you need to integrate the development environment with XAMPP. XAMPP is the latest version, and PHP Intl extension no, no PHP extension of the source code.

You need to manually compile the intl extension.

Environment: Mac XAMPP

Steps:

(1) Php-v: Check the version of PHP, is 7.0.2, and then to the PHP website to find this version of the PHP source package, and download.

(2) Phpize: Enter into the Php/ext/intl directory. Will prompt an error, no autoconf.

Mac installation, install the Brew tool first, similar to the Linux Yum,mac comes with Ruby.

Install BREW:RUBY-E "$ (curl-fssl https://raw.github.com/Homebrew/homebrew/go/install)"

After the brew installation is successful, install Autoconf:brew installation autoconf,brew link autoconf.

Will encounter the situation can not link, this time it can not link directory own replace with the current user can (because of permissions, so cannot link).

Note: The phpize order is not executed in any directory, and now the test can only be performed under this extended source path.

The result of the execution is:

Configuring For:php API Version:         20090626Zend Module API No:      20090626Zend Extension API No:   220090626

(3)./configure--with-php-config=/applications/xampp/xamppfiles/bin/php-config (php path to use)

(4) Make: There will be an error, the hint is missing installation libicu-devel, but brew install libicu-devel, not found, follow a post to solve.

https://segmentfault.com/q/1010000010678737

(5) Make install

(6) You will see a intl.so file in the Intl/module directory, copy this file to the Php/extentions directory you want to use.

(7) Php-i|grep Intl: Found Intl has been installed successfully.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.