> $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
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)--
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
> $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
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
I'm not sure how this message got posted again. I think it is because I
posted it to the newsgroup first but it was rejected since I was not a
member of the list. Now that I'm a member, I'm assuming it went through.
However, I'd already sent it directly to the list as an email after joining.
So
Stephan and Tim,
Thanks for your response. Not exactly what I was hoping for, but at least I
don't need to keep searching any longer.
Tauren
> -Original Message-
> From: Stephan Szabo [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 05, 2001 3:15 PM
> To: Tauren Mills
> Cc: [EMAIL PROT
=?iso-8859-1?Q?Hans=2DJ=FCrgen=20Sch=F6nig?= <[EMAIL PROTECTED]> writes:
> kshopd@a:~/backup > psql tempdata
> psql: pqReadData() -- backend closed the channel unexpectedly.
> This probably means the backend terminated abnormally
> before or while processing the request.
Hm. This
On Tue, 5 Jun 2001, Tauren Mills wrote:
> I don't mean to be a pest, but I haven't heard anything back on this subject
> and have been unable to locate any information about it in the manuals. I'm
> not the only one interested in this since I've received mail from other
> people asking if I have
I modified the pg_dumpall script to pg_dumpalltodir script. This script
dumps all databases to a dir (specified with the -e or --dir switch)
including the large objects. But i'm not sure if it's correct and it dumps
all info to rebuild the whole database system after a fatal crash...
with kindly
I'm new to PostgreSQL and am trying to implement it in a shared web
application hosting environment. Ideally, I'd like each customer to have
their databases stored within their own user area. For instance, the
/home/user1/.pgsql would contain all of user1's databases.
It looks like this could b
Roy Souther <[EMAIL PROTECTED]> writes:
> But I can do "SELECT * FROM a_bad_table" and I see all the data, it is there.
> But also when I do "SELECT * FROM pg_tables WHERE tablename = 'a_bad_table'"
> I get nothing, it is not in the tables table.
pg_tables is just a view, and it filters out stuff
I have have 2 databases running on my system ("intranet" and
"tempdata"). I can access "intranet" without problem but I cannot
connect to "tempdata" anymore. If I create a new database let's say
"tempdata2" I can't connect to it, too.
"intranet" and "template1" seem to be the only databases I can
I don't mean to be a pest, but I haven't heard anything back on this subject
and have been unable to locate any information about it in the manuals. I'm
not the only one interested in this since I've received mail from other
people asking if I have an answer yet.
Does anyone know if this is poss
Hi, we're in the process in making a decision about whether or not to use Postgres
vs. MySQL, DB2 and a variety of other DBMS's. Are there any good, reliable
benchmarks that someone could point me to? Thanks in advance.
---(end of broadcast)---
TI
Is there a way to limit the number of simultaneous connections that any
given username can make to the database? For instance, I'd like user1 to be
able to have no more than 5 simultaneous connections to the database server,
but user2 can have 15 simultaneous connections.
Also, can these connect
How can i set the date default format to European
on the 7.1.2 postgres version.
I have passed the -o e option at pg_ctl, tried the
PGDATESTYLE=European in postgres.conf, set the PGDATESTYLE environnement var and
nothing work.
In the version 7.0 it was working ?
Any idea ?
Thanks.
S
Kevin Brown <[EMAIL PROTECTED]> writes:
> Under v7.0.3, if I ran multiple queries on this box they would each run on a
> different processor and wouldn't impact on each others performance until I
> ran more queries than CPUs. Now when I run queries they all stay on one
> processor and cause the q
First of all, I hope this is the write place to post this. If not please tell
me.
Some time ago the HDD that my database is on died. The backups as far back as
I can go are to be corrupted, this could be because of the drive dieing over
time. I can not afford to loose my data so I am trying to
I've got a small problem and thought someone here might be able to help
solve it. Recently I upgraded one of the linux servers with PostgreSQL v7.1
from v7.0.3 to get support for OUTER JOINS amongst other things for a
project here at work (running a Snort NIDS logging to an SQL server).
My curre
20 matches
Mail list logo