安裝 php 時出了問題

Mac OS X 平台上程式設計的相關問題討論

版主: bryanchangdigdog謝孟叡

回覆文章
內容
發表人
頭像
shadow
常吃冰
文章: 442
註冊時間: 12/01/2005 11:14 am

安裝 php 時出了問題

#1 文章 shadow »

因為手上多出一台 mac mini
打算要用它來架設一台含有 apache + php + mysql 的主機
我檢查了一下機器
已經內建 apache
所以我參考
http://switch.richard5.net/isp-in-a-box ... t-started/
安裝好 mysql

當我參考同一網站要安裝 php4 的時候
發現這樣的 error

代碼: 選擇全部

unassigned-48:/software/php-4.4.4 root# CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
> ./configure --prefix=/Library/PHP4 \
> --mandir=/usr/share/man \
> --infodir=/usr/share/info \
> --sysconfdir=/etc \
> --with-zlib \
> --with-xml \
> --with-zlib-dir=/usr \
> --with-openssl \
> --enable-exif \
> --enable-ftp \
> --enable-mbstring \
> --enable-mbregex \
> --enable-sockets \
> --with-mysql=/usr/local/mysql \
> --with-mysqli=/usr/local/mysql/bin/mysql_config \
> --with-apache
creating cache ./config.cache
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... powerpc-apple-darwin8.5.0
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH


不知道該怎麼辦才好?
頭像
ulysses
討論區管理員
文章: 2475
註冊時間: 05/18/2001 1:01 am
來自: Forgotten Realm
聯繫:

#2 文章 ulysses »

簡單的回答就是你沒安裝 Xcode... :oops:
更簡單的回答就是你根本不必安裝 PHP...系統早就內建了... :oops:
ash nazg durbatuluk, ash nazg gimbatul,
ash nazg thrakatuluk agh burzum-ishi krimpatul.
頭像
詹姆士
討論區管理員
文章: 2894
註冊時間: 04/22/2005 7:51 pm
來自: 台北
聯繫:

Re: 安裝 php 時出了問題

#3 文章 詹姆士 »

shadow 寫:unassigned-48:/software/php-4.4.4 root# CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
> ./configure --prefix=/Library/PHP4 \
> --mandir=/usr/share/man \
> --infodir=/usr/share/info \
> --sysconfdir=/etc \
> --with-zlib \
> --with-xml \
> --with-zlib-dir=/usr \
> --with-openssl \
> --enable-exif \
> --enable-ftp \
> --enable-mbstring \
> --enable-mbregex \
> --enable-sockets \
> --with-mysql=/usr/local/mysql \
> --with-mysqli=/usr/local/mysql/bin/mysql_config \
> --with-apache
creating cache ./config.cache
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... powerpc-apple-darwin8.5.0
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

我是看這段拿去搜尋原因,其實大部分的說明都是說,因為你沒有安裝 gcc 或 cc,
或是您安裝了沒有把它加入 $Path 內。

參考:http://www.oreillynet.com/cs/user/view/cs_msg/19334
【老地方神聖狂吃團之狂吃客】
http://flickr.com/photos/xx3734
頭像
進藤光
冰果室元老
文章: 3205
註冊時間: 03/16/2005 5:18 pm
來自: insoler.com
聯繫:

#4 文章 進藤光 »

ulysses 寫:簡單的回答就是你沒安裝 Xcode... :oops:
更簡單的回答就是你根本不必安裝 PHP...系統早就內建了... :oops:


還有更加簡單的回答喔~~ :badgrin:
世界初、支援RAW相片上傳、分享、學習交流的 insoler • 社群網站https://www.insoler.com
攝影書:「美食写真の達人」進藤ヒカル・著
頭像
shadow
常吃冰
文章: 442
註冊時間: 12/01/2005 11:14 am

#5 文章 shadow »

啊!
原來如此
OSX 內建了 apache & php
原先的問題不存在了

但是新的問題來了
系統內建的 php 不認得我的 mysql
調了很久都沒辦法成功說
頭像
shadow
常吃冰
文章: 442
註冊時間: 12/01/2005 11:14 am

#6 文章 shadow »

剛剛找到這個東東
http://www.mamp.info/en/help.php
基本上來說
他是把 apache php mysql 做在一起的一個套件包
還包括了 eAccelerator and phpMyAdmin and Zend Optimizer
php 還可以選 php4 or php5
還有管理介面
免安裝
只要把整個目錄拉到 app 裡頭
直接去執行就好了
還附了一個 widget
沒那麼歸毛的人可以用上面找到的套件
真的很好用喔

我還是想手動設定
所以 php 跟 mysql 的連結還是要搞定
再請大家教教我
頭像
shadow
常吃冰
文章: 442
註冊時間: 12/01/2005 11:14 am

#7 文章 shadow »

總算找到解快的辦法了!

去 /etc/php.ini 裡面設定
mysql.default_socket = /tmp/mysql.sock
重新啟動 apache
就可以了

喔耶!
kondou
新生訓練中
文章: 2
註冊時間: 06/21/2007 4:09 pm

#8 文章 kondou »

內建的無法使用相簿縮圖功能 因內建的並無將 GD給安裝進去 目前苦惱中~~
頭像
shadow
常吃冰
文章: 442
註冊時間: 12/01/2005 11:14 am

#9 文章 shadow »

我後來放棄了
買了一台 intel mac mini
灌 FreeBSD 在裡頭
記憶體 512M 就跑的很開心

雖一的問題是
沒接螢幕的時候重開機會卡住
不知道為什麼
真是怪栽
回覆文章