Solaris/Apache/PHP
| From: | Colin Knowles | Date: | Wed, 16 Jul 2003 10:13:16 +0000 |
| Subject: | Solaris/Apache/PHP | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-11287@lists.php.net to get a copy of this message | ||
Hi
I am trying to install PHP on a Solaris box which is running:
SunOS 5.9 Generic_112233-06 (sun4u architecture)
Apache comes pre-installed on these systems. However, when I ran into
problems compiling PHP 4.3.2, so I removed this version of Apache and
downloaded Apache 1.3.27. I compiled this with the following command lines:
# ./configure --with-layout=GNU --prefix=/usr/local/apache
--enable-module=most --enable-shared=max --enable-module=so
# make
# make install
However when I tried to compile PHP using:
# ./configure --with-zlib --with-mysql=/usr/local/mysql
--with-apxs=/usr/local/apache/sbin/apxs
# make clean
# make
I got
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
but scrolling backwards I also found
ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): wrong
ELF class: ELFCLASS64
Thinking that this may be some kind of library problem, I moved
/usr/local/bin to the front of my $PATH, but this made no difference. I
then figured that it may be a 32/64-bit library problem, so I did
# setenv CFLAGS "-m64"
# setenv LDFLAGS "-mcpu=v9 -m64"
# ./configure --with-zlib --with-mysql=/usr/local/mysql
--with-apxs=/usr/local/apache/sbin/apxs
# make clean
# make
# make install
However, when I try to start Apache, which in the httpd.conf file has:
LoadModule php4_module libexec/libphp4.soI get # httpd Syntax error on line 236 of /usr/local/apache/etc/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: ld.so.1: httpd: fatal: /usr/local/apache/libexec/libphp4.so: wrong ELF class: ELFCLASS64 Thinking that maybe Apache needs to be compiled as 64-bit too, I re-ran my Apache ./configure after having setenv CFLAGS and LDFLAGS as above, but it immediately crashed out with: ld: fatal: file /usr/ucblib/libucb.so: wrong ELF class: ELFCLASS32 ld: fatal: file /usr/lib/libresolv.so: wrong ELF class: ELFCLASS32 ld: fatal: file /usr/lib/libsocket.so: wrong ELF class: ELFCLASS32 ld: fatal: file /usr/lib/libnsl.so: wrong ELF class: ELFCLASS32 ld: fatal: file /usr/lib/libelf.so: wrong ELF class: ELFCLASS32 ld: fatal: File processing errors. No output written to libproxy.so which hardly suprised me. So where do I go from here? Colin -------------------------------- C. R. Knowles, Senior Computing Officer Department of Economics University of Bristol 8 Woodland Road Bristol BS8 1TN Tel: +44 (0)117 928 8420 Fax: +44 (0)117 928 8577 Mob: +44 (0)776 197 7511 Colin.Knowles@bristol.ac.uk