From 0d9362ff2c431cd9d5f2329aa05056ef8e279cef Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Tue, 5 Aug 2003 21:52:44 +0000 Subject: [PATCH] Partial rewrite of configuration (was really needed because of simply wrong infomations...). New things in PHP 4.3.3 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@136741 c90b9560-bf6c-de11-be94-00142212c4b1 --- chapters/install.iplanet.xml | 160 +++++++++++++++++++++++++---------- 1 file changed, 116 insertions(+), 44 deletions(-) diff --git a/chapters/install.iplanet.xml b/chapters/install.iplanet.xml index 82d79aff1c..9dda915900 100644 --- a/chapters/install.iplanet.xml +++ b/chapters/install.iplanet.xml @@ -1,5 +1,5 @@ - + Servers-Netscape, iPlanet and SunONE @@ -7,13 +7,20 @@ installs of PHP, both for Sun Solaris and Windows versions. + + From PHP 4.3.3 on you can use PHP scripts with the NSAPI module to + generate custom directory listings and + error pages. Additional functions for Apache compatibility are also available. + For support in current webservers read the + note about subrequests. + You can find more information about setting up PHP for the Netscape Enterprise Server (NES) here: &url.netscape.nsapi; - Installing PHP with Netscape on Sun Solaris + Installing PHP with NES/iPlanet/SunONE Webserver on Sun Solaris To build PHP with NES/iPlanet/SunONE webservers, enter the proper install directory for the @@ -22,12 +29,6 @@ /opt/netscape/suitespot/. Please also read /php-xxx-version/sapi/nsapi/nsapi-readme.txt. - - - These instructions are written for Sun Solaris 2.6 with Netscape - Enterprise Server 3.6, conributed by bhager at invacare dot com. - - @@ -102,11 +103,11 @@ you may need to perform some additional configuration steps. - Configuration Instructions for NES + Configuration Instructions for NES/iPlanet/SunONE Firstly you may need to add some paths to the LD_LIBRARY_PATH environment - for Netscape to find all the shared libs. This can best done in the start - script for your Netscape server. Windows users can probably skip this + for SunONE to find all the shared libs. This can best done in the start + script for your SunONE webserver. Windows users can probably skip this step. The start script is often located in: /path/to/server/https-servername/start. You may also need to edit the configuration files that are @@ -115,7 +116,8 @@ - Add the following line to mime.types: + Add the following line to mime.types (you can do + that by the administration server): - Edit obj.conf and add the following, shlib will + Edit magnus.conf (for servers >= 6) or + obj.conf (for servers < 6) and add the following, shlib will vary depending on your OS, for Unix it will be something like /opt/netscape/suitespot/bin/libphp4.so. You should place the following lines after mime types init. - The php_ini parameter is optional but with it you can place your + (PHP >= 4.3.3) The php_ini parameter is optional but with it you can place your &php.ini; in your webserver config directory. @@ -144,25 +147,26 @@ Init fn=php4_init errorString="Failed to initialize PHP!" [php_ini="/path/to/php Configure the default object: + . . . .#NOTE this next line should happen after all 'ObjectType' and before all 'AddLog' lines Service fn="php4_execute" type="magnus-internal/x-httpd-php" [inikey=value inikey=value ...] - . - . - +. +. + ]]> - As additional parameters you can add some special &php.ini;-values, for example you + (PHP >= 4.3.3) As additional parameters you can add some special &php.ini;-values, for example you can set a docroot specific to the context php4_execute is called. - Create a new object for the usage of PHP: + This is only needed if you want to configure a directory that only consists of + PHP scripts (same like a cgi-bin directory): @@ -171,6 +175,9 @@ Service fn=php4_execute [inikey=value inikey=value ...] ]]> + After that you can configure a directory in the Administration server and assign it + the style x-httpd-php. All files in it will get executed as PHP. + This is nice to hide PHP usage by renaming files to .html. @@ -206,21 +213,9 @@ AuthTrans fn=php4_auth_trans - - If you are running Netscape Enterprise 4.x, then you should use the - following: Place these lines after the mime types init, - and everything else is similar to the example configuration above. - (Contributed by Graeme Hoose, GraemeHoose at BrightStation dot com). - - - - - Installing PHP with Netscape on Windows + Installing PHP with NES/iPlanet/SunONE on Windows To Install PHP as CGI (for Netscape Enterprise Server, iPlanet, SunONE, perhaps Fastrack), do the following: @@ -272,7 +267,7 @@ ftype PHPScript=c:\php\php.exe %1 %* To Install PHP as NSAPI (for Netscape Enterprise Server, - iPlanet, SunONE, perhaps Fastrack, do the following: + iPlanet, SunONE, perhaps Fastrack), do the following: @@ -302,22 +297,23 @@ ftype PHPScript=c:\php\php.exe %1 %* - Stop your web service and edit obj.conf. - At the end of the Init section, place these two lines - (necessarily after mime type init!): + Edit magnus.conf (for servers >= 6) or + obj.conf (for servers < 6) and add the following: + You should + place the the lines after mime types init. - The php_ini parameter is optional but with it you can place your + (PHP >= 4.3.3) The php_ini parameter is optional but with it you can place your &php.ini; in your webserver config directory. - In The < Object name="default" > + In the <Object name="default"> section, place this line necessarily after all 'ObjectType' and before all 'AddLog' lines: @@ -325,15 +321,15 @@ Init fn="php4_init" errorString="Failed to initialise PHP!" [php_ini="c:/path/to Service fn="php4_execute" type="magnus-internal/x-httpd-php" [inikey=value inikey=value ...] ]]> - As additional parameters you can add some special &php.ini;-values, for example you + (PHP >= 4.3.3) As additional parameters you can add some special &php.ini;-values, for example you can set a docroot specific to the context php4_execute is called. - At the end of the file, create a new object called - x-httpd-php, by inserting these lines: + This is only needed if you want to configure a directory that only consists of + PHP scripts (same like a cgi-bin directory): @@ -342,6 +338,9 @@ Service fn=php4_execute [inikey=value inikey=value ...] ]]> + After that you can configure a directory in the Administration server and assign it + the style x-httpd-php. All files in it will get executed as PHP. + This is nice to hide PHP usage by renaming files to .html. @@ -361,6 +360,79 @@ Service fn=php4_execute [inikey=value inikey=value ...] &url.netscape.nsapi; + + Special use for error pages or self-made directory listings (PHP >= 4.3.3) + + You can use PHP to generate the error pages for "404 Not Found" + or similar. Add the following line to the object in obj.conf for + every error page you want to overwrite: + + + + where XXX ist the HTTP error code. Please delete any other Error + directives which could interfere with yours. + If you want to place a page for all errors that could exist, leave + the code parameter out. Your script can get the HTTP status code + with $_SERVER['ERROR_TYPE']. + + + Another posibility is to generate self-made directory listings. + Just create a PHP script which displays a directory listing and + replace the corresponding default Service line for + type="magnus-internal/directory" in obj.conf with the following: + + + + For both error and directory listing pages the original URI and + translated URI are in the variables $_SERVER['PATH_INFO'] and + $_SERVER['PATH_TRANSLATED']. + + + + Note about <function>nsapi_virtual</function> and subrequests (PHP >= 4.3.3) + + The NSAPI module now supports the nsapi_virtual function + (alias: virtual) + to make subrequests on the webserver and insert the result in the webpage. + The problem is, that this function uses some undocumented features from + the NSAPI library. + + + Under Unix this is not a problem, because the module automatically looks + for the needed functions and uses them if available. If not, nsapi_virtual + is disabled. + + + Under Windows limitations in the DLL handling need the use of a automatic + detection of the most recent ns-httpdXX.dll file. This is tested for servers + till version 6.0. If a newer version of the SunONE server is used, the detection + fails and nsapi_virtual is disabled. + + + If this is the case, try the following: + Add the following parameter to php4_init in + magnus.conf/obj.conf: + + + + where XX is the correct DLL version number. To get it, look in the server-root + for the correct DLL name. The DLL with the biggest filesize is the right one. + + + You can check the status by using the phpinfo function. + + + + But be warned: Support for nsapi_virtual is EXPERIMENTAL!!! + + +