pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
DBI and Pg error 2+ messages / 2 participants [nested] [flat]
* DBI and Pg error @ 2000-05-02 23:51 jim <info@online411.com> 2000-05-03 03:53 ` Re: DBI and Pg error Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: jim @ 2000-05-02 23:51 UTC (permalink / raw) To: pgsql-interfaces Some friends said this list is the best place to ask my questions regarding BSDI/postgresql/DBI because some of you are BSDI expertises. Basically, I installed postgresql, DBI and Pg and test it. My script works fine locally and doesn't work as a CGI. I already asked several lists but so far I can not fix it. I run as root user in my BSDI 4.1/Apache 1.3.9 server. My perl is 5.005_03 My postgresql 6.5.3 was installed in the default location: /usr/local/pgsql I run postmaster with -i option. Actually I use su - postgres in my rc.local file to run postmaster automatically when the server startup. I also setup .bashrc .bash_profile with the required env variables setup in both postgres and root home. For the database access, I include following several line in my pg_hba.conf file to make it works with every one. host all trust host all 127.0.0.1 255.255.255.255 trust host all 0.0.0.0 0.0.0.0 trust I install DBI 1.13 and DBD:Pg 0.93 with no error message follow exactly the README. All test was passed. I created a testing database, a testing table and insert some records. I use some perl scripts to test it. The script works locally and retrieve all the records from the table. When I run it as a cgi, it doesn't work. When I didn't set the required env variables, locally I get the same error message. That's why I guess it could be an env variable problem. (If the DBI/DBD is not installed correct, why it works locally??? !!!) I have tried to set the ENV with CGI, the problem is still. The error message is always the same as below: install_driver(Pg) failed" Can't load '/usr/libdata/perl5/site_perl/i386-bsdos/auto/DBD/Pg/Pg.so' for module DBD::Pg: File not found at /usr/libdata/perl5/5.00503/i386-bsdos/DynaLoader.pm line 169. I checked the two files, they all exist! I got confused here. I can not figure out what's wrong. Some friend from the list said this may be a installation problem and I need to reinstall perl. But why the DBI works fine locally but not cgi. Sorry for post so long here. But it's really important to me and I have to fix it ASAP!!!. Any repsonse is very thankful. Jim ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: DBI and Pg error 2000-05-02 23:51 DBI and Pg error jim <info@online411.com> @ 2000-05-03 03:53 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2000-05-03 03:53 UTC (permalink / raw) To: info@online411.com; +Cc: pgsql-interfaces jim <info@online411.com> writes: > install_driver(Pg) failed" Can't load '/usr/libdata/perl5/site_perl/i386-bsdos/auto/DBD/Pg/Pg.so' > for module DBD::Pg: File not found at /usr/libdata/perl5/5.00503/i386-bsdos/DynaLoader.pm line 169. > I checked the two files, they all exist! Dynamic library loaders are notorious for the poor quality of their error messages :-(. I'll bet that the file that's not being found is not either of the files mentioned above, but a shared library that they depend on. In other words, either libpq.so or a library that it depends on in turn. Since it works for you locally, a good bet is that your CGI environment doesn't have the right setting of LD_LIBRARY_PATH (or whatever environment variable determines shared-library search path on your platform). regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-05-03 03:53 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-05-02 23:51 DBI and Pg error jim <info@online411.com> 2000-05-03 03:53 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox