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.

Recompile PHP --with-java

Discussion in 'General Discussion' started by ggduff, Sep 17, 2003.

  1. ggduff

    ggduff Registered

    Joined:
    Jun 23, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I need to recompile PHP --with-java but I don't see that option in the WHM.

    If I simply type in:

    Code:
    ./configure --with-java
    and then

    Code:
    make
    will that remove all the other options that are already compiled in PHP, or will it simply add java as I wish to do?

    Thanks!

    cPanel.net Support Ticket Number:
     
  2. zenpig66

    zenpig66 Active Member

    Joined:
    Nov 16, 2002
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    yes, it will. You'd need to 're-config' php with all options you want to include...no short cut for you today :)

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  3. rjerina

    rjerina Active Member

    Joined:
    Jul 5, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Re: Re: Recompile PHP --with-java

    what are all those options? i need to do this for a customer, and i dont want to break everything!
     
  4. Chew

    Chew Well-Known Member

    Joined:
    Dec 31, 2003
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Maryland
    I'd like to know this too...

    Is there a listing that someone can get of what php is currently compiled with?

    Or could one just open up a php file containing phpinfo(); and obtain the info that way.

    Thanks,
    Chew
     
  5. ggduff

    ggduff Registered

    Joined:
    Jun 23, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    That's how I did mine - with the info from phpinfo(); - and it worked for me :D
     
  6. Chew

    Chew Well-Known Member

    Joined:
    Dec 31, 2003
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Maryland
    Also... where do I run ./configure with all my parameters from phpinfo()?

    Thx,
    Chew
     
  7. wimp

    wimp Well-Known Member

    Joined:
    Jul 13, 2002
    Messages:
    301
    Likes Received:
    0
    Trophy Points:
    16
    i also interested to recompile php with java but without breakin anything else... any way to do this?


    Thanks
     
  8. timdorr

    timdorr Well-Known Member
    PartnerNOC

    Joined:
    Jul 9, 2002
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, GA
    Are you using easyapache? If so, just compile like normal and get everything up-and-running. Then go to /home/cpapachebuild/buildapache/ and edit the file buildscript. In that file, towards the end, you can change the ./configure flags for PHP, adding or removing whatever you'd like. Then save the file and and ./buildscript to re-run the build process.
     
  9. BlastHosting

    BlastHosting Registered

    Joined:
    Feb 20, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    You should be able to find the ./config.nice file if you still have the source you previously used to build PHP. Then you can just add any additional options and run ./config.nice. Be sure to make clean first so youre compiling new files.
     
  10. FriedEgg

    FriedEgg Active Member

    Joined:
    Sep 27, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Washington, DC
    You can also get the previous ./configure line from a simple

    Code:
    <?php phpinfo(); ?>
    script. It'll be right near the top. Just copy it to a text editor, strip out the "'"'s and you'll have it ready to use/edit/add to.
     
  11. gigli

    gigli Registered

    Joined:
    Jun 28, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Atibaia/SP, Brazil
    how to do that

    so... im trying to do that, but i need to recompile all php.
    now, when i try to instantiate a java class i got that error:

    Code:
    Fatal error: java.lang.UnsatisfiedLinkError: no php_java in java.library.path in /mnt/cyber120/public_html/cyberhosting.com.br/itau/shopline.php on line 111
    follows the php.ini config for java:
    Code:
    [java]
    #java.class.path = ./
    #java.library.path=/usr/local/lib/php
    
    java.class.path = /usr/local/lib/php/php_java.jar
    java.library.path=/usr/local/lib/php/modules
    extension_dir=/usr/local/lib/php/modules
    extension=java.so   
    and tha php script that's trying to instantiate a java class
    Code:
    $criptObj = new Java('itaucripto.class');
    $dados = $criptObj->geraDados($codEmp,$pedido,$valor,$observacao,$chave,$nomeSacado,$codigoInscricao,$numeroInscricao,$enderecoSacado,$bairroSacado,$cepSacado,$cidadeSacado,$estadoSacado,$dataVencimento,$urlRetorna,$obsAd1,$obsAd2,$obsAd3);  
    is in that 1st line i got the error

    thx
     
  12. jbw

    jbw Registered

    Joined:
    Jul 23, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    can someone who has not rebuilt their php post the output from phpinfo() please? I hired someone to set up my server quickly, and they did not document all that they did and I want to try and figure out what they added to php.

    Thanks.
     
  13. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    it would be different for everyone because of the features that would be selected.
     
  14. bman

    bman Well-Known Member

    Joined:
    Dec 28, 2003
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    what will java built in php do ? what its used for ?
    is it so you can add java scripts inside php scripts and have it act like html ?

    thanks
     
  15. Sinewy

    Sinewy Well-Known Member

    Joined:
    May 15, 2004
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney, Australia
    cPanel Access Level:
    DataCenter Provider
    php java isnt for javascripts. its java classes.
     
  16. strikeholdings

    Joined:
    Aug 25, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Use PHP command-line to get config settings

    If you've got PHP 4.30 or later, just type this at a shell prompt to get the current config settings:

    Code:
    php -i | grep ./configure
     
  17. webolocity

    webolocity Well-Known Member

    Joined:
    Jul 22, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    PHP Recompile

    Hello,

    It is not necessary to recompile Apache whenever you need more functionality of PHP. Simply download the version of PHP you originally compiled with Apache, such as PHP-4.3.8. Than, upload in Binary format, to your server to wherever you want to untar and compile in such as: /usr/local/src, etc...

    Than,

    cd to that directory via shell

    RUN

    tar -xvzf php-4.3.8.tar.gz (or whatever your file is called>
    cd php-4.3.8
    ./compile --with-java ......etc....etc....
    make
    make install

    Than, restart apache in whm or shell and you should be able to see the new compile by using ##<?php phpinfo(); ?>.
     
  18. Rafaelfpviana

    Rafaelfpviana Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brazil
    Hello, i 'm having problems with this also, and i'm also using the same class.
    Please let me know when you figure it out.

    Obrigado
     
  19. webolocity

    webolocity Well-Known Member

    Joined:
    Jul 22, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    RE: --with-java

    Hello,

    It looks like you are missing some dependencies for php with java. What I would suggest is to use the Cpanel Apache tool to Update Apache with Java support. This will make Cpanel download the necessary files to enable Java (whatever is missing). Than the files PHP needs for java should be present.

    Than, if Cpanel's choices don't allow you to compile PHP exactly like you would like to (for example you have a custom PHP build outside of Cpanel), you can than go back and re-complie just PHP against the src code with the other flags and choices you had before.

    Hope this helps.
     
  20. Rafaelfpviana

    Rafaelfpviana Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brazil
    So i should install recompile php but not using cpanel buildapache because it only has the nescessary files?
     
Loading...

Share This Page