Home > Backend Development > PHP Tutorial > Configuring PHP under Netscape Enterprise Server 3.x on UNIX platforms

Configuring PHP under Netscape Enterprise Server 3.x on UNIX platforms

WBOY
Release: 2016-08-08 09:34:11
Original
1012 people have browsed it

Author: polaris(php@yeah.net)
1. Basic principles
Netscape EnterPRise Server executes CGI programs in two ways.

Specify a directory that only contains CGI programs. All programs in this directory will be executed regardless of the suffix name. Specify programs ending with a certain suffix name as CGI programs and will be executed anywhere on the server. PHP The program is executed this way.

Containing magnus-internal/cgi bat,cgi,exe in mime.types tells Netscape Enterprise Server that programs with suffixes of bat,cgi,exe are of type magnus-internal/cgi, but by default if these programs are not Netscape in the specified CGI program directory
Enterprise Server will not execute them. Can be accessed through Netscape Enterprise Server Manager|Progams|CGI
File Type, select Activate CGI as a file type as Yes, then Save and apply. In this way, programs ending with bat, cgi, or exe will be executed wherever they are placed.
Actually add it manually in the obj.conf file
Service type="magnus-internal/cgi" fn="send-cgi"
That’s it.
A plugin program module is required to execute PHP programs on Netscape Enterprise Server. When starting Netscape Enterprise Server
This module will be started. When the client requests a PHP program, the module will tell Netscape Enterprise Server that this is magnus-internal/cgi
type file, so the PHP program is executed.
To achieve the above functions, add
to the obj.conf file Init fn="load-modules" funcs="redirect-cgi"
shlib="/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so"
NativeThread="no"
Start this module when starting Netscape Enterprise Server.
and
ObjectType fn="redirect-cgi" cgi_path="/opt/local/www/cgi-bin/php"
type="magnus-internal/php"
Tell Netscape Enterprise Server through the previously launched plugin module that the file type is magnus-internal/php,
It needs to be interpreted and executed through /opt/local/www/cgi-bin/php.
Add a line to mime.types
magnus-internal/php php3,phtml
After that, Netscape Enterprise Server knows how to handle files with the suffix php3, phtml.
2. 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 to compile and generate the redirect_cgi.so file.
Place the file in a certain 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 obj.conf and add
after other Init-directives 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"
Add between type="text/plain":
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" added
Service type="magnus-internal/cgi" fn="send-cgi".
Put the compiled php file in the /opt/local/www/cgi-bin directory.

Once completed, restart Netscape Enterprise Server.

The above introduces the configuration of PHP under Netscape Enterprise Server 3.x on the UNIX platform, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template