pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedUsing php and postgres
2+ messages / 2 participants
[nested] [flat]
* Using php and postgres
@ 1999-10-14 10:08 Edouard DESSIOUX <edx@intrinsec.com>
1999-10-15 11:33 ` Re: [INTERFACES] Using php and postgres gravity <z.nijmeyers@cable.a2000.nl>
0 siblings, 1 reply; 2+ messages in thread
From: Edouard DESSIOUX @ 1999-10-14 10:08 UTC (permalink / raw)
To: pgsql-interfaces
Hello,
I'm using apache postgres and php,
I created a database called "manip"
and i want to acces this database via a web page
I use the following php script to connect to the base:
<HTML>
<?php
$database = pg_connect ("dbname=manip port=5432");
?>
</HTML>
And i obtain :
Warning: Unable to connect to PostgresSQL server: FATAL 1: Database www does not exist in pg_database in
/www/dooz.corp.intrinsec.com/mail/essai.php3 on line 3
Warning: 0 is not a PostgresSQL link index in /www/dooz.corp.intrinsec.com/mail/essai.php3 on line 4
Postmaster is started, and in psql, i can read :
manip=> FATAL 1: Database www does not exist in pg_database
Anyone know what i done wrong ?
--
Edouard DESSIOUX
Proverbe chien :
"Si ca se mange pas,
Si ca se baise pas,
Pisse dessus !!"
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [INTERFACES] Using php and postgres
1999-10-14 10:08 Using php and postgres Edouard DESSIOUX <edx@intrinsec.com>
@ 1999-10-15 11:33 ` gravity <z.nijmeyers@cable.a2000.nl>
0 siblings, 0 replies; 2+ messages in thread
From: gravity @ 1999-10-15 11:33 UTC (permalink / raw)
To: Edouard DESSIOUX <edx@intrinsec.com>; pgsql-interfaces
At 12:08 14-10-99 +0200, Edouard DESSIOUX wrote:
>
> Hello,
> I'm using apache postgres and php,
> I created a database called "manip"
> and i want to acces this database via a web page
>
> I use the following php script to connect to the base:
> <?php $database = pg_connect ("dbname=manip port=5432"); ?>
use pg_connect ("dbname=manip user=USERNAME password=PASSWORD port=5432")
>
> And i obtain :
> Warning: Unable to connect to PostgresSQL server: FATAL 1: Database www does
> not exist in pg_database in
> /www/dooz.corp.intrinsec.com/mail/essai.php3 on line 3
if you don't declare user then the connection will be made with the user
running php/apache: in this case 'www'.
the connection fails because the username is not correct and I guess pg then
tries to connect you to your own database, named after the user: 'www'
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-10-15 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-10-14 10:08 Using php and postgres Edouard DESSIOUX <edx@intrinsec.com>
1999-10-15 11:33 ` gravity <z.nijmeyers@cable.a2000.nl>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox