Joined: Sep 10, 2003 Posts: 44 Location: Maysville, KY
Posted: Tue Jul 27, 2004 1:24 am Post subject: Postgresql-7.3.4 for Redhat 7.3
I recently ran into a problem in that I wanted to duplicate a postgresql database on two different servers (one at home and one at the office)....those of you following my posts will understand that it might have something to do with data and backups...lol
A problem I ran into was that the data I wanted to duplicate was currently running under postgresql-7.3.4 but the server I wanted to install it on was running a much older version. I have often used pg_dumpall to upgrade servers (to a newer version of postgresql) but have never had to go in the opposite direction (downgrade). I found this does not work very well.....
Just for your reference (and mine) for others wishing to do this, here is a link with the downloadable postgresql-7.3.4 for Redhat Linux 7.3
Another problem that I ran into doing this upgrade was that the software I was using (SQL-Ledger) requires a couple of perl modules to work propertly, specifically DBD::Pg and DBI. I found that the server kept getting an error "Premature end of script" or server error 500 after the data was migrated. The server logs showed (edited to remove IP addresses):
[Mon Jul 26 13:09:21 2004] [notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations
[Mon Jul 26 13:10:18 2004] [error] [client ] Premature end of script headers: login.pl, referer: sql-ledger/login.pl
[Mon Jul 26 13:10:18 2004] [error] [client] install_driver(Pg) failed: Can't load '/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.2: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229., referer: sql-ledger/login.pl
[Mon Jul 26 13:10:18 2004] [error] [client ] at (eval 6) line 3, referer: sql-ledger/login.pl
[Mon Jul 26 13:10:18 2004] [error] [client ] Compilation failed in require at (eval 6) line 3., referer: sql-ledger/login.pl
[Mon Jul 26 13:10:18 2004] [error] [client ] Perhaps a required shared library or dll isn't installed where expected, referer: sql-ledger/login.pl
[Mon Jul 26 13:10:18 2004] [error] [client ] at SL/User.pm line 118, referer: sql-ledger/login.pl
[Mon Jul 26 13:10:18 2004] [error] [client ] Compilation failed in require at sql-ledger/login.pl line 90., referer: sql-ledger/login.pl
even though perl and the perl-DBD-Pg and perl-DBI rpm files were current - at least according to apt-get.
What I did to resolve this problem was install the newest versions from source - using CPAN. The way this is done, is like so (requires perl-CPAN rpm and the postgresql-devel rpm to be installed and commands run as root in a terminal). It will ask where pg_config resides and it should be at /usr/bin/pg_config:
Joined: Aug 13, 2004 Posts: 335 Location: Maysville, KY
Posted: Thu Dec 30, 2004 2:56 am Post subject:
A lot of people find this message from searching at google for sql-ledger errors, it usually turns up in the first page at google.
There is another reason you can get the premature end of script headers error below. I am simply adding this for those who might find this web site through a search engine.
Check to make sure your postgresql.conf file has tcpip_socket = true (which by default it does not).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All content Copyright 2000 - 2008, Maysville Linux Users Group unless otherwise credited.
All Rights Reserved!
The opinions expressed by visitors to this web site are their own and not necessarily the opinions of the MLUG!