PHP - Java Compile

Discussion in 'Installation/Configuration' started by ToysunStory, Oct 29, 2006.

  1. ToysunStory

    ToysunStory New Member

    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?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Did you restart Apache afterwards?

    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.
     
  3. ToysunStory

    ToysunStory New Member

    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.

    there is no php-java package in centos repos.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    I think it should produce an .so file, maybe php_java.so or something like that. Try
    Code:
    locate java.so
     
  5. ToysunStory

    ToysunStory New Member

    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.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    That would be great so others can see the solution, too. :)
     
  7. jsvarma

    jsvarma New Member

    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
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Please run
    Code:
    updatedb
    and then try the locate again.
     
  9. jsvarma

    jsvarma New Member

    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
     
  10. falko

    falko Super Moderator ISPConfig Developer

    In the "Perfect Setup", there's a step where PHP gets disabled. Please undo that step and restart Apache.
     

Share This Page