Re: [ADMIN] Script Hangs on

2001-06-06 Thread Melvyn Sopacua
At 07:21 6-6-01, you wrote: >$dbconn1 = @pg_connect ("host=$dbhost dbname=$dbname user=$dbuser >password=$dbpasswd"); > >Edit /usr/local/lib/php.ini and make sure persistent connections is >turned off. This will work, as long as the machine is up, but pgsql isn't. However, if the machine isn

Re: [ADMIN] Script Hangs on

2001-06-05 Thread Csaba Bobak
> $port=9939; > $host=\"210.111.1.10\"; > pg=pg_connect($port,$host); > ?> > But problem is if somebody suddenly switch off > the server(210.111.1.10), the script hangs on. > How would my script check that host is open before connecting? A simple ping maybe? :-) Csaba __ This mess

[ADMIN] Script hangs on

2001-06-05 Thread Ariunbold Gerelt-Od
By Php scripts I am connecting to database SERVER: It works good enough. But problem is if somebody suddenly switch off the server(210.111.1.10), the script hangs on. How would my script check that host is open before connecting? ---(end of broadcast)--

Re: [ADMIN] Script Hangs on

2001-06-05 Thread Ariunbold Gerelt-Od
Frist ,How in script could I Ping? Second,from command line Ping also hangs. Csaba Bobak wrote: > > > $port=9939; > > $host=\"210.111.1.10\"; > > pg=pg_connect($port,$host); > > ?> > > > But problem is if somebody suddenly switch off > > the server(210.111.1.10), the script hangs on. > > How w

Re: [ADMIN] Script Hangs on

2001-06-05 Thread Grant
> $port=9939; > $host=\"210.111.1.10\"; > pg=pg_connect($port,$host); > ?> Hehe, don't escape the quotes around your variables. Here's a function I use to connect to the database. $dbhost = '210.111.1.10'; $dbuser = 'postgres'; $dbpasswd = 'meep'; $dbname = 'your_db'; function establish_db_co

[ADMIN] Script Hangs on

2001-06-05 Thread Ariunbold Gerelt-Od
By Php scripts I am connecting to database SERVER: But problem is if somebody suddenly switch off the server(210.111.1.10), the script hangs on. How would my script check that host is open before connecting? ---(end of broadcast)--- TIP 6: Have