我曾尝试按照许多教程来设置原生OSX 10.8的PHP,但未能完成它,并且觉得如果我继续下去,我会更糟糕。这是我无法告诉你的信息(如果你需要更多信息,请告诉我):
在终端中,键入which php
会导致/usr/bin/php
我安装了XCode 4.5.2
我安装了命令行工具
我安装了XQuartz-2.7.4
我安装了GCC 10.7 v2
在Finder中,我的/Library/WebServer/Documents/
显示:
info.php
以及包含orig
,index.html.en
的文件夹info.php
(我复制了这个以测试在不同范围内运行的PHP - ¿may?,显然不起作用), PoweredByMacOSX.gif
和PoweredByMacOSXLarge.gif
这些目录存在:
/usr/local/include
/usr/local/bin
/usr/local/lib
/usr/local/man/man1
~/.pearrc
返回-bash: /Users/me/.pearrc: No such file or directory
我在rMBP上运行10.8.2
我的.bash_profile
:
export PATH="$HOME/bin:$PATH"
if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then
. `brew --prefix`/etc/bash_completion.d/git-completion.bash
fi
GIT_PS1_SHOWDIRTYSTATE=true
if [ -f `brew --prefix`/etc/bash_completion.d/git-prompt.sh ]; then
. `brew --prefix`/etc/bash_completion.d/git-prompt.sh
fi
PS1='CANT SHOW YOU'
if [ -f `brew --prefix`/etc/autojump ]; then
. `brew --prefix`/etc/autojump
fi
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export SCALING_SECRET_TOKEN="CANT SHOW YOU"
我的.bashrc
:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
位于me.conf
的我的用户帐户conf /etc/apache2/users
:
<Directory "/Users/me/Sites/">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
我的httpd.conf
:
LoadModule php5_module libexec/apache2/libphp5.so // I removed the # at the begining
//under <Directory "/Library/WebServer/Documents">
AllowOverride All // changed to All from None
我遇到了这个错误:
Error: uncaught throw `Failed executing: ./configure --prefix=/usr/local/Cellar/php54/5.4.8 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-bcmath --enable-calendar --with-zlib=/usr/local/Cellar/zlib/1.2.7 --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-xsl=/usr --with-curl=/usr/local/Cellar/curl/7.28.0 --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/local/Cellar/freetype/2.4.10 --with-mcrypt=/usr/local/Cellar/mcrypt/2.5.8 --with-jpeg-dir=/usr/local/Cellar/jpeg/8d --with-png-dir=/usr/local/Cellar/libpng/1.5.13 --with-gettext=/usr/local/Cellar/gettext/0.18.1.1 --with-snmp=/usr --with-libedit --mandir
和这一个:
Error: uncaught throw `No available formula for zlib '