V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
holinhot
V2EX  ›  Apple

为什么我的 mac php+apache 不成功啊

  •  
  •   holinhot · 2015-05-08 10:01:43 +08:00 · 2602 次点击
    这是一个创建于 3489 天前的主题,其中的信息可能已经有所发展或是发生改变。

    LoadModule php5_module libexec/apache2/libphp5.so
    前面的注释我取消了啊
    LouisdeMacBook-Pro:local louis$ sudo find -name libphp5.so
    find: illegal option -- n
    usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
    find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
    LouisdeMacBook-Pro:local louis$ sudo find / -name libphp5.so
    find: /dev/fd/3: Not a directory
    find: /dev/fd/4: Not a directory
    /usr/libexec/apache2/libphp5.so
    /usr/local/Cellar/php54/5.4.40/libexec/apache2/libphp5.so
    /usr/local/Cellar/php55/5.5.24/libexec/apache2/libphp5.so
    /usr/local/Cellar/php56/5.6.8/libexec/apache2/libphp5.so

    apache运行正常 但是php跑不起来啊。我别外装的版本在phpstorm运行正常 。自带的apache开启php总不成功

    11 条回复    2015-05-08 23:11:45 +08:00
    holinhot
        1
    holinhot  
    OP
       2015-05-08 10:05:12 +08:00
    奇怪我都停了怎么还能访问
    LouisdeMacBook-Pro:local louis$ sudo apachectl stop
    LouisdeMacBook-Pro:local louis$ curl -I 127.0.0.1
    HTTP/1.1 200 OK
    Date: Fri, 08 May 2015 02:04:35 GMT
    Server: Apache/2.4.9 (Unix)
    Content-Location: index.html.en
    Vary: negotiate
    TCN: choice
    Last-Modified: Mon, 11 Jun 2007 18:53:14 GMT
    ETag: "2d-432a5e4a73a80"
    Accept-Ranges: bytes
    Content-Length: 45
    Content-Type: text/html
    66beta
        2
    66beta  
       2015-05-08 10:06:31 +08:00
    上xampp,保平安
    holinhot
        3
    holinhot  
    OP
       2015-05-08 10:07:37 +08:00
    我知道了
    LouisdeMacBook-Pro:local louis$ sudo apachectl -k start
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using LouisdeMacBook-Pro.local. Set the 'ServerName' directive globally to suppress this message
    LouisdeMacBook-Pro:local louis$ curl -I 127.0.0.1
    HTTP/1.1 200 OK
    Date: Fri, 08 May 2015 02:07:01 GMT
    Server: Apache/2.4.9 (Unix) PHP/5.5.14
    Content-Location: index.html.en
    Vary: negotiate
    TCN: choice
    Last-Modified: Mon, 11 Jun 2007 18:53:14 GMT
    ETag: "2d-432a5e4a73a80"
    Accept-Ranges: bytes
    Content-Length: 45
    Content-Type: text/html
    holinhot
        4
    holinhot  
    OP
       2015-05-08 10:08:00 +08:00
    @66beta 不喜欢
    Septembers
        5
    Septembers  
       2015-05-08 10:35:13 +08:00
    vagrant 拯救你
    ysz1121
        6
    ysz1121  
       2015-05-08 14:06:04 +08:00
    建议使用 vagrant + vbox进行开发
    railgun
        7
    railgun  
       2015-05-08 14:12:31 +08:00
    mac 本身就已经开启了Apache服务,设置比较奇葩,反正我没弄成功过
    banri
        8
    banri  
       2015-05-08 14:23:39 +08:00
    直接装MAMP即可
    或者楼上说的XAMMP
    banri
        9
    banri  
       2015-05-08 14:24:37 +08:00
    @banri XAMPP(手滑~
    holinhot
        10
    holinhot  
    OP
       2015-05-08 17:10:29 +08:00
    @banri 是手抖
    Emi
        11
    Emi  
       2015-05-08 23:11:45 +08:00
    mamp 我在用。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5799 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:34 · PVG 14:34 · LAX 22:34 · JFK 01:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.