holinhot
V2EX  ›  Apple

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

  •  
  •   holinhot · May 8, 2015 · 3336 views
    This topic created in 4200 days ago, the information mentioned may be changed or developed.

    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 replies  •  2015-05-08 23:11:45 +08:00
    holinhot
    holinhot
    OP
    May 8, 2015
    1
    奇怪我都停了怎么还能访问
    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
    66beta
    May 8, 2015
    2
    上xampp,保平安
    holinhot
    holinhot
    OP
    May 8, 2015
    3
    我知道了
    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
    holinhot
    OP
    May 8, 2015
    4
    @66beta 不喜欢
    Septembers
    Septembers
    May 8, 2015
    5
    vagrant 拯救你
    ysz1121
    ysz1121
    May 8, 2015
    6
    建议使用 vagrant + vbox进行开发
    railgun
    railgun
    May 8, 2015
    7
    mac 本身就已经开启了Apache服务,设置比较奇葩,反正我没弄成功过
    banri
    banri
    May 8, 2015
    8
    直接装MAMP即可
    或者楼上说的XAMMP
    banri
    banri
    May 8, 2015
    9
    @banri XAMPP(手滑~
    holinhot
    holinhot
    OP
    May 8, 2015
    10
    @banri 是手抖
    Emi
    Emi
    May 8, 2015
    11
    mamp 我在用。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1384 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 17:07 · PVG 01:07 · LAX 09:07 · JFK 12:07
    ♥ Do have faith in what you're doing.