srochford Posted October 30, 2007 Posted October 30, 2007 I'm trying to set up a new server for Moodle. It's running Windows 2003 x64 and I've got IIS and PHP installed and sort of working. The "sort of" is because LDAP doesn't work and so Moodle won't work for us either. I've uncommented the LDAP extension in php.ini but if I create a test page which tries to do an LDAP search I get: "Call to undefined function ldap_connect() " in the browser. A page with phpinfo() in it shows that LDAP is not loading. BUT (and this is where it gets weird!) if I go to a command prompt and type: php c:\inetpub\wwwroot\test.php it runs fine - I see the HTML I'd expect and it returns a set of results from the LDAP search. This seems to suggest that PHP.INI is right (otherwise how could php.exe load the LDAP module) so why can't the PHPISAPI dll load it? I know it's reading PHP.INI from c:\php - things like MySQL support are being loaded OK Are there any PHP experts who have seen this problem? Googling just gives loads of stuff about what to do when you've not got the right line in PHP.INI but I'm pretty sure that's not my problem!
Guest Posted October 30, 2007 Posted October 30, 2007 what i found was even if the php addons were listed in php.ini they did not load check with php info that they are loaded in the end i had to put all my php addons in windows\system32 to get them to load
srochford Posted October 31, 2007 Author Posted October 31, 2007 Thanks. Some addons aren't listed in phpinfo even though they are obviously loading as defined in php.ini (if I take the "ldap" line out of the ini file then running the script at the command prompt falls over) I had tried putting all the files in system32; this shouldn't be necessary if the php folder is on the path (it is!) - IIS should read the php.ini file (it does!) and then know that the extensions are in c:\php\ext. I've got a feeling that this is something to do with it being x64 Windows but I can't really pin it down. There are quite a few messages on forums elsewhere about this but no real solutions. The PHP authors just say it's not a bug in PHP; it's just you not using it properly which doesn't really help :-)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now