Author: Polaris (php@yeah.net)
First, the basic principle
Netscape EnterPRise Server executes CGI programs in two ways.
Specifies a directory that contains only CGI programs, all programs in that directory, whatever the suffix is executed, the program that specifies the end of a suffix is a CGI program that is executed anywhere on the server, and the PHP program executes in that manner.
The magnus-internal/cgi Bat,cgi,exe is included in Mime.types, which tells Netscape Enterprise server that the program with the suffix named Bat,cgi,exe has a type of magnus-internal/ CGI, but by default if these programs are not placed in the specified CGI program directory Netscape
Enterprise server will not execute them. Available through Netscape Enterprise Server manager| progams| Cgi
File type, select the Activate CGI as a file type as Yes, then save and apply. This way the program ending with Bat,cgi,exe will be executed anywhere.
Actually manually added in the obj.conf file
Service type= "magnus-internal/cgi" fn= "send-cgi"
Can.
Executing PHP programs on Netscape Enterprise Server requires a plugin program module when you start Netscape Enterprise Server
The module is started and the module tells Netscape Enterprise Server when the client requests the PHP program, which is a magnus-internal/cgi
Type of file, so the PHP program is executed.
To achieve the above functions, add the obj.conf file to the
Init fn= "Load-modules" funcs= "redirect-cgi" \
shlib= "/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so"
Nativethread= "No"
The module is started when Netscape Enterprise server is started.
And
ObjectType fn= "redirect-cgi" cgi_path= "/opt/local/www/cgi-bin/php"
Type= "magnus-internal/php"
The plugin module that was previously started tells Netscape Enterprise Server, a file of type magnus-internal/php,
It is necessary to interpret the execution through/opt/local/www/cgi-bin/php.
Add a row to the Mime.types
magnus-internal/php php3,phtml
, Netscape Enterprise server knows how to handle files with the suffix named php3,phtml.
Second, the specific implementation steps:
After downloading the original program from HTTP://WWW.WEBGENX.COM/PHP/PHPNES.PHP3, refer to the makefile file in the $netscape_home/nsapi/examples directory, compile the build redirect_ cgi.so file.
Place the file in a directory, for example:/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so.
Modify the Mime.types file to add magnus-internal/php php3,phtml.
Modify the obj.conf, after the other init-directives, add
Init fn= "Load-modules" funcs= "redirect-cgi" \
shlib= "/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so"
Nativethread= "No"
Modify Obj.conf
In objecttype fn= "Type-by-extension" and objecttype fn= "Force-type"
Type= "Text/plain" Between:
ObjectType fn= "redirect-cgi" cgi_path= "/opt/local/www/cgi-bin/php"
Type= "magnus-internal/php".
Modify Obj.conf
In objecttype fn= "Force-type" type= "Text/plain" and
Service method= "(get| HEAD) "Type=" Magnus-internal/imagemap "
Fn= "ImageMap" to join
Service type= "magnus-internal/cgi" fn= "send-cgi".
Put the compiled PHP file in the/opt/local/www/cgi-bin directory.
When you are finished, restart Netscape Enterprise server.
The above describes the UNIX platform on the Netscape Enterprise Server 3.x configuration PHP, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.