This what I'm using for the compiler:

gcc-2.95.3-sol8-sparc-local

I 'm running Apache 1.3.9

    Yes gcc is a 64 bit version....I don't kno about Apache.....How would I determine that for Apache....

      Is this the apache version that came with Solaris ? It is rather old. If it is the version that came with Solaris it might be the 64 bit version.

      Clean up the PHP source directory (make distclean), then export the following environment variables:

      With bash:

      export CFLAGS="-des -Duse64bitall"
      export CPPFLAGS=$CFLAGS
      export CXXFLAGS=$CPPFLAGS
      export LDFLAGS="-mcpu=v9 -m64"
      export LDDLFLAGS="-mcpu=v9 -m64 -G"

      Depending on the shell you might need to use setenv. Additionally you might need to change -mcpu to -mcpu=v8, not sure about that, depends on the hardware.

      Then try to reconfigure and recompile php. You might need to upgrade apache to a recent version ... I don't know if you can use such an old Apache with a recent php version, just try it.

      Thomas

        make distclean is that a command.... ? What is distclean ?

        I tried it and got this:

        make: Fatal error: Don't know how to make target `distclean'

          I forgot ... this only works if the configure command executed successfully once.
          make distclean cleans up the directory but you can as good remove the directory and untar the sources again just to make sure that you have a clean php source directory.

          Thomas

            Ok I have decided to go with PHP 5 but now I'm having different problems.

            This makes no sense, I tried this:

            /export/php-5.0.1 >>./configure -with-mysql=/usr/local/mysql/bin --with-apxs=/usr/apache/bin/apxs --with-libxml-dir=/export/libxml2-2.5.5

            And this

            /export/php-5.0.1 >>./configure -with-mysql=/usr/local/mysql/bin --with-apxs=/usr/apache/bin/apxs --with-libxml=/export/libxml2-2.5.5

            And this

            /export/php-5.0.1 >>./configure -with-mysql=/usr/local/mysql/bin --with-apxs=/usr/apache/bin/apxs --with-libxml=/export/libxml2-2.5.5/xml2-config

            I keep getting this :

            .
            .
            .
            Configuring extensions
            checking whether to enable LIBXML support... yes
            checking libxml2 install dir... no
            configure: error: xml2-config not found. Please check your libxml2 installation.

            But I know the file exist, because when I did a ls -l (on /export/libxml2-2.5.5) I got this:

            -rwxr-xr-x 1 root other 1058 Aug 25 08:53 xml2-config

            So why can't PHP find the file ? Could it have to with how libxml2-2.5.5 wuz installed ? All I did wuz this :

            /export/libxml2-2.5.5/.configure

              Hi,

              I think just executing ./configure isn't sufficient. You need to execute make and make install afterwards in order to install libxml2.

              You might want to specify the at least prefix (base install directory) like
              ./configure --prefix=/usr/local

              After installing libxml2 use that prefix as path to the libxml2 when configuring PHP.

              Thomas

                Ok I finally "completed" (or so I thought) I tried starting the Apache server (it wuz never running in the first place) and I got this message...

                Syntax error on line 212 of /etc/apache/httpd.conf:
                Cannot load /var/apache/libexec/libphp5.so into server: ld.so.1: /usr/apache/bin/httpd: fatal: /var/apache/libexec/libphp5.so: open failed: No such file or directory
                ./apachectl start: httpd could not be started

                Online 212 I have (the line hightlighted):

                Example:

                LoadModule foo_module libexec/mod_foo.so

                LoadModule php5_module libexec/libphp5.so

                LoadModule vhost_alias_module /usr/apache/libexec/mod_vhost_alias.so
                LoadModule env_module /usr/apache/libexec/mod_env.so

                For me the actually directory that Apache should be trying to load is:

                /usr/apache/libexec

                NOT

                /var/apache/libexec/

                Because /var/apachelibexec jus doesn't exist....This directory exist though /var/apache. I have no idea why it's even looking there

                Nevertheless I went to /usr/apache/libexec and to my suprise there wuz no libphp5.so (I however saw several *.so files) I did a seach of my system and that file (libphp5.so) is no where to be found..

                I wuz following the instructions at Apache 1.3.x on Unix systems

                  Hi,

                  did "make" and "make install" produce any errors ? After compiling PHP search the PHP directory for any file libphp5*. In order to compile php5 you need at least the most recent versions of the following software packages:

                  gcc
                  make
                  flex
                  bison
                  m4
                  autoconf
                  automake
                  gzip
                  tar
                  sed

                  and maybe perl. This list comes from the PHP manual. I installed several more packages when I compiled apache/php4.x on a Solaris 9 machine.

                  Hmmm...while writing this I remember that I recently wrote down every single step required to compile apache/PHP on Solaris 9 including environment variables (and installed sunfreeware packages if I remember right). It was some kind of tricky (but included oracle/oci8/mysql/ssl support afterwards).

                  Let me see if I can find it. It's hard to suggest anything without knowing how the system is set up and wich packages are installed. Please give me an overview of the GNU tools that are installed.

                  Thomas

                    I would surely appreciate that article U wrote...

                    I also have problems installing packages so I have jus tried installing the packages that I tells me that it needs....like zlib and libxml2

                    Currently the system I'm trying to install PHP 5 on is a "bare bones" system....whatever packages I need I have to go download them....(this box didn't even have a compiler)....

                    What I did though is that I tried to install PHP 5 first by running ./configure and based on what it told me wuz missing I went and downloaded it !

                      Which problem do you have installing the packages (sunfreeware.com) ?

                      btw ... it isn't an article, rather just a list of the steps, but it should be sufficient to get PHP up and running with the features you need. I had some heavy work to do so I hadn't the time to send it. I think I can post it as soon as I finish work today 🙂

                      Thomas

                        Originally posted by tsinka
                        Which problem do you have installing the packages (sunfreeware.com) ?

                        btw ... it isn't an article, rather just a list of the steps, but it should be sufficient to get PHP up and running with the features you need. I had some heavy work to do so I hadn't the time to send it. I think I can post it as soon as I finish work today 🙂

                        Thomas

                        I don't kno if it's so much a problem installing the packages...but more of a problem with me specifying the correct paths for installation and specifying the paths where certain other packages can be found....for my installation all packages that I download must be installed in a directory called /export not /usr/local which apparently is the usuall.....

                        The last time I tried the installation (PHP 5 installation)....I got this

                        .
                        .
                        .
                        Configuring extensions
                        checking whether to enable LIBXML support... yes
                        checking libxml2 install dir... /export/libxml2-2.6.12
                        checking whether libxml build works... yes
                        checking for OpenSSL support... no
                        checking for ZLIB support... yes
                        checking if the location of ZLIB install directory is defined... no
                        configure: error: Cannot find libz

                        Where would I find that libz thing ?

                        I'm nevertheless going to try to rebuild the following before I again try to rebuild PHP 5

                        Theze are the packages I would want to rebuild


                        zlib-1.2.1.tar.gz
                        openssl-0.9.7d.tar.gz
                        libxml2-2.6.12.tar.gz
                        mhash-0.9.1.tar.gz
                        libtool-1.5.6.tar.gz
                        libpng-1.2.6-config.tar.gz
                        libmcrypt-2.5.7.tar.gz (BTW is there a bug in this libraray ? Ok I jus checked...there is, is there an alternative)
                        gd-2.0.28.tar.gz

                        This is how I'm configuring the the packages to be built:

                        ./configure --prefix=/export --libexecdir=/export/libexec -libdir=/export/lib --includedir=/export
                        /include

                        make

                        make install

                        I get this whenever I do it for it for zlib

                        mkdir: illegal option -- l
                        mkdir: illegal option -- i
                        mkdir: illegal option -- b
                        mkdir: illegal option -- d
                        mkdir: illegal option -- i
                        mkdir: illegal option -- r
                        mkdir: illegal option -- =
                        mkdir: illegal option -- /
                        mkdir: illegal option -- e
                        mkdir: illegal option -- x
                        mkdir: illegal option -- o
                        mkdir: illegal option -- r
                        mkdir: illegal option -- t
                        mkdir: illegal option -- /
                        mkdir: illegal option -- l
                        mkdir: illegal option -- i
                        mkdir: illegal option -- b
                        mkdir: usage: mkdir [-m mode] [-p] dirname ...
                        Error code 2 (ignored)
                        cp zlib.h zconf.h /export/include
                        chmod 644 /export/include/zlib.h /export/include/zconf.h
                        cp libz.a -libdir=/export/lib
                        cp: cannot create -libdir=/export/lib: No such file or directory
                        Error code 2
                        make: Fatal error: Command failed for target `install'

                        I get this whenever I do it for it for libxml2-2.6.12

                        ld: fatal: relocations remain against allocatable but non-writable sections
                        collect2: ld returned 1 exit status
                        Error code 1
                        make: Fatal error: Command failed for target libxml2.la'
                        Current working directory /export/libxml2-2.6.12
                        *** Error code 1
                        make: Fatal error: Command failed for target
                        all-recursive'
                        Current working directory /export/libxml2-2.6.12
                        Error code 1
                        make: Fatal error: Command failed for target `all'

                          Write a Reply...