The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Building Apache PHP with java

Discussion in 'EasyApache' started by myBox, Jul 18, 2006.

  1. myBox

    myBox Active Member

    Joined:
    Jan 6, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I am trying to setup apache PHP with java but I get errors

    the above are the errors reported from cpanel build apache.

    I already installed JAVA from sun and tested it and set the env variables JAVA_HOME etc..

    where can I start looking to trouble shoot this problem and what could be something I am doning wrong?

    java version
    java env variables
    Helpful articles I used:
    http://www.yolinux.com/TUTORIALS/LinuxTutorialJava.html#INSTALLSDK
    http://www.raditha.com/php/java.php
    http://www.onlamp.com/pub/a/php/2001/06/14/php_jav.html
    http://www.php.net/java

    thanks in advance.
     
  2. myBox

    myBox Active Member

    Joined:
    Jan 6, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    I have rebuilt apache with verbous mode on

    I got this error:

    after that I disabled shell boom protection as suggested by some posts.

    tested and same problem.

    also did this:

    now rebooted and tested the rebuilding again

    but same result :(

    when running : java -version as root same as normal user

    I have also put this in /etc/rc.local

    still no luck!

    I did not install Tomcat or any jsp stuff.

    My main goal is to run java classes from php
    www.php.net/java


    PHP compile params:
    rpm -qa | grep java =>
    any help would be appreciated.

    I am using latest cpanel 10 STABLE 120

    with CENTOS 2.6.15.7 kernel


    Other helpful threads:
    http://forums.cpanel.net/showthread.php?t=34406
    http://forums.cpanel.net/showthread.php?t=34112
    http://forums.cpanel.net/showthread.php?t=46428
    http://webhostingtalk.com/showthread.php?t=238359
     
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Integrating Java with Php is a very complex process. We did that for one of our clients last year and I am not sure if he still uses Java with Php. In any case here is one more Web site that might help: http://www.php.net/manual/en/ref.java.php
    Now, if you are successful in integrating Java with php, you should see something like the following in your Phpinfo.php file:

    Code:
    [CENTER][B]java[/B][/CENTER]
    [B]Directive[/B]          [B]Local Value[/B]                    
    java.class.path          /usr/lib/php4/php_java.jar
    java.home               /usr/local/j2sdk1.3.1
    java.library              /usr/local/j2sdk1.3.1/jre/lib/ppc/classic/libjvm.so
    java.library.path      /usr/lib/php4
     
    #3 AndyReed, Jul 18, 2006
    Last edited: Jul 18, 2006
Loading...

Share This Page