PDA

查看完整版本 : 徽求帮助!!!!!!!!!!!


lau
2005-12-11, 11:31 PM
Compiling your own custom PHP
If you need to use PHP modules we do not support, you can (if you're lion-mettled) compile PHP in your home directory and tell PHP scripts to use this binary instead of the default system PHP binary.
http://php.net has good instructions for compiling, and once that's completed, you can make it work like this.

Let's assume that you installed PHP into /home/username/php/. The binary is /home/username/php/bin/php. Your domain is hosted from /home/username/domain.com.

Copy that binary into some location accessible from your domain (cgi-bin/ is a good idea). So:

cp /home/username/php/bin/php /home/username/domain.com/cgi-bin/php

For the sake of maximum ease, rename the PHP binary to end in .cgi:

mv /home/username/domain.com/cgi-bin/php /home/username/domain.com/cgi-bin/php.cgi

Now create an .htaccess file to redirect all PHP requests to this PHP binary intead of going through the default system PHP binary. Put this inside:

AddHandler custom-php .php .pcgi
Action custom-php /cgi-bin/php.cgi

Note: You can use whatever extension(s) in the AddHandler line. Separate multiple entries with spaces.

Make sure that the Action line points to a useful URL. In the example above, it points to http://domain.com/cgi-bin/php.cgi. If your PHP binary is in a different location, use a different URL. And keep in mind that it's a URL (sans domain name), NOT a path for the filesystem. Don't forget that first slash!

Good luck!

请熟悉这方面的大大指点一下,小弟不知如何下手 :bow

licheng
2005-12-12, 02:10 AM
您哪個地方需要幫忙?

是編譯 PHP,還是...

看說明文件內容,是需要編譯 PHP,是嗎?如果網站是架在自己的電腦上,而且作業系統不是 Windows,那就簡單多了。如果網站不是架設在自己的電腦上,那麼,您必須擁有 shell login 的帳號,以及該主機提供諸如 GCC 等編譯工具。

lau
2005-12-12, 11:24 PM
这篇文章我看得不太懂
这篇是DREAMHOST的一篇FAQ
我想开一个PHP modules ,他们不能提供,所以要自己compile
我又不太懂LINUX环境,所以想请大大帮一个忙~
licheng大大,可以帮一下小弟吗?

licheng
2005-12-13, 02:01 AM
Dreamhost 的環境,小弟還算了解。不過,方才想了一下,如果要代為編譯,必須要有您的登入帳號跟密碼。這一點,就很為難了。帳號跟密碼,是很敏感的資訊。進去之後的權限,是很大的。即便您事後更改密碼,小弟也難脫嫌疑。

這是一種瓜田李下的兩難。

另外,如果僅僅是技術上有什麼難解的地方,小弟可以提供一些建議。但是,您是系統維護者,如果真的對 Linux 不是很熟悉,幫您一次忙,下次如果 PHP 有安全上的更新,或是模組上的更新,是不是還得再幫一次?

這些顧慮,希望您能夠體諒。

只要不是代為操刀,編譯或安裝上有什麼疑問,小弟儘量協助。

真的對 Linux 一無所悉,沒有任何編譯安裝經驗的話,是否要自行編譯模組,您最好再考慮一下。畢竟,系統或程式,安裝不難,難在維護。

lau
2005-12-14, 10:20 PM
感谢licheng
这三天小弟家的网络出了问题,一直连不上
等网络好了我会联系大大的
谢谢~