| 
	
 | 
 Posted by Rithish on 03/31/06 16:14 
OS : RHEL3 
PHP version : 5.0.2 
JDK version : 1.5.0.06 
 
I have been trying to compile PHP with JAVA support for the past week, 
and all I have left to do is take a noose and hang myself. Of all the 
articles, tutorials, posts that I have seen and browsed ( none of them 
on PHP5+ though ), all of them speak of a libphp_java.so/java.so file 
being created. However, no such file is being created. I have tried 
almost all the tips and tricks that have been suggested, but to no 
avail. 
 
JDK location : /opt/jdk1.5/ 
PHP location : /home/phprpms/php-5.0.2/ 
 
(1)I add the following lines to /etc/ld.so.conf 
/opt/jdk1.5/jre/lib/i386 
/opt/jdk1.5/jre/lib/i386/server 
 
/opt/jdk1.5/jre/lib/i386 is the location of libjava.so and libverify.so 
/opt/jdk1.5/jre/lib/i386/server is the location of libjvm.so 
 
(2) I add the following to /etc/profile 
export LD_LIBRARY_PATH=/opt/jdk1.5/jre/lib/i386 
 
(3)On cmd line I run 
export LD_LIBRARY_PATH=/opt/jdk1.5/jre/lib/i386 
 
(4) I run PHP configure with the following options : 
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu 
--target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr 
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin 
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include 
--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var 
--sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --cache-file=./config.cache 
--with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d 
--enable-memory-limit --with-apxs2=/usr/sbin/apxs 
--enable-force-cgi-redirect --enable-cli --enable-cgi --enable-sysvmsg 
--with-java=/opt/jdk1.5 
 
PHP compiles successfully, but no libphp_java.so file is created. 
 
The next step is to update PHP.ini with the extension configs. However, 
step 4 is supposed to create a libphp_java.so or java.so file; which it 
doesn't. I have looked through so many resources and articles now that 
my roommates say I mumble 'php' in my dreams. :o) 
 
Maybe I am not looking in the right places. Can someone tell me where I 
am going wrong? Or point me to a resource which speaks about PHP5 and 
JAVA integration? I greatly appreciate any help extended. 
 
Regards, 
Rithish.
 
  
Navigation:
[Reply to this message] 
 |