Thread: PostgreSQL+PHP+Win98
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
> ... > 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 ;-))
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