Обсуждение: Pg from CGI in Apache
Hi, I tryed to use some functions from the Pg-module from a CGI-script, started on a Apache-server. I always get only an error-message, that Dynaloader can not resolve the symbols from Pg, althrough I am able to start the scripts directly from the shell without problems. Did anyone knows problems like that? Wolfgang Hottgenroth
Try adding these two lines to your apache httpd.conf file: SetEnv LD_LIBRARY_PATH /usr/local/pgsql/lib PassEnv LD_LIBRARY_PATH Change "/usr/local/pgsql/lib" to where ever your postgres lib directory is. Matthew At 08:44 PM 2/14/99 +0100, Wolfgang Hottgenroth wrote: >Hi, > > >I tryed to use some functions from the Pg-module from a CGI-script, >started on a Apache-server. I always get only an error-message, that >Dynaloader can not resolve the symbols from Pg, althrough I am able to >start the scripts directly from the shell without problems. >Did anyone knows problems like that? > > >Wolfgang Hottgenroth > > >
Wolfgang Hottgenroth <whottgen@w3plus.de> writes: > I tryed to use some functions from the Pg-module from a CGI-script, > started on a Apache-server. I always get only an error-message, that > Dynaloader can not resolve the symbols from Pg, althrough I am able to > start the scripts directly from the shell without problems. > Did anyone knows problems like that? Lack of an appropriate environment variable setting in the CGI context is probably the problem --- LD_LIBRARY_PATH (or your platform's equivalent) is the first thing I'd check for. You may also find that your scripts are depending on other things in your shell environment, like PGHOST, PGPASSWORD, etc... regards, tom lane
> At 08:44 PM 2/14/99 +0100, Wolfgang Hottgenroth wrote: > > > >I tryed to use some functions from the Pg-module from a CGI-script, > >started on a Apache-server. I always get only an error-message, that > >Dynaloader can not resolve the symbols from Pg, althrough I am able to > >start the scripts directly from the shell without problems. > >Did anyone knows problems like that? Hi Wolfgang, I had the same error messages some time ago, are you running RedHat 5.2, too? If so, go to http://www.redhat.com/support/docs/rhl/rh52-errata-general.html#perl and download the updated perl RPM. The new RPM fixes issues that perl had with some CGI scripts. After upgrading, I created a link in /usr/lib/perl5/i386-linux/5.00405 -> /usr/lib/perl5/i386-linux/5.00404 and everything works properly. --bryan -- Bryan R. Mattern bm@datapace.com http://www.datapace.com -- Failure is not an option. It comes bundled with your Microsoft product. --------