Re: getting pg_connect error?
| From: | Cornelia Boenigk | Date: | Mon, 07 Apr 2003 10:14:10 +0000 |
| Subject: | Re: getting pg_connect error? | ||
| References: | 1 2 3 4 5 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26889@lists.php.net to get a copy of this message | ||
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