不少人架Apache+php+mysql時,都是利用Linux光碟自動安裝而成,所以常常在使用PHP函式時,會發生PHP Lib無法支援的情況,就是安裝時沒有把模組順便抓進來啦 @ @
這時候就會苦了使用者,畢竟要在Linux下重新安裝Apache+PHP是很麻煩的事情,下面就有一個較為簡單的方法........
首先在解開的 apache 目錄下執行下列指令安裝:
./configure --prefix=/usr/local/apache --enable-module=so
這行很重要!
./gmake
./gmake install
則預設安裝的目錄為 /usr/local/apache_version 或者 /usr/local/apache,接著解開 php 的軟體,用下列的方式安裝:
> ./configure --with-apxs=/usr/local/apache/bin/apxs \
--enable-magic-quotes --enable-bcmath --enable-ftp \
--enable-mime_magic --with-zlib=/usr/local --with-bz2=/usr/local \
--disable-xml --with-dom=/usr/local --with-dom-xslt=/usr/local \
--with-dom-exslt=/usr/local --with-gd=/usr/local --with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local --with-jpeg-dir=/usr/local --with-tiff-dir=/usr/local \
--with-xpm-dir=/usr/local --with-ttf=/usr/local --with-freetype-dir=/usr/local \
--with-iconv=/usr/local --with-imap=/usr/local --with-mysql=/usr/local/mysql
with表示你要抓入什麼模組,當然看一下那些是自己沒有的啦,沒要有先安裝。
without的話,就是不要安裝什麼模組。
> gmake
> gmake install
這個方法的好處就是以後在重新安裝PHP時,「不需要再度安裝Apache」。
如果從來沒試過,安裝時失敗率通常都是滿高的,請多耐心嘗試。
PS:部分資料為網路上擷取 m(_ _)m
- Sep 16 Tue 2008 14:00
PHP更新的方法
close
全站熱搜
留言列表
發表留言