#1  
Old 29th October 2006, 16:26
ToysunStory ToysunStory is offline
Junior Member
 
Join Date: Mar 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP - Java Compile

Hi all,

I am using Centos 4.4 with perfect set-up. Due to an API I have to use, I need to compile PHP5 with Java support. I've downloaded Java 1.4.2 SDK and install it with rpm -Uvh. java -version shows the write version. Then;

./configure --with-apxs=/var/new/httpd/bin/apxs --enable-track-vars --enable-sockets --enable-mbstring=all --with-config-file-path=/var/new/php --enable-ftp --prefix=/var/new/php --with-openssl=/var/new/openssl --with-mysql=/usr --with-pgsql=/usr --with-java=/usr/java/j2sdk1.4.2_12 --disable-libxml --disable-dom --disable-xml --disable-xmlreader --disable-xmlwriter --disable-simplexml --without-pear

make

make install

Everything's going well but nothing related to Java. I cannot found php_java.jar or java.so files. Other than java new compiled PHP works well.

I can't install PHP-Java-Bridge either. Gave me error when I try to compile it too.

Any suggestion?
Reply With Quote
Sponsored Links
  #2  
Old 30th October 2006, 13:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

Quote:
Originally Posted by ToysunStory
Everything's going well but nothing related to Java.
Did you restart Apache afterwards?

Quote:
Originally Posted by ToysunStory
I cannot found php_java.jar or java.so files.
You can run
Code:
updatedb
afterwards you can search for the files like this:
Code:
locate php_java.jar
Isn't there a PHP-Java package from CentOS? You can run
Code:
yum search php
to search for all available PHP packages.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 31st October 2006, 20:47
ToysunStory ToysunStory is offline
Junior Member
 
Join Date: Mar 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Did you restart Apache afterwards?
Yes, but nothing related to apache. I can't add java section in php.ini because of compiling php doesn't produce php_java.jar file.

Quote:
Isn't there a PHP-Java package from CentOS? You can run
there is no php-java package in centos repos.
Reply With Quote
  #4  
Old 1st November 2006, 17:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

Quote:
Originally Posted by ToysunStory
compiling php doesn't produce php_java.jar file.
I think it should produce an .so file, maybe php_java.so or something like that. Try
Code:
locate java.so
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 11th November 2006, 20:37
ToysunStory ToysunStory is offline
Junior Member
 
Join Date: Mar 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Problem solved At last I discovered PHP5 doesn't produce any java.so and php_java.jar files. With PHP4 I solve the problem. Within a few days I'm going to write here step by step.
Reply With Quote
  #6  
Old 12th November 2006, 16:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

Quote:
Originally Posted by ToysunStory
Within a few days I'm going to write here step by step.
That would be great so others can see the solution, too.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 2nd January 2008, 07:33
jsvarma jsvarma is offline
Junior Member
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Cool PHP_JAVA.jar file not found

Hi ToysunStory / Falko,
I have installed RHEL ES 4.0 U3., PHP 4.2.X, JDK 1.3.

We are able to run the ./configure command & compile PHP with JAVA option.
We are also able to complete the make command
When we run the make install command, we get a error 127 php_java.jar message.
We tried to locate the file php_java.jar in the system using the locate php_java.jar command, but the same file is not found. We are able to get the phplib_java.so files and all other required files. Only Php_java.jar file is missing.

Can you pls let me know what i am doing wrong. My sequence of instllation is:
1. Install JDK
2. Run the ./configure command with -Java option
3. make
4. make install (we get error here & subsequently cannot find the php_java.jar file).

Regards
JSVARMA
Reply With Quote
  #8  
Old 3rd January 2008, 14:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

Quote:
Originally Posted by jsvarma
We tried to locate the file php_java.jar in the system using the locate php_java.jar command, but the same file is not found.
Please run
Code:
updatedb
and then try the locate again.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 3rd January 2008, 14:56
jsvarma jsvarma is offline
Junior Member
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Falko,
Thnx. Although this did not work i have achieved it by installing J2SDK 1.4.X and now i have all the files as required and i have given the required paths

The new issue is that we are not able to execute any of the PHP scripts. When i try to open a PHP file <testjava.php> , it fails to recognize the file and asks if i would like to open it with some other applications.

Any suggestions why this is happening.

Regards
JSVARMA
Reply With Quote
  #10  
Old 4th January 2008, 18:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
 
Default

In the "Perfect Setup", there's a step where PHP gets disabled. Please undo that step and restart Apache.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
Slightly Confused (DNS & Server Help) JohnnyBGoode Installation/Configuration 26 14th August 2007 09:54
VirtualHosts marra87 General 9 12th September 2006 04:09
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 13th March 2006 23:58
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 21:27


All times are GMT +2. The time now is 13:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.