国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Unix > 正文

在UNIX平臺上的Netscape Enterprise Server 3.x下配置PHP

2024-09-08 18:01:05
字體:
來源:轉載
供稿:網友
作者:polaris([email protected])
一、基本原理
netscape enterprise server以兩種方式執行cgi程序.

指定一僅包含cgi程序的目錄,所有在該目錄下的程序不管是是什么后綴名都被執行  指定以某種后綴名結尾的程序均為cgi程序,放在服務器的任何位置都會被執行,php程序以該方式執行。

在mime.types中包含magnus-internal/cgi bat,cgi,exe,這告訴netscape enterprise server后綴名為bat,cgi,exe的程序其類型為magnus-internal/cgi,但默認情況下如果這些程序不放在指定的cgi程序目錄下netscape
  enterprise server將不會執行它們。可以通過netscape enterprise server manager|progams|cgi
  file type,把activate cgi as a file type選為yes,然后save and apply后即可。這樣以bat,cgi,exe結尾的程序放在任何地方都會被執行。
實際上手工在obj.conf文件中添加
  service type="magnus-internal/cgi" fn="send-cgi"
  即可。
在netscape enterprise server上執行php程序需要一plugin程序模塊,在啟動netscape enterprise server時
  會啟動該模塊,當客戶端請求php程序時該模塊會告訴netscape enterprise server,這是個magnus-internal/cgi
  類型的文件,因此該php程序就被執行。
為實現以上功能,在obj.conf文件中加入
  init fn="load-modules" funcs="redirect-cgi" /
  shlib="/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so"
  nativethread="no"
  在啟動netscape enterprise server時啟動該模塊。
  和
  objecttype fn="redirect-cgi" cgi_path="/opt/local/www/cgi-bin/php"
  type="magnus-internal/php"
  通過先前啟動的plugin模塊告訴netscape enterprise server,類型為magnus-internal/php的文件,
  需通過/opt/local/www/cgi-bin/php來解釋執行。
在mime.types中加入一行
  magnus-internal/php php3,phtml
  后,netscape enterprise server就知道如何處理后綴名為php3,phtml的文件了。
二、具體實現步驟:

  從http://www.webgenx.com/php/phpnes.php3下載原程序后,參考$netscape_home/nsapi/examples目錄下的makefile文件,編譯生成redirect_cgi.so文件。
  把該文件放置在某一目錄下,例如:/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so。
  修改mime.types文件加入magnus-internal/php php3,phtml。
  
  修改obj.conf,在其它的init-directives后,加入
    init fn="load-modules" funcs="redirect-cgi" /
    shlib="/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so"
    nativethread="no"
  
  修改obj.conf
    在objecttype fn="type-by-extension"和objecttype fn="force-type"
    type="text/plain"間加入:
    objecttype fn="redirect-cgi" cgi_path="/opt/local/www/cgi-bin/php"
    type="magnus-internal/php"。
  
  修改obj.conf
    在objecttype fn="force-type" type="text/plain"和
    service method="(get|head)" type="magnus-internal/imagemap"
    fn="imagemap"間加入
    service type="magnus-internal/cgi" fn="send-cgi"。
  把編譯后生成的php文件放在/opt/local/www/cgi-bin目錄下。

完成后重新啟動netscape enterprise server即可。  

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 清远市| 高邑县| 大竹县| 梁河县| 十堰市| 梅河口市| 沧州市| 泉州市| 沂水县| 京山县| 武城县| 弥勒县| 安化县| 淮安市| 搜索| 新宾| 普兰店市| 汝州市| 平顶山市| 定边县| 泊头市| 西和县| 连云港市| 江津市| 石城县| 德保县| 安图县| 张家川| 富宁县| 沾化县| 吴忠市| 新源县| 土默特左旗| 汶上县| 涡阳县| 平和县| 淳化县| 湖口县| 渭源县| 甘洛县| 永清县|