选择显示字体大小

在unix平台上的netscape enterprise server 3.x下配置php

作者: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 managerprogamscgi
  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下载原程序后,参考&#36.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="(gethead)" type="magnus-internal/imagemap"
    fn="imagemap"间加入
    service type="magnus-internal/cgi" fn="send-cgi"。
  把编译后生成的php文件放在/opt/local/www/cgi-bin目录下。

完成后重新启.netscape enterprise server即可。   


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons