Home  >  Article  >  Backend Development  >  mac升级yosemite后php 扩展修复

mac升级yosemite后php 扩展修复

WBOY
WBOYOriginal
2016-06-23 13:46:40960browse

mac升级之后 php 被自动升级,导致php环境破坏


所以 需要修复如下几点


1.

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include /usr/include


注意红色的部分,如果你升级成mertricks 那么应该是10.10

如果你是最新的 yosemite 那么就是 10.0

如果执行这个命令报错,请先删除  /usr/include

sudo rm /usr/include

2.修改php.ini

你会发现etc 多了几个文件

1.php.ini.xxx.previos

2.php.ini.xxx.default.previos 

这俩是老文件,没啥用,放那吧



3.php.ini.default

复制这个文件

sudo cp php.ini.default php.ini

sudo chmod 744 php.ini


3.后你的扩展 用phpize 安装即可



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn