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. 出现java.lang.NoSuchMethodError错误的原因

    作为Java开发者我们都遇到过java.lang.NoSuchMethodError错误,究其根源,是JVM的"双亲委托模型"引发的问题.如果在类路径下放置了多个不同版本的类包,如 ...

  2. MongoDB在单机上搭建分片副本集群(windows)

    ------------------------------1.安装MongoDB...... ------------------------------2.准备好文件夹 --config:配置文件 ...

  3. html 弹框 优化 alert

    <!DOCTYPE html> <html> <head> <title>cs</title> </head> <styl ...

  4. ctf题目writeup(4)

    2019.1.31 题目:这次都是web的了...(自己只略接触隐写杂项web这些简单的东西...) 题目地址:https://www.ichunqiu.com/battalion 1. 打开链接: ...

  5. CAS解扰小结

    1.每个ts数据包由:1.包头 2.包数据 包头有个字段 PID ,该字段指示包数据的类型.比如说: PID 为 0x0000 包数据的类型就是 PAT表 PID 为 0x0001 包数据的类型就是 ...

  6. hdu 1394 Minimum Inversion Number(线段树)

    参考:http://blog.sina.com.cn/s/blog_691ce2b70101ldmm.html https://blog.csdn.net/wiking__acm/article/de ...

  7. LOOP AT SCREEN

    用法 主に.画面の属性を変更させるために使用する. 照会モードでは入力不可とするが入力可能モードでは入力可能とする.ラジオボタンAが選択された場合はラジオボタンBに関連する項目は非表示とするなど.   ...

  8. SET UPDATE TASK LOCAL (ローカル更新 )

    ローカル更新では.更新プログラムは要求を処理したのと同じワークプロセスによって実行されます.ダイアログユーザは更新が終了するまで待ってから追加データを入力しなければなりません.データベースへのアクセス ...

  9. WPF中,如何将绑定源设置到单件实例

    原文:WPF中,如何将绑定源设置到单件实例  WPF中,如何将绑定源设置到单件实例                                       周银辉 大概两个月前,曾有位朋友问我:如 ...

  10. Percona-Tookit工具包之pt-find

      Preface       We used to use "find" command in linux or AIX when we need to get a certai ...