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.

PHP Recompile

Discussion in 'General Discussion' started by jmetcalf, Jun 6, 2004.

  1. jmetcalf

    jmetcalf Member

    Joined:
    Dec 16, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I need to add the ldap module to PHP on my cPanel server. Short of downloading the latest PHP version and manually compiling to with the modules I want, is there a way to do this from within cPanel?


    Thanks,
    Josh
     
  2. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    It should be enabled by default. Check your php.ini file and make sure it's not commented.
     
  3. dynaserve

    dynaserve Member

    Joined:
    Jul 22, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I would also like to know how to compile PHP with LDAP using cpanel. PHP does not enable LDAP by default, it must be added using --with-ldap. I do see the Perl LDAP modules but not sure how to do it for PHP. :confused:

    Thanks.
     
  4. vmircea

    vmircea Member

    Joined:
    Feb 3, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Washington DC
    well, once apache is compiled once you can just modify the /home/cpapachebuild/buildapache/buildscript , near the end of the file, to add any php configure flags you want
     
  5. jmetcalf

    jmetcalf Member

    Joined:
    Dec 16, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I ended up just writing my own php compile script that I run after each Apache upgrade. It would be nice if cPanel would do as many have suggested and add a custom compile option for apache/php
     
  6. SEO Bob

    SEO Bob Registered

    Joined:
    Aug 25, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I need to install php with the --enable-memory-limit option which i don't believe is included by default.

    A nice feature to have in cpanel would be the ability to choose from the full list of optional packages.
     
  7. odmtech

    odmtech Member

    Joined:
    Nov 4, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Add flags to buildapache/buildscript

    Could someone point me to the exact place in "buildscript" where I would need to add my "--with-ldap" flag.

    There are several "if" branches and I don't know where to place the flag so that is it taken into account for sure. :confused:

    Thanks,
    AL
     
  8. odesia

    odesia Member

    Joined:
    Jun 14, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I want to know where to put the flag?!?!
     
  9. sampipe

    sampipe Registered

    Joined:
    Sep 30, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hey All,

    I'm also in need of compiling in LDAP support into PHP as well... I've followed a few of the threads on this as after about 5 recompiles I've still had no luck... I don't want to do this manually as I;m sure I will have to ad something else in the future...

    I've added the --with-ldap tag to the end of the 4 lines in the buildfile. But every time I do this it either writes over the top (and therefore removes tag) of recompiles my set up with the default setting missing the ones I placed in previously.

    This has been my method
    > start /scripts/easyapache
    > select 7 for current config
    > open /home/cpapachebuild/buildapache/buildscript and add the 4 tags
    > exit out of easyapache
    > If I select "save" config it writes over my buld script... if I press "no" to save, it compiles with a default config...

    Can anyone shed some light??? I'm banging my head as I'm sure its simple...

    Cheers....
     
  10. sampipe

    sampipe Registered

    Joined:
    Sep 30, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I've recompiled php from scratch.. to solve my problem.

    cheers...
     
  11. DJMaze2

    DJMaze2 Registered

    Joined:
    Jun 10, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    The first thing i tried was:
    Code:
    edit /home/cpapachebuild/buildapache/modules/php
      add:
        $SUBMODULE{'php-ldap'} = join(":","LDAP"," --with-ldap","");
      and
        $SETMODULE{'php-ldap'} = 0;
    
    edit /var/cpanel/objcache/buildapache.rc
      Add below:
        php=php-java=0=Java (must already be installed, or install will fail)
      this:
        php=php-ldap=0=LDAP
    But that didn't work yet, i think somewhere else something has to be added as well

    So i just did the following
    Code:
    $ cd /home/cpapachebuild/buildapache/php-5.0.4
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-bcmath --enable-calendar --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gettext --enable-memory-limit --enable-magic-quotes --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-versioning --with-zlib --with-ldap
    $ make clean
    $ make
    $ make install
    $ /usr/sbin/httpd graceful
     
  12. braddeicide

    braddeicide Registered

    Joined:
    Feb 9, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    My host refuses to change cPanel from its defaults, so I need to find a host that doesn't use cPanel. I wish they had mentioned somwhere that cPanel sites have cut back PHP implimentations.

    Is cPanel looking at including LDAP libraries any time soon? I can't see why they need any special efford they're just client bindings.
     
  13. braddeicide

    braddeicide Registered

    Joined:
    Feb 9, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
  14. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The effort is maintaining it vs popularity. If enough people are interested they may include it, if not, then it'll simply have to be done manually.
     
  15. siweb

    siweb Registered

    Joined:
    Jul 30, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Util this "bug" is resolved, here is what I did:

    WHM>Software>Install RPM
    - installed openldap
    - installed openldap-servers
    - installed openldap-devel - if it is not installed, you'll get "Cannot find ldap.h" error while recompiling
    - installed openldap-clients - for working from command line

    - edited /home/cpapachebuild/buildapache/buildscript - I added --with-ldap after all instances of configuration
    - run buildscript

    I'll have to remember to change buildscript every time I update Apache.

    This is it.
     
  16. Lastqaurk

    Lastqaurk Member

    Joined:
    Jun 29, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Confirmed. This one works. Thanks.
     
  17. Secmas

    Secmas Well-Known Member

    Joined:
    Feb 18, 2005
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    How you do this using EasyApache?
     
  18. Lastqaurk

    Lastqaurk Member

    Joined:
    Jun 29, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    For easyapache, from this doc:

    http://www.cpanel.net/support/docs/ea/ea3/ea3custom_flags.html

    If you are using php5, add the following in /var/cpanel/easy/apache/rawopts/all_php5

    --with-ldap
    --with-ldap-include=/usr/local/cpanel/3rdparty/include/

    ..then run ./scripts/easyapache

    My problem with the above is I am experiencing "invalid package name" error and stops compiling.

    Hmmm.
     
  19. Lastqaurk

    Lastqaurk Member

    Joined:
    Jun 29, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Ok, problem solved.

    Instead of:
    --with-ldap
    --with-ldap-include=/usr/local/cpanel/3rdparty/include/

    Just do:
    --with-ldap=/usr

    Bingo!
     
  20. HorburySchool

    HorburySchool Active Member

    Joined:
    Dec 14, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Am following thru the above to get LDAP Authentication working on my server, with the aim being to get Moodle to connect to our MS ActiveDirectory server (Win2K3) for authentication.

    The server is a FreeBSD6.2 box running wHm / cPanel.

    So I presume "Install Port" for me seeing as I'm FreeBSD not Linux...?

    More precise names for FreeBSD users? All I'm getting in the ports are:

    openldap-client-2.3.41
    openldap-sasl-client-2.3.41
    openldap-server-2.3.41

    or

    openldap-client-2.4.9
    openldap-sasl-client-2.4.9
    openldap-server-2.4.9

    No devel showing up...
     
Loading...

Share This Page