Skip to content
Advertisement

PHP Windows extensions won´t load

I’m working on a windows server 2008 R2 machine. I have installed apache 2.2 with php 5.4.25 While trying to enable ldap support for the apache server i found out that the server does not load the extensions.

I ran php_info() and this was the result

Configuration File (php.ini) Path

C:Windows Loaded configuration file: “C:phpphp.ini

extension_dir C:phpext

I have changed the php.ini to load the extensions, but they are not loaded and they are not visible in the php_info dump. I tried to restart the server and apache about a million times while doing changes with no luck. So if anyone knows a solution to this it would be great.

Advertisement

Answer

I had a lot of problems with this as well. Make sure you’re configuring the right php.ini file. For some reason I had two of them.

This is from my phpinfo()

Configuration File (php.ini) Path   C:Windows
Loaded Configuration File   C:wampbinapacheapache2.4.4binphp.ini <--- this is the one I needed to manually update

Then I dumped my php_ldap.dll file in:

C:wampbinphpphp5.4.16ext

Updated my php.ini file to load the extension

Added the PHP directory to the Windows path.

More info here:http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath

Mine looks like

%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0;C:Program Files (x86)QuickTimeQTSystem;C:Program Files (x86)Shoreline CommunicationsShoreWare Client;C:Program FilesMicrosoftWeb Platform Installer;C:Program Files (x86)Microsoft ASP.NETASP.NET Web Pagesv1.0;C:Program Files (x86)Windows Kits8.0Windows Performance Toolkit;C:Program FilesMicrosoft SQL Server110ToolsBinn;c:Program Files (x86)Microsoft SQL Server110ToolsBinn;c:Program FilesMicrosoft SQL Server110DTSBinn;c:Program Files (x86)Microsoft SQL Server110ToolsBinnManagementStudio;c:Program Files (x86)Microsoft SQL Server110DTSBinn;c:Program Files (x86)Microsoft SQL Server110DTSBinn;c:wampbinphpphp5.4.16

Image:http://i.imgur.com/hQUwtYA.png

Rebooted machine and it worked.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement