Configure PHP on the UNIX platform under Netscape Enterprise Server 3.x

Source: Internet
Author: User
Tags join php file
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 that are in that directory, regardless of what suffix name is executed specifies that the program that ends with a certain suffix is a CGI program that will be executed anywhere on the server and executed in that way by the PHP program.

Include magnus-internal/cgi Bat,cgi,exe in Mime.types, which tells Netscape Enterprise server suffix named Bat,cgi,exe program with a type of magnus-internal/ CGI, but by default if these programs are not placed under the specified CGI program directory Netscape
Enterprise server will not execute them. You can use Netscape Enterprise Server manager| progams| Cgi
File type, select Activate CGI as a file type Yes, and then save and apply. In this way the program ending with Bat,cgi,exe will be executed anywhere.
Actually manually add in the obj.conf file
Service type= "magnus-internal/cgi" fn= "send-cgi"
Can.
Executing a PHP program on Netscape Enterprise Server requires a plugin program module that, when you start the Netscape Enterprise server
will start the module, and the module will tell 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 function, add 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"
Start the Netscape Enterprise server when the module is started.
And
ObjectType fn= "redirect-cgi" cgi_path= "/opt/local/www/cgi-bin/php"
Type= "magnus-internal/php"
Tell Netscape Enterprise Server, a file of type magnus-internal/php, from a previously launched plugin module,
It is necessary to explain the execution through/opt/local/www/cgi-bin/php.
Add a line to the Mime.types
magnus-internal/php php3,phtml
, Netscape Enterprise server knows how to handle a file with a suffix named php3,phtml.
Second, the concrete realization 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 and generate redirect_ cgi.so files.
Place the file in a directory, for example:/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so.
Modify Mime.types file to join magnus-internal/php php3,phtml.

Modify the obj.conf, after the other init-directives, join
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" joins
Service type= "magnus-internal/cgi" fn= "send-cgi".
Put the compiled PHP file in the/opt/local/www/cgi-bin directory.

When you are done, restart Netscape Enterprise server.



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.