How to enable PHP extension using ADD?

How to enable PHP extension using ADD?

8 posts / 0 new
Last post
humansky's picture
humansky
Points: 0
How to enable PHP extension using ADD?

I'm trying to enable and test the Drupal LDAP module using ADD and I get the following error:

No LDAP Extension is loaded for PHP, so LDAP will not work properly. (Currently using LDAP Extension Loaded Failed)

Is there a way to enable the LDAP extension in PHP?

Thank you,
Henry

Status: 
Unresolved
jwebb's picture
jwebb
Points: 1

I believe if you have a compatible build of ldap.so, you can copy that file into /Applications/acquia-drupal/php/ext and then made appropriate changes to /Applications/acquia-drupal/php/bin/php.ini -- after that restart the stack installer.

If you are compiling the php-ldap extension yourself, the configuration options should be found at /Applications/acquia-drupal/php/bin/php-config

Hope that helps!

wayaheadkm's picture
wayaheadkm
Points: 0

Hi Jonathan,

If I'm reading this correctly, after placing the ldap.so file in /Applications/acquia-drupal/php/ext and updating php.ini, I need to re-run the Acquia installer? I tried this, but Acquia's DAMP does not pick up LDAP, and LDAP does not show up in phpinfo. Is there a way to enable LDAP support at the time of install?

Also, could you point me in the direction of generating/compiling ldap.so files manually ... ? I am on Mac OS 10.5.8.

Thanks!

KM

Update: Added OS

wayaheadkm's picture
wayaheadkm
Points: 0

Here is how I solved this problem:

* Stopped Services from Acquia Control Panel
* Install PHP 5.3 from http://www.entropy.ch/software/macosx/php/ -- gave up on compiling it -- took too long and could never get it right. PHP is installed in /usr/local/php5
* Backed up existing libphp5.so file in Acquia's Apache's Module directory
* Copied the libphp5.so in /usr/local/php5/ to Acquia's Apache's Module directory. In my case: /Applications/acquia-drupal7/apache/modules

At this point if you try to start services from the control panel, you will see an error. The key is to try to start Apache from the command line to see a detail error. The Acquia control panel only provides a generic error message that isn't of much help.

You can also try "./apacheclt -t" to test the config file. Here is the error I was getting when running "./apacheclt -t" from my apache install in /Applications/acquia-drupal7/apache/bin/ :

Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /Applications/acquia-drupal7/common/lib/libJPEG.dylib

So apache was missing a library. I copied the library libJPEG.dylib (and libPNG.dylib) from /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/ to /Applications/acquia-drupal7/common/lib/, restarted apache and voila! Works like a charm!

Note: What is interesting is the common/lib contains a "libjpeg.dylib" symbolic link pointing to "libjpeg.8.dylib" ... perhaps the lower case throws Apache off. This issue appears to be Mac OS X specific. I am running Mac OS 10.5.8.

Hope this helps others along the way.

KM

clintthayer's picture
clintthayer
Points: 0

I'm having issues getting the LDAP PHP module installed. Not to be confused with the Drupal module... I'm just trying to get LDAP working in PHP... There has to be a better way then to install 5.3 on the mac?

thoughts anyone?

Brenda Boggs's picture
Brenda Boggs
Points: 0

Clint, I responded to the other thread at http://network.acquia.com/node/1380486

http://network.acquia.com/documentation/acquia-drupal-stack/add-php-libr... also goes through instructions on adding extensions on a OSX.

Brenda Boggs
Acquia Client Advisory Team

Brenda Boggs
Acquia Client Advisory Team

oudom's picture
oudom
Points: 0

I'm trying to enable and test the Drupal LDAP module using with XAMPP in window 7 when i install it show message below also.

No LDAP Extension is loaded for PHP, so LDAP will not work properly. (Currently using LDAP Extension Loaded Failed)

Thank you,
Ou dom

siretfeL's picture
siretfeL
Points: 0

...although most of you might have been figured out by now how to enable the ldap module in ADD-D7 at Windows 7, I'll give you a clue anyway:

If you get the "No LDAP Extension is loaded for PHP, so LDAP will not work properly. (Currently using LDAP Extension Loaded Failed)" error while enabling the module, you should:

1. Get proper .dll file ("php_ldap.dll") and put into appropriate dir of php ("C:\Program Files (x86)\acquia-drupal\php\ext" for W7). It is not included with the ADD version of Drupal 7, so get it from php.net (you must extract it from the "http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip" binary and put it into the php extension dir mentioned.

2. Enable the extension into php.ini (remove ";" from line ";extension=php_ldap.dll" and save file)

3. Restart ADD Control Panel...(you could check it enabled into php.info)

Good luck configuring LDAP.. ;-)