Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20
  1. #1
    Member
    Join Date
    Dec 2003
    Posts
    12

    Default PHP Recompile

    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. #2
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    It should be enabled by default. Check your php.ini file and make sure it's not commented.

  3. #3
    Member
    Join Date
    Jul 2004
    Posts
    5

    Default

    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.

    Thanks.

  4. #4
    Member
    Join Date
    Feb 2004
    Location
    Washington DC
    Posts
    9

    Default

    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. #5
    Member
    Join Date
    Dec 2003
    Posts
    12

    Default

    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. #6
    Registered User
    Join Date
    Aug 2004
    Posts
    1

    Default

    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. #7
    Member
    Join Date
    Nov 2003
    Posts
    13

    Question Add flags to buildapache/buildscript

    Quote Originally Posted by vmircea
    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
    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.

    Thanks,
    AL

  8. #8
    Member
    Join Date
    Jun 2004
    Posts
    15

    Default

    I want to know where to put the flag?!?!

  9. #9
    Registered User
    Join Date
    Sep 2004
    Posts
    3

    Default

    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. #10
    Registered User
    Join Date
    Sep 2004
    Posts
    3

    Default

    I've recompiled php from scratch.. to solve my problem.

    cheers...

  11. #11
    Registered User
    Join Date
    Jun 2005
    Posts
    2

    Default

    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. #12
    Registered User
    Join Date
    Feb 2006
    Posts
    2

    Default

    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. #13
    Registered User
    Join Date
    Feb 2006
    Posts
    2

    Default

    If you want this fixed, go to

    http://bugzilla.cpanel.net/show_bug.cgi?id=1236

    Click on "Vote for this bug" You may be prompted to register first. So far only two people are interested.

  14. #14
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    I can't see why they need any special efford they're just client bindings
    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  15. #15
    Registered User
    Join Date
    Jul 2004
    Posts
    2

    Default

    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.

Similar Threads & Tags
Similar threads

  1. Recompile on PHP
    By robthemanbob in forum New User Questions
    Replies: 2
    Last Post: 03-12-2009, 02:41 PM
  2. How to recompile PHP
    By ahostli in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-28-2006, 09:18 PM
  3. Just recompile only PHP
    By benito in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-17-2006, 10:48 AM
  4. Recompile PHP with curl
    By welch in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-06-2004, 12:17 PM
  5. Recompile PHP ...Please help
    By evolver in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-08-2003, 03:27 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube