Dan,
Below are the steps I took to get PHP working with iPlanet 4.X . This was on Solaris 2.6. Hope this helps.
- Add "#define XP_UNIX 1" in /path_to_netscape_homedir/plugins/include/nsapi.h
to successfully compile.
- Use the following options with the configure script when compiling PHP (at least these are the options I used. You decide what is best for your environment):
--enable-sigchild Enable PHP's own SIGCHLD handler.
--enable-libgcc Enable explicitly linking against libgcc
--enable-discard-path
--enable-magic-quotes
--enable-track-vars
--with-openssl Include OpenSSL support in SNMP.
--with-ldap[=DIR] Include LDAP support. DIR is the LDAP base install directory, defaults to /usr/local/ldap
--with-java[=DIR] DIR is the base install directory for the JDK.
--with-oracle[=DIR] Include Oracle-oci7 support. Default DIR is ORACLE_HOME.
--with-oci8[=DIR] Include Oracle-oci8 support. Default DIR is ORACLE_HOME.
--enable-trans-sid Enable transparent session id propagation
--enable-memory-limit Compile with memory limit support.
--enable-versioning Export only required symbols.
--enable-sysvshm Enable the System V shared memory support
--enable-sysvsem Enable System V semaphore support.
--with-nsapi=/the_path/to/my/netscape/server/root
- Add the following line to mime.types
type=magnus-internal/x-httpd-php exts=php,php3,php4
- Add the following to the obj.conf. Note, place following two lines after mime types init;
Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" shlib="/<path-to-netscape-server>/bin/libphp4.so"
Init fn=php4_init errorString="Failed to initialize PHP!"
<Object name="default">
.
.
.
.#NOTE this next line should happen after all 'ObjectType' and before all 'AddLog' lines
Service fn="php4_execute" type="magnus-internal/x-httpd-php"
.
.
</Object>
<Object name="x-httpd-php">
ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
Service fn=php4_execute
</Object>
- Add the following Authentication configuration to the obj.conf.
PHP authentication cannot be used with any other authentication.
ALL AUTHENTICATION IS PASSED TO YOUR PHP SCRIPT. To configure PHP
Authentication for the entire server, add the following line:
<Object name="default">
AuthTrans fn=php4_auth_trans
.
.
.
.
</Object>
To use PHP Authentication on a single directory, add the following:
<Object ppath="d:\path\to\authenticated\dir*">
AuthTrans fn=php4_auth_trans
</Object>