系統管理
1752578 會員
4044 線上
108788 解決方案
發表新文章

如何在我的 HP-UX 下 compile Apache + PHP

 
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

# uname -a

HP-UX tfd B.11.11 U 9000/800 839849660 unlimited-user license

# gcc -v

Reading specs from /usr/local/lib/gcc/hppa2.0w-hp-hpux11.11/3.4.3/specs

Configured with: ./configure : (reconfigured) ./configure : (reconfigured) ./configure : (reconfigured) ./configure : (reconfigured) ./configure : (reconfigured) ./configure

Thread model: single

gcc version 3.4.3





我在 compile 的時候,都會出現以下錯誤訊息:

/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (.libs/htpasswd.o) was detected. The linked output may not run on a PA 1.x system.



請問要怎麼解決呢?



By the way, 我想找一位 HP-UX 的系統管理顧問,有沒有人可以協助我的?
8則回覆 8
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

關於這個問題你必須先安裝兩隻patch更新ld和相關的library(no reboot require), 然後再compile.

PHSS_26560

PHCO_27434



或者若您不堅持要自己compile, 可透過HP官方所提供的

depot套件安裝, 該套件已整合了apache, webmin,

tomcat, php, 其中php的版本為4.3.8 更多詳細的資訊可參

考以下URL

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXWSATW210
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

感謝!



1. 請問這兩個 Patch 去哪裡下載?



2. 是不是用 swinstall 就可以安裝 Patch 了呢?
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

answer 1:

please goto following URL.

http://www.hp.com.tw/itrc/home/

點左手邊的登入 -> 用你自己的帳號 -> 於find a specific patch方格中輸入patch name, 然後search就可以找到檔案. 選擇patch後, 點"Add to selected patch list", 兩個patch都加入patch list後再點"download selected"就可以了, 其中會有三個file(檔案關聯性), 總共大小約32MB



answer 2:

將你抓到的檔案解到 /tmp/package下.

接著下swinstall -s /tmp/package/*.depot

再把要安裝的東西以m標示起來, 然後 Action -> install
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP



因為預設的 HP-UX WS 沒有我要的模組,所以一定要自己 compile.



我把 Patch 安裝好了~



不過還是有問題耶



錯誤訊息如下:



libtool: link: warning: this platform does not like uninstalled shared libraries

libtool: link: `httpd' will be relinked during installation



我還是執行 make install 不過 httpd 完全無法啟動。



我還能做什麼嘗試呢?
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

我想, 你所說的模組應該是指mod_tcl, mod_perl,

mod_auth_mysql這類的模組吧. 其實可透過兩種方式進行安

裝模組, ㄧ是將module透過statically link到apache的

執行檔, 也就是你提到的方法, 另ㄧ種安裝方式, 彈性較大,

用apache提供的apxs 以dynamically load方式安裝

module. 相較於statically link, 透過這個方式每次

要新增module時, 不用再重新config, make, make

install你的apache httpd web server.



自HP所提供的web server package說明中, 我們可以知道,

我們可以透過apxs來安裝我們想要安裝的module.





比方說我們想裝mod_dav這個module,

Step 1: unpack the tarball

Step 2: # cd /tmp/mod_dav

Step 3: # ./configure --with-apxs=/opt/apache/bin/apxs;make;make install

Step 4: # vi /opt/apache/conf/httpd.conf

加入以下文字

Loadmodule dav_module libexec/libdav.so

Addmodule mod_dav.c

Step 5: # /opt/apache/bin/apachectl restart

重起apache daemon就算完成囉.



其他的module安裝方式幾乎都大同小異, 翻翻該module的readme or install文件,

搜尋apxs或DSO, 就可已找到相關config的方法了.



以上提供您參考.
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

我發現錯誤了,只要把 Apache 預設的執行 User 把 nobody 改掉即可。



現在 Apache 已經可以成功 compile 並且執行了。



不過我說的模組是 PHP 的模組,現在最大的問題是無法 compile PHP



make 到一半的時候會出現以下錯誤訊息,並且中斷編譯:



/usr1/build/php-4.3.10/Zend/zend_strtod.c:240: warning: data definition has no type or storage class

/usr1/build/php-4.3.10/Zend/zend_strtod.c:386: error: parse error before "u_int32_t"

/usr1/build/php-4.3.10/Zend/zend_strtod.c:386: warning: no semicolon at end of struct or union

/usr1/build/php-4.3.10/Zend/zend_strtod.c: In function `Balloc':

/usr1/build/php-4.3.10/Zend/zend_strtod.c:405: error: dereferencing pointer to incomplete type

/usr1/build/php-4.3.10/Zend/zend_strtod.c:409: error: invalid application of `sizeof' to incomplete type `/usr1/build/php-4.3.10/Zend/zend_strtod.c'

..

..

..

/usr1/build/php-4.3.10/Zend/zend_strtod.c:1570: error: dereferencing pointer to incomplete type

/usr1/build/php-4.3.10/Zend/zend_strtod.c:1571: error: dereferencing pointer to incomplete type

*** Error exit code 1



Stop.

watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

php 4.3.10的zend_strtod.c有bug, try get CVS update from http://snaps.php.net/
watermelonyu
教授

如何在我的 HP-UX 下 compile Apache + PHP

我找到解法了..





節錄至:

http://supportforum.sun.com/sunos/index.php?t=msg&th=2209&start=0&rid=0



For some reason u_int32_t remains undefined.

Didn't bother to investigate why.

What I did instead (sol9, PHP 5.0.3):

- edit zend_strtod.c

- add the following kludge after line 138:



#if !defined(u_int32_t)

#define u_int32_t unsigned int

#endif



- gmake again

- enjoy (so far)