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

Notice : brew install php70的更多相关文章

  1. mac 通过brew安装php70 +php-fpm+ phalcon3.0.3

    安装php7.0.15 brew install homebrew/php/php70 brew install homebrew/php/php70-mcrypt brew install home ...

  2. mac brew install redis 报错

    mac brew install redis 报错 /usr/local/opt/php55/bin/phpize /usr/local/opt/php55/bin/phpize: line 61: ...

  3. mac OSX 上 brew install hive

    本文介绍brew install hive并修改默认的metastore存储方案,改Derby数据库为mysql的方法以及可能遇到的问题的解决方案. 1. 通过homebrew安装hive 1 bre ...

  4. mac osx 系统 brew install hadoop 安装指南

    mac osx 系统 brew  install hadoop 安装指南   brew install hadoop 配置 core-site.xml:配置hdfs文件地址(记得chmod 对应文件夹 ...

  5. mac brew install redis

    在mac 下安装redis 执行brew install redis ==> Downloading http://download.redis.io/releases/redis-2.8.19 ...

  6. Brew install for mac

    安装命令例如以下: curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --st ...

  7. mac下brew install 报错

    mac下brew install 报错 错误提示: 原因:是这个brew的权限不正确 修改一下这个brew的权限 chown root:wheel /usr/local/bin/brew

  8. brew install nvm

    brew install nvm mkdir ~/.nvm nano ~/.bash_profilectrl+x 退出 source ~/.bash_profile echo $NVM_DIR nvm ...

  9. mac brew install nginx遇到的坑

    默认使用 brew install nginx 出现了一下的错误: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: ...

随机推荐

  1. JS 定时器,定时调用PHP

    $(function() { var voiceplay=function(){ var site = location.href.split('_cms')[0] + '_cms/'; $.ajax ...

  2. js onsubmit和return false的关系

    一直以来,我都是以为onsubmit=“return false”就不会进行提交,但经过项目之后才知道return false只是避免了之后的跳转,但onsubmit已经是正在进行了,故onsubmi ...

  3. 廖老师的Python教程——Python简介

    一直想了解下Python,今儿在外面办事排队的时候,打开了廖老师的官网,找到了Python教程.虽然只是一篇关于Python的简介,但是通过将Python的特性与C进行对比,很生动地归纳了Python ...

  4. latex02-LaTeX源文件的基本结构

    1.一个latex文件有且仅有一个document环境 %后表示注释 2.latex的导言区用于全局设置. 例如:title\author\date 加入空行是结构更加清晰 为了能正确的使用标题信息, ...

  5. 洛谷U32670 小凯的数字(比赛)

    题目网址 https://www.luogu.org/problemnew/show/U32670 题目背景 NOIP2018 原创模拟题T1 NOIP DAY1 T1 or DAY 2 T1 难度 ...

  6. 幸运三角形 南阳acm491(dfs)

    幸运三角形 时间限制:1000 ms  |  内存限制:65535 KB 难度:3   描述 话说有这么一个图形,只有两种符号组成(‘+’或者‘-’),图形的最上层有n个符号,往下个数依次减一,形成倒 ...

  7. 48-Identity MVC:Model前后端验证

    1-创建RegisterViewModel类 namespace MvcCookieAuthSample.ViewModel { public class RegisterViewModel { [R ...

  8. C# 面试题 (一)

    一.C# 理论 1.1.简述 private. protected. public. internal.protected internal 访问修饰符和访问权限 private : 私有成员, 在类 ...

  9. 将List中的数据更新到数据库中

    List中有相应的数据,更新到数据库如下: 1.根据关键字查找后删除: foreach (var item in objSelList) { ADDaAn da = db.ADDaAns.Find(i ...

  10. oracle 数据被修改怎么修复?(闪回)

    数据被删除 或者 update 的时候忘记勾选where 限制条件,数据全部更新了?  怎么办? 要跑路了? NO !!! 看下面,迅速帮你闪回数据! demo sql: 1. SELECT * FR ...