卸载php55

brew unlink php55

brew install homebrew/php/php70

安装成功信息

To enable PHP in Apache add the following to httpd.conf and restart Apache:

LoadModule php7_module    /usr/local/opt/php70/libexec/apache2/libphp7.so

<FilesMatch .php$>

SetHandler application/x-httpd-php

</FilesMatch>

Finally, check DirectoryIndex includes index.php

DirectoryIndex index.php index.html

The php.ini file can be found in:

/usr/local/etc/php/7.0/php.ini

✩✩✩✩ Extensions ✩✩✩✩

If you are having issues with custom extension compiling, ensure that

you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:

PATH="/usr/local/bin:$PATH"

PHP70 Extensions will always be compiled against this PHP. Please install them

using --without-homebrew-php to enable compiling against system PHP.

✩✩✩✩ PHP CLI ✩✩✩✩

If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,

~/.zshrc, ~/.profile or your shell's equivalent configuration file:

export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"

✩✩✩✩ FPM ✩✩✩✩

To launch php-fpm on startup:

mkdir -p ~/Library/LaunchAgents

cp /usr/local/opt/php70/homebrew.mxcl.php70.plist ~/Library/LaunchAgents/

launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plist

The control script is located at /usr/local/opt/php70/sbin/php70-fpm

OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:

PATH="/usr/local/sbin:$PATH"

You may also need to edit the plist to use the correct "UserName".

Please note that the plist was called 'homebrew-php.josegonzalez.php70.plist' in old versions

of this formula.

To have launchd start homebrew/php/php70 at login:

ln -sfv /usr/local/opt/php70/*.plist ~/Library/LaunchAgents

Then to load homebrew/php/php70 now:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php70.plist

==> Summary

mac 安装php7的更多相关文章

  1. [安装] mac安装PHP7经历

    背景 前几天在mac上跑workrman,由于workerman需要开启多个进程,多进程需要pcntl扩展的支持,我之前那个brew安装的php71没有这个扩展,就直接卸载了php71,然后想下载源码 ...

  2. mac 安装 php7 及扩展

    mac 版本号:10.12.3 (16D30) 安装内容 php7.0.18(配置apache),composer,phpunit,xdebug扩展,docopts,mongo和redis扩展 php ...

  3. Mac安装LNMP环境,升级php7

    Mac安装nginx+mysql+php 安装nginx比较麻烦,要安装pcre       ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre ...

  4. mac下安装php7.2、mysql5.7、nginx环境

    本篇文章是通过homebrew安装,home brew对于Mac相当于centos 的yum一样方便简单,大家可以先去安装home brew.网上很多简单靠谱的例子,这里不写了 一.准备条件为了安装最 ...

  5. mac配置php7运行环境

    不用mac自带的apache和php,安装自己想要的版本.配置过程一直采坑,需要有闲时间和好的心理素质才行,哈哈,因为网上很教程都有纰漏之处,所以先把采坑无数后发现的个人认为最好的一个教程链接放在这里 ...

  6. Mac安装PHP(Homebrew/php弃用、其他第三方tap也已经弃用或者迁移后的安装配置方案)

    一.前言 看网上很多资料,大多数都是 mac安装php,只需要: brew tap homebrew/php brew install phpXX 安装php扩展只需要: brew install p ...

  7. Mac 安装WordPress

    Mac 安装WordPress 一.环境要求 PHP 5.2.4或更新版本 MySQL 5.0或更新版本 WebServer(可以选择Apache.nginx等支持PHP的,这里我选择Apache) ...

  8. CentOS 7.1编译安装PHP7

    原文: https://typecodes.com/web/centos7compilephp7.html?utm_source=tuicool&utm_medium=referral 1 创 ...

  9. 编译安装PHP7并安装Redis扩展Swoole扩展

    编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...

随机推荐

  1. ruby调试/练习时的小技巧

    必备工具 irb 查祖先 1.9.3-p545 :023 > String.ancestors => [String, Comparable, Object, Kernel, BasicO ...

  2. jsp中button与submit的用法

    button:可以对返回的数据进行格式化,反应到页面上,可以用form表单序列化提交也可以不用form表单提交 <form id="addForm"> <inpu ...

  3. xcopy /r /y "$(TargetPath)" "$(ProjectDir)"..\CMSAdmin\DLL\

    作用:1.所有都生成这里容易管理 2.tfs获取的时候不会有出问题 3.如果都是引用项目 会存在先后顺序 也会导致生成代码的时候出问题

  4. 。net 之view筛选

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  5. JavaScript打印正倒直线

    做了一个作业,用JavaScript打印正倒直线,突然觉得自己还是逻辑有待加强训练啊 document.write("<h3>打印倒正金字塔直线</h3>" ...

  6. phpMyAdmin的配置

    好久没写东西了,上来记录一下今天学的一点小东西吧~ 之前搞php开发的时候,一直用的是SQLyog来操作mysql数据库的,但是今天发现sqlyog功能不是很完善,主要是我想修改数据库名,但是sqly ...

  7. 2016 icpc-ec-final

    一不小心惨变旅游队,不过上海的风景不错 顺带找其他队交流一下集训经验...或许可以成为选拔和集训16级的依据 A.直接模3就可以了,2^(3*n)%7=1 L.每场比赛3种情况,穷举就可以了 D.刚开 ...

  8. Netsuite > Hierarchy of transactions in Inventory cost calculation

    First in day worksheets + Purchase Transactions (Receipts, Bills, Adjustments, Assembly Builds) + Tr ...

  9. video 手机全屏自动播放

    <video src="video.mp4" id="video" x-webkit-airplay="true" webkit-pl ...

  10. 【Python】Django

    数据表更改 Django 1.7.x 和后来的版本: Django 1.7.x 及以后的版本集成了 South 的功能,在修改models.py了后运行: python manage.py makem ...