Configure PHP under netscapepoliciseserver3.x on UNIX

Source: Internet
Author: User
: This article mainly introduces how to configure PHP under netscapepoliciseserver3.x on the UNIX platform. if you are interested in the PHP Tutorial, refer to it. Author: polaris (php@yeah.net)
I. Basic principles
Netscape EnterPRise Server executes CGI programs in two ways.

Specify a directory that contains only CGI programs. all programs under this directory, no matter what suffix name is, are executed and all programs ending with a specified suffix name are CGI programs, the PHP program is executed at any location on the server.

In mime. types contains magnus-internal/cgi bat, cgi, and exe. This tells Netscape Enterprise Server programs with the suffix bat, cgi, and exe whose type is magnus-internal/cgi, however, by default, if these programs are not placed in the specified CGI program directory, Netscape
Enterprise Server will not execute them. You can use Netscape Enterprise Server Manager | Progams | CGI
File Type, set Activate CGI as a file type to Yes, and Save and apply. In this way, programs ending with bat, cgi, and exe will be executed anywhere.
In fact, manually add in the obj. conf file
Service type = "magnus-internal/cgi" fn = "send-cgi"
You can.
To execute the PHP program on Netscape Enterprise Server, a plug-in module is required. when Netscape Enterprise Server is started
This module will be started. when the client requests the PHP program, this module will tell Netscape Enterprise Server that this is magnus-internal/cgi
The PHP program is executed.
To implement the above functions, add the following in the obj. conf file:
Init fn = "load-modules" funcs = "redirect-cgi "\
Shlib = "/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so"
NativeThread = "no"
This 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 plug-in module that was previously started tells Netscape Enterprise Server that the file type is magnus-internal/php,
You must use/opt/local/www/cgi-bin/php to explain the execution.
Add a row to mime. types
Magnus-internal/php php3, phtml
Then, Netscape Enterprise Server will know how to handle php3 and phtml files.
II. specific steps:

Slave.
Place the file in a directory, such as/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so.
Modify the mime. types file to add magnus-internal/php php3 and phtml.

Modify obj. conf and 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:
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"
Service type = "magnus-internal/cgi" fn = "send-cgi ".
Put the compiled PHP file in the/opt/local/www/cgi-bin directory.

Restart Netscape Enterprise Server.

The above describes how to configure PHP under Netscape Enterprise Server 3.x on the UNIX platform, including related content, and hope to help those who are interested in the PHP Tutorial.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.