I have been trying to install PHP4 ontp a UNIX Platform Netscape Enterprise Server, but to no avail. After use ./configure --with-nsapi=DIR option, I tried to compile the netscape module libphp4.so using the "make" process, but I returned an error of not being able to find iostream.h, ststream.h and fstream.h errors. Hence as I was not able to compile, I cannot run it with nsapi mode.

I have tried to use the cgi version of php4, and used it as a #!/bin/php4 method, but got a servor config error while running the cgi on command line itself is perfectly okay.

Anyone who has any ideas or experience working under this environment? Anyhelp is greatly appreciated

    4 days later

    to run cgi version of php you have to add this line to your obj.conf file:
    Init fn="init-cgi" LD_LIBRARY_PATH="/usr/local/lib:/opt/oracle/product/8.1.5/lib"
    You have to set these path to fits your server config.
    You have to declare a php3 Mime type too.

    Your compile problem is a compiler environment problem. Try to install gcc from Mark's page:
    http://metalab.unc.edu/pub/packages/solaris/sparc/
    You'll find ready-to-use packages.

    Hope this tips help you.
    I'm trying to use php4 with NES too but NES complain about __pure_virtual unresolved symbol at server startup. I hope you can help me soon about this at your turn !

    RVB

      16 days later

      Hi,

      you have the file configuration Webserver Netscape cgi mode.
      you can send for my mail.

        For those who encounter unresolved symbol errors at runtime (when starting NES), try to add --enable-libgcc switch in the configure step.

        Harold, here is my obj.conf that support php3 in cgi mode and php4 in nsapi (for php4 in nsapi mode you have to add LD_LIBRARY_PATH and other in the NES start script):

        ...
        Init fn="load-types" mime-types="mime.types"
        Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" shlib="/opt/netscape/suitespot/bin/libphp4.so"
        Init fn=php4_init errorString="Failed to initialize PHP4"
        Init fn="init-cgi" LD_LIBRARY_PATH="/usr/local/lib:/opt/oracle/product/8.1.5/lib" ORACLE_HOME="/opt/oracle/product/8.1.5" ORACLE_SID="mybase" THREADS_FLAG="native" CLASSPATH="/opt/oracle/product/8.1.5/jdbc/lib/classes111.zip:/opt/netscape/server4/java/ldapjdk.jar:."
        ...

        <Object name="default">
        ...
        </Object>

        <Object name="cgi">
        ObjectType fn="force-type" type="magnus-internal/cgi"
        Service fn="send-cgi"
        </Object>

        <Object name="x-httpd-php">
        ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
        Service fn=php4_execute
        </Object>

          a month later

          I added --enable-libgcc but still encounter undefined symbol '__pure_virtual' error.

          I use gcc 2.95.2pl1 with libstdc++2.10.0 on SCO OpenServer 5.0.5.

          Any suggestion ?

            Try to re-install GCC.
            __pure_virtual is a GCC symbol. Try to re-install GCC. Your environment may be corrupted or incomplete.

            Here is my configure script:
            ./configure \
            --with-nsapi=/opt/netscape/suitespot \
            --with-oci8=/opt/oracle/product/8.1.5 \
            --with-java=/usr/java \
            --with-ldap=/usr/local \
            --with-zlib=/usr/local \
            --with-gd=/usr/local \
            --with-mcrypt=/usr/local \
            --with-ttf=/usr/local \
            --with-config-file-path=/etc \
            --enable-sysvsem --enable-sysvshm \
            --enable-libgcc

              11 days later

              It's a GCC library problem I think. I have the same kind of problem on Solaris 2.5.1 but it's fine on Solaris 2.6.
              On Solaris 2.5.1 I have to set EXTRA_LIBS before doing the configure and the make to force libphp4.so link with the GNU GCC libstdc++.
              try this:
              EXTRA_LIBS="-L. -lstdc++" ; export EXTRA_LIBS
              ./configure ...(your config switches)
              make
              su
              PATH=/usr/local/bin:$PATH ; export PATH
              make install
              exit

              you can then run NES start script.

              Hope this helps !

                8 days later

                Thanks to everybody for the answers.

                Unfortunately the problem still remains.

                It seems that the SCO linker doesn't resolve correctly inter-dependencies between dynamic and static libraries.

                nm libphp.so shows that all symbols that could be solved by including object files form libgcc.a remain unresolved. libtool reports that dynamic versions of some libraries will be necessary at run time but that they are not available.

                I tried to force static inclusion by adding -Bstatic before -lgcc, no way.

                I am not a SCO linker expert and don't know how to create these dynamic libraries starting from static ones.

                Thanks in advanced for your help.

                  Write a Reply...