SHELL problem

I am using the SHELL method to do an LDAP lookup with LDAPsearch. It works fine on OSX and in Window PRO 7 (x64). I did a “proof of concept” by manually figuring out the command line parameters needed and running it in OSX. Once I had that working I tried it manually in Windows PRO 7 and manually in Windows Server 2008. All of the Windows tests involved installing OpenLDAP. There was a bit of “fiddling” in Windows to get all of the support DLL’s installed.

My final test was to compile the code and debug in Windows PRO 7 and everything worked. Now that I am deploying the code to the Windows Server 2008 running in the Abyss Web Server I get a strange error. Some Googling leads me to believe that a DLL is not found based on a message returned from LDAPsearch. The error is 1073741515

BUT — Windows Server 2008 does NOT work when I call the same LDAPsearch via SHELL but if I open a command window the command line DOES work.

I have established with some testing on the server that the working directory for a SHELL is the httdocs directory for the Web Server and that the Windows Environment Variable for PATH is set the same as in a manually opened command window. I am also using CURL in a SHELL command line and it works fine.

Does anybody have any thoughts on how to debug this problem?

Thanks.

You really don’t need a shell OR to install anything
You can declare into the OS libraries on all platforms (although its not trivial)
Windows HAS built in DLL’s for accessing AD (which is LDAP) you just can’t use them directly from the cmd line
And you would NOT have to install OpenLDAP at all

I know this as I built an LDAP module many many years ago that people are still using (see RBLibrary.com LDAP module)
This is the one I sent you to try, before purchasing, off list to try a while back
Is that not working for you ?

[quote=131604:@Mark Strickland]I have established with some testing on the server that the working directory for a SHELL is the httdocs directory for the Web Server and that the Windows Environment Variable for PATH is set the same as in a manually opened command window. I am also using CURL in a SHELL command line and it works fine.
[/quote]
Both of these make sense BUT I suspect you have a privileges issue since the web server is probably running as whatever user is running the web server which would not be the same user as you having a terminal open

FIXED but here are some details if somebody else stumbles across this issue.

The Web Server is running as a local administrator and that is the account that I did the manual testing that is always successful.

After more Googling it could also be a problem with 32 bit versus 64 bit. This all works in debug on Windows but I assume that the Web Server in debug is an XOJO standalone app and would be 32 bit. The Abyss Web Server is a true 64 bit application. So 64bit Abyss owns the 32bit XOJO CGI process then launches a SHELL (probably 64bit since it is on 64bit Windows). I am not sure what all of this means but it obviously could be a problem finding all of the proper 32/64 bit support libraries.

After re-loading the VC++ libraries from Microsoft that were automatically loaded by the pre-compiled version of OpenLDAP it works.

My conclusion is mixed 32bit and 64bit libraries.