After mac is upgraded to yosemite, php extensions are fixed. after mac is upgraded, php is automatically upgraded, causing php environment damage.
So we need to fix the following points:
1.
Sudo ln-s/Applications/Xcode. app/Contents/Developer/Platforms/MacOSX. platform/Developer/SDKs/MacOSX10.10.sdk/usr/include
Note that the red part should be 10.10 If you upgrade to mertricks.
If you are th
Installing the PHP extension requires your Mac system to have the Xcode environment and command-line development tools installed and, if not already installed, use shell installation first.Xcode-select--install
To extend administrative convenience, first install the PECL Extension Manager.
cd/usr/lib/phpsudo php Install-pear-nozlib.phar
Install Redis, Memcache
PHP is automatically upgraded after Mac upgrade, resulting in PHP environment corruption
So there are a few points to fix
1.
sudo ln-s/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.10.sdk/ Usr/include/usr/include
Note the red part, if you upgrade to mertricks then it should be 10.10.
If you're the newest Yosemite, then it's 10.0.
If you execute this command error, please delete/usr/include fir
When the Mac system is upgraded to 10.9 (Mavericks), the PHP extension is installed and the phpize prompts for the following error:
Cannot find autoconf. Please check your autoconf installation
and the $PHP _autoconf environment variable.
Solutions
Install Homebrew First:
Ruby-e "$ (curl-fssl https://raw.github.com/Homebrew/homebrew/go/install)"
Moved to:
Ruby-e "$ (curl-fssl https://raw.github
is to recompile PHP, add FreeType support, because the original PHP has been compiled GD, recompile GD must join--with-freetype, otherwise on PHP still can not get FreeType support ...Today is here, really dizzy!!Mac needs open source class library can go to Apple official website query: http://www.apple.com/opensource/When recompiling PHP, to add the--with-freetype, seemingly different PHP version, there is a need to pay attention to the place!If yo
Note: Operating system 10.13.3, other versions of the Mac system should also be available
Install firstExecute the following command at the command line in order, and if the current user has insufficient permissions, execute the command with sudocd /usr/local/Cellar //我是安装到Cellar目录下了git clone https://github.com/phpredis/phpredis.git cd phpredis phpize //phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块 make //编译程序 make install
Configuring extension
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.