NYCPHP Meetup

NYPHP.org

[nycphp-talk] 32bit vs AMD 64 versions of Apache and shared objects

Hans Zaunere lists at zaunere.com
Mon Feb 28 09:24:07 EST 2005


Hey Dan,

> I'm trying to configure a Xeon processor-based (EM64T/AMD 64) SuSE 9.2
> Professional machine to run Apache 1.3.33, PHP 5.0.3 and WebSphere
> Application Server 5.1.1.3.   I was able to get all these guys cooperating
> on a 32 bit Pentium III machine on the same version of SuSE Pro.  But I
> seem to be running into some 32 bit vs 64 bit issues on this new machine.

So if I read into this, IBM will be bundling PHP with WebSphere next?  :)

> The way things worked out on the older machine was that I had a binary
> installation of Apache (IBM HTTP Server, based on 1.3.28) which used a
> shared object to communicate with WAS, and which used libphp5.so that I
> compiled against it via apxs for PHP.  All was well.
> 
> On this machine, however, I can't get the precompiled 32-bit Apache (IHS)
> talking to PHP via libphp5.so, as the PHP build against it creates a
> 64-bit object:
> 
> # /opt/IBMHttpServer/bin/apachectl configtest
> Syntax error on line 231 of /opt/IBMHttpServer/conf/httpd.conf:
> Cannot load /opt/IBMHttpServer/libexec/libphp5.so into server:
> /opt/IBMHttpServer/libexec/libphp5.so: cannot open shared object file: No
> such file or directory
> 
> # file /opt/IBMHttpServer/libexec/libphp5.so
> /opt/IBMHttpServer/libexec/libphp5.so: ELF 64-bit LSB shared object, AMD
> x86-64, version 1 (SYSV), not stripped
> 
> 
> On the other hand, if I try to compile my own version of Apache, it will
> work with the 64-bit version of libphp5.so, but will not use the 32-bit
> WebSphere plugin:
> 
> # /opt/local/apache/bin/apachectl configtest
> Syntax error on line 243 of /opt/local/apache/conf/httpd.conf:
> Cannot load /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so into
> server: /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so: cannot
> open shared object file: No such file or directory
> 
> # file /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so
> /opt/WebSphere/AppServer/bin/mod_ibm_app_server_http.so: ELF 32-bit LSB
> shared object, Intel 80386, version 1 (SYSV), not stripped
> 
> 
> So, I guess my question is how can I get my 64-bit version of Apache to
> use the 32-bit WAS plugin, or alternately how can I get the 32-bit version
> of IHS to use the 64-bit PHP object?  Is it possible to do that?  If not,

As far as I know (and from what I learned at our AMD meeting) it's not possible.  

> how would I compile a 32-bit version of libphp5.so on AMD 64 so that the
> 32-bit version of IHS can use it?

You basically need to compile against the 32bit libs, which it probably is doing already, since you're not using PHP 5.1.  But then, to get it to link for 32bit, I'm not sure - possibly try --target=x86-unknown-linux-gnu in your ./configure.

Would be interested to hear what happens :)


---
Hans Zaunere
President, Founder

New York PHP
http://www.nyphp.org

AMP Technology
Supporting Apache, MySQL and PHP







More information about the talk mailing list