PostgreSQL+PHP+Win98
am 12.04.2002 00:29:26 von Cornelia Boenigk
Hello everybody
I am trying to connect from a PHP-Skript to a PostgreSQL Database
running with Cygwin under Win98. But didn't succeed yet;-(
Anytime I call the script I get an error-message:
Unable to connect to PostgreSQL-Server: connectDBStart() --socket()
failed: errno 0 No error in skriptfile on line 19
The Apache is running and the postmaster was started with the
option -i
Any help is welcome
Greetings
Conni
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
Re: PostgreSQL+PHP+Win98
am 12.04.2002 02:06:40 von Simeo Reig
> ...
> Unable to connect to PostgreSQL-Server: connectDBStart() --socket()
> failed: errno 0 No error in skriptfile on line 19
> ...
It would be a nice idea to put the content of line 19 ;-))
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
Re: PostgreSQL+PHP+Win98
am 12.04.2002 12:30:09 von Cornelia Boenigk
Hi Simeo
You helped me to find the fault - it is working now;-)
I haven't set all connection options. It seems that PostgreSQL needs a
nearly complete connection string when running under Windows while
running under Linux it only needs the name of the database.
> It would be a nice idea to put the content of line 19 ;-))
Yes, you are right, sorry.
$host = "localhost";
$port = "5432";
$user = "zwerg98";
$password = "";
$dbname = "mz";
// eine Verbindung zum Datenbankserver aufbauen
$conn = pg_connect("dbname=$dbname user=$user port=$port host=$host");
<-- Line 19
Regards
Conni
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org