首页 > php教程 > php手册 > 正文

mac下面安装php5.4

php中文网
发布: 2016-06-06 20:08:59
原创
1274人浏览过

苹果下面安装php5.4还算是比较方便的,主要是默认为php5.3,想用trait的时候,没5.4跑不了

 苹果下面安装php5.4还算是比较方便的,主要是默认为php5.3,想用trait的时候,没5.4跑不了啊。。

于是直接使用brew install php54,结果报错,查了下资料,原来,需要:

  • brew tap josegonzalez/homebrew-php
  • brew tap homebrew/dupes 
  • brew install php54 --with-mysql --with-intl --with-fpm --without-apache 

因为有装nginx。所以就without-apache了。。。

MTTSHOP包包免费商城系统
MTTSHOP包包免费商城系统

一款非常包包、衣服、鞋子类网站,页面干净清洁、一目了然,mttshop打造精致、简单、易用、免费的商城。 系统要求:IIS5.1以后,必须安装.net 3.5 安装步骤: 1、下载完成后,直接解压文件mttshop.rar 2、附加数据库:解压后的可以找一个叫db的文件夹,解压后直接附加就可以,支持SQL 2000、2005、2008 3、配置web.config文件,找到key=&qu

MTTSHOP包包免费商城系统 0
查看详情 MTTSHOP包包免费商城系统

安装好后,brew 会告诉你:

    The php.ini file can be found in:  
        /usr/local/etc/php/5.4/php.ini  
    ???? PEAR ????  
    If PEAR complains about permissions, 'fix' the default PEAR permissions and config:  
        chmod -R ug+w /usr/local/Cellar/php54/5.4.13/lib/php  
        pear config-set php_ini /usr/local/etc/php/5.4/php.ini  
    ???? Extensions ????  
    If you are having issues with custom extension compiling, ensure that this php is  
    in your PATH:  
        PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH"  
    PHP54 Extensions will always be compiled against this PHP. Please install them  
    using --without-homebrew-php to enable compiling against system PHP.  
    ????? INTL Support ?????  
    icu4c is broken as of mxcl/homebrew#03ed757c, so you will need to install intl as  
    a separate extension:  
        brew install php54-intl  
    ???? FPM ????  
    To launch php-fpm on startup:  
        * If this is your first install:  
            mkdir -p ~/Library/LaunchAgents  
            cp /usr/local/Cellar/php54/5.4.13/homebrew-php.josegonzalez.php54.plist ~/Library/LaunchAgents/  
            launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist  
        * If this is an upgrade and you already have the homebrew-php.josegonzalez.php54.plist loaded:  
            launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist  
            cp /usr/local/Cellar/php54/5.4.13/homebrew-php.josegonzalez.php54.plist ~/Library/LaunchAgents/  
            launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist  
    The control script is located at /usr/local/Cellar/php54/5.4.13/sbin/php54-fpm  
    Mountain Lion comes with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /sbin is before /usr/sbin in your PATH:  
      PATH="/sbin:$PATH"  
    You may also need to edit the plist to use the correct "UserName".  
    Please note that the plist was called 'org.php-fpm.plist' in old versions  
    of this formula.  
    To have launchd start php54 at login:  
        ln -sfv /usr/local/opt/php54/*.plist ~/Library/LaunchAgents  
    Then to load php54 now:  
        launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php54.plist  
    Warning: /usr/local/sbin is not in your PATH  
    You can amend this by altering your ~/.bashrc file  
登录后复制
记下这些路径和使用方法,以后会用得到

相关标签:
PHP速学教程(入门到精通)
PHP速学教程(入门到精通)

PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号