Problem statement: I m getting following error while connecting to
postgresql7.2.1 through DBD:Pg :
[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1]
DBI->connect(dbname=template1) failed: connectDBStart() -- socket()
[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1] No such file or
[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1] Error:
<br>connectDBStart() -- socket() failed: errno=2<br>No such file or
[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1] Compilation failed
in require at c:\EZPUBL~1\apache\htdocs\SQL-LE~1\admin.pl line 93.
I have Windows 2000 os. And have postgresql7.2.1 installed on cygwin on
drive i:. Also I have active perl and apache installed on drive c:.
Now I think we have to check the problem step by step.
+--------+ +--------+ +------------+ +-----------+
Script +-->+ DBI +---+-->+ DBD Postgre+--->+ Postgre DB|+--------+ +--------+ +------------+ +-----------+
A B C D E F G
(A) Script is perfectly allright. -- no problem (if you have got any
other sample script to test connection of DBD:pg and postgresql then pls
send to me)
(B) I uninstalled DBI -- its giving me proper error that "DBI not
installed". And after I again install the error does not come. So -- no
(C) dbi is installed and same as B -- no problem
(D) when I uninsalled DBD-pg it gave be these errors:
[Thu Jun 20 12:54:45 2002] [error] [client 127.0.0.1] malformed header
from script. Bad header=bin/mozilla:
[Thu Jun 20 12:54:45 2002] [error] [client 127.0.0.1] Unknown error
[Thu Jun 20 12:54:45 2002] [error] [client 127.0.0.1] Compilation failed
in require at c:\apache\htdocs\SQL-LE~1\admin.pl line 93.
In the first error again there seems to be some path problem -- u all
must be knowing better.
Again if I install dbd-pg these errors go away and the prime error (in
the very top of email) comes.
But lets keep this -- A SUSPECT
(E)DBD-Pg . Is there some setting to be done to let DBD-Pg about where
the postgre sql is (eg. Port of postgresql or the pid or the socket
Lets also keep this -- A SUSPECT
(F)Same as E -- A SUSPECT
(G)Postgresql7.2.1 has been installed. I can access template1 and can
create table through psql. --- no problem
That leaves us with three suspects:
(D) Connection from DBI to DBD-Pg
(E) DBD-Pg settings etc.
(F) Connection from DBD-Pg to postgre
Thanks and regards,
On Behalf Of Dieter
Sent: 19 June 2002 08:15
Subject: RE: [SL] for power users a minor problem, errors while
You don't have a template1 database. Try template0 or create a database.
Dieter Simader http://www.sql-ledger.org (780) 472-8161
DWS Systems Inc. Accounting Software Fax: 478-5281
=========== On a clear disk you can seek forever ===========