faqts : Computers : Programming : Languages : PHP : Installation and Setup : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

37 of 38 people (97%) answered Yes
Recently 1 of 1 people (100%) answered Yes

Entry

How can I setup PHP 3 with my old Netscape Enterprise 3 Server?

Feb 6th, 2004 11:10
Philip Olson, Alfred Lerch, Nathan Wallace, Wolf-Gideon Bleek


Note: In case you're interested in using newer (and more recommended 
versions) of PHP and Netscape Enterprise, read this Faqt:
  Documentation for Netscape Enterprise and PHP
  * http://www.faqts.com/knowledge_base/view.phtml/aid/14168/fid/783
--
Otherwise, if you're interested in using PHP 3 with Netscape Enterprise 
3, read the following (which is mostly here for archival reasons and 
those rare cases where people actually need this information):
A link for more information on php3 with Netscape Enterprise Server 3.6
  * http://swt-www.informatik.uni-hamburg.de/howto/php3.html
The obj.conf of a Netscape Enterprise 3.0 server is missing an entry to
handle the content-type magnus-internal/cgi for the Default
object. That content type is just exactly what the kwazy plugin
generates. 
It is only logical that such an entry must be present in the default
object, though. We want to be able to execute php3 scripts anywhere in
the Netscape tree - php3 scripts are CGI programs in our configuration,
so we have to provide a service entry for them. Obviously that service
entry is not present in the standard configuration, because in the
standard configuration CGI programs can only be executed in the /cgi-bin
subtree.
So all you have to do is to add to the obj.conf file of your server an
entry like
    <Object name="default">
    ...
    Service method="(GET|HEAD)" type="magnus-internal/cgi" fn="send-cgi"
    ...
    </Object>
just before all the other Service entries in your default object, after
you followed the kwazy installation description.
Step by Step installation instruction:
1. Compile the module as supplied. You get a file
   redirect_cgi.so.
2. Install that file in 
       /opt/local/suitespot-3.0/https-ghost/plugins/redirect
   or wherever your plugins directory is.
3. Do not change your magnus.conf as detailed in the
   original installation instructions.
   Instead add the following line to your obj.conf:
Init fn="load-modules" \
        funcs="redirect-cgi" \
shlib="/opt/local/suitespot-3.0/plugins/redirect/redirect_cgi.so" \
        NativeThread="no"
just after the other Init-directives in your obj.conf, before the
definition of the Default object.
Note the pathname, it must match the pathname from step 2.
You can stop and restart the server now, if you like. You can verify
that the module is loaded using /usr/proc/bin/pldd on the server process
on Solaris. You must get the redirect_cgi.so listed by pldd.
4. In your obj.conf locate the lines 
ObjectType fn="type-by-extension"
ObjectType fn="force-type" type="text/plain"
in your default object. Insert the following line
between them:
ObjectType fn="redirect-cgi" \
        cgi_path="/opt/local/www/cgi-bin/php" \
        type="magnus-internal/php"
If you are using my version of that module, you have to add the
parameter 'debug="no"' or 'debug="yes"' to that line.
5. In your obj.conf, locate the lines
ObjectType fn="force-type" type="text/plain"
Service method="(GET|HEAD)" type="magnus-internal/imagemap"  
fn="imagemap"
in your default objects and insert the following lines between them:
Service method="(GET|HEAD)" \
        type="magnus-internal/cgi" \
        fn="send-cgi"
as I explained above. This is the single step that is missing from the
original docs.
6. Also, to your mime.types file add the line
type=magnus-internal/php         exts=php3,phtml
where appropriate (the section at the bottom where
all the other magnus-internal types are).
That is it.
Alfred Lerch - 27 Oct 2000:
You may look as well to my question "Has anyone been able to install 
PHP 
4.0.x with Netscape Enterprise Server 4.0 on Solaris 7 ?" and Benoit 
Noss excellent webpage http://benoit.noss.free.fr/php/install-php4.html