<form id="hz9zz"></form>
  • <form id="hz9zz"></form>

      <nobr id="hz9zz"></nobr>

      <form id="hz9zz"></form>

    1. 明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

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

      [摘要]作者:polaris(php@yeah.net)一、基本原理 Netscape Enterprise Server以兩種方式執行CGI程序.指定一僅包含CGI程序的目錄,所有在該目錄下的程序不管是是什么后綴名都被執行 指定以某種后綴名結尾的程序均為CGI程序,放在服務器的任何位置都會被執行,PH...
      作者:polaris(php@yeah.net)
      一、基本原理
      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即可。  




      日韩精品一区二区三区高清