Re: getting pg_connect error?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew

> I can do it with PHP and MySQL!  =)
I do not believe ;-)

If I shut down the MySQL server and try to connect I get the following
message:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to
MySQL server on 'localhost' (10061) in c:\apache\htdocs\mysqlconn.php
on line 8
Keine Verbindung.

If a connection to PostgreSQL cannot be established I get:

Warning: pg_connect() [function.pg-connect]: Unable to connect to
PostgreSQL server: could not connect to server: Es konnte keine
Verbindung hergestellt werden, da der Zielcomputer die Verbindung
verweigerte. (0x0000274D) Is the server running on host localhost and
accepting TCP/IP connections on port 5432? . in
c:\apache\htdocs\uma\conn.php on line 12
Keine Verbindung.

Both are PHP-Warnings and not messages from the database servers.
You will get a similar message too if you remove the '@' in
$rc = @pg_connect("db=enjoyusingpostgresql");

In PostgreSQL there is no "SHOW DATABASES" command. You can only
connect to one database which you specfy in the connection string.

Regards
Conni


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux