IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    MAC brew install PHP5.3

    聂文龙发表于 2016-06-08 01:07:00
    love 0

    Last login: Wed Jun  8 08:58:45 on console

    MACdeiMac:~ niewenlong$ brew install php53 --with-imap --with-tidy --with-debug --with-pgsql --with-mysql --with-fpm --with-libmysql --with-gmp

    ==> Installing php53 from josegonzalez/php

    Warning: josegonzalez/php/php53: --with-pgsql was deprecated; using --with-postgresql instead!

    ==> Downloading https://php.net/get/php-5.3.29.tar.bz2/from/this/mirror

    Already downloaded: /Users/niewenlong/Library/Caches/Homebrew/php53-5.3.29

    ==> Downloading https://gist.githubusercontent.com/javian/bfcbd5bc5874ee9c539fb3d642cdce3e/raw/bf079cc68ec76290f02f57981ae85b20a06dd428/multi-sapi-5.3.2

    ######################################################################## 100.0%

    ==> Patching

    ==> Applying multi-sapi-5.3.29-homebrew.patch

    patching file Makefile.global

    patching file Zend/acinclude.m4

    patching file Zend/zend_language_parser.y

    patching file acinclude.m4

    patching file aclocal.m4

    patching file configure

    patching file configure.in

    patching file generated_lists

    patching file main/php_config.h.in

    patching file sapi/cgi/Makefile.frag

    patching file sapi/cgi/config9.m4

    patching file sapi/cli/Makefile.frag

    patching file sapi/cli/config.m4

    patching file sapi/fpm/Makefile.frag

    patching file sapi/fpm/config.m4

    patching file sapi/litespeed/Makefile.frag

    patching file sapi/litespeed/config.m4

    patching file sapi/milter/Makefile.frag

    patching file sapi/milter/config.m4

    ==> ./configure --prefix=/usr/local/Cellar/php53/5.3.29_4 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/us

    ==> make

    ==> make install

    ==> Caveats

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

        LoadModule php5_module    /usr/local/opt/php53/libexec/apache2/libphp5.so


    The php.ini file can be found in:

        /usr/local/etc/php/5.3/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"


    PHP53 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/php53)/bin:$PATH"


    GMP has moved to its own formula, please install it by running: brew install php53-gmp


    ✩✩✩✩ FPM ✩✩✩✩


    To launch php-fpm on startup:

        mkdir -p ~/Library/LaunchAgents

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

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


    The control script is located at /usr/local/opt/php53/sbin/php53-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.php53.plist' in old versions

    of this formula.


    To have launchd start josegonzalez/php/php53 now and restart at login:

      brew services start josegonzalez/php/php53

    ==> Summary

    🍺  /usr/local/Cellar/php53/5.3.29_4: 299 files, 49.9M, built in 3 minutes 15 seconds

    MACdeiMac:~ niewenlong$ 

    @import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

    聂文龙 2016-06-08 09:07 发表评论


沪ICP备19023445号-2号
友情链接