Failed to load plugin on CGI app

Hi All,

I have been developing some basic desktop apps for use here and was looking into moving one of them to the web. I have configured a Linux web server and can successfully run the example SecureLoginExample Web application on it (as CGI). I have modified the example to do a simple Active Directory lookup using the MBSLDAP plugin. It works fine as a standalone app but as a CGI app on my linux box I get the following error:

[Fri Sep 29 15:31:46.493460 2017] [cgi:error] [pid 6253] [client 10.152.96.23:52995] AH01215: Failed to load plugin MBS_Network_LDAP_Plugin_19455.so:: /usr/lib/cgi-bin/WebADLogin/webadlogin.cgi
[Fri Sep 29 15:31:46.493534 2017] [cgi:error] [pid 6253] [client 10.152.96.23:52995] AH01215: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory: /usr/lib/cgi-bin/WebADLogin/webadlogin.cgi
[Fri Sep 29 15:31:46.494815 2017] [cgi:error] [pid 6253] [client 10.152.96.23:52995] AH01215: Can’t use an undefined value as a symbol reference at /usr/lib/cgi-bin/WebADLogin/webadlogin.cgi line 118.: /usr/lib/cgi-bin/WebADLogin/webadlogin.cgi

I have copied the files over (in binary mode) and set the appropriate permissions but cannot seem to get past this error. Any ideas??

Is the library insode the Libs [appname] folder?

What you’re missing is the libldap library on your server.

Thanks for the replies. When I build the application the library is included in the Libs folder as you would suspect. I have copied all of it to the cgi-bin folder so it looks like:

/usr/lib/cgi-bin/WebADLogin/webadlogin.cgi
/usr/lib/cgi-bin/WebADLogin/WebADLogin
/usr/lib/cgi-bin/WebADLogin/WebADLogin\ Libs/MBS_Network_LDAP_Plugin_19455.so
etc…

[quote=352736:@Doug Jones]Thanks for the replies. When I build the application the library is included in the Libs folder as you would suspect. I have copied all of it to the cgi-bin folder so it looks like:

/usr/lib/cgi-bin/WebADLogin/webadlogin.cgi
/usr/lib/cgi-bin/WebADLogin/WebADLogin
/usr/lib/cgi-bin/WebADLogin/WebADLogin\ Libs/MBS_Network_LDAP_Plugin_19455.so
etc…[/quote]
I understand, but the MBS LDAP plug-in also has dependencies that are not included, specifically libldap_r-2.4.so.2 and without that, it won’t run.

@Greg O’Lone I was under the impression that while compiling the app it was creating all the necessary libraries but didn’t see that it was looking for an installed library. I was able to install it with:

sudo apt-get install libldap-2.4-2

I’ll be sure to pay attention to that going forward.
Thank you!