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
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
It should be enabled by default. Check your php.ini file and make sure it's not commented.
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.
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
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
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.
Could someone point me to the exact place in "buildscript" where I would need to add my "--with-ldap" flag.Originally Posted by vmircea
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
I want to know where to put the flag?!?!
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....
I've recompiled php from scratch.. to solve my problem.
cheers...
The first thing i tried was:
But that didn't work yet, i think somewhere else something has to be added as wellCode: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
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
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.
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.
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.I can't see why they need any special efford they're just client bindings
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
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.