Having two windows to connect to the same DB
| From: | LIMBOURG Arnaud | Date: | Wed, 20 Mar 2002 18:54:24 +0000 |
| Subject: | Having two windows to connect to the same DB | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-5062@lists.php.net to get a copy of this message | ||
Hello,
We ran into a problem concerning database connections.
I'm pretty sure somebody has encountered this problem before. We're using
PEAR DB, but i think it isn't related to pear db.
What the application is trying to achieve is this:
- on load event some javascript is fired which opens a new navigator
window
- this window uses the same sessionid (which is what it is supposed
to do)
- both windows use database connections
- the code in both window is the same, that is, $db =
DB::connect($dsn);
Now the problem is that the first window works well but on the second window
the following error shows up DB Error: connect failed [nativecode=MySQL
Connection Failed: Unknown MySQL Server Host 'xxxxx' (2) ]
Additionnal information:
it works well under WinNT 4, Apache 1.3.22, PHP 4.1.2 but fails under Redhat
7.2, Apache 1.3.23, Php 4.1.2, Mysql 3.23.49
I guess it has something to do with threads or something but i'm new to
linux and don't get it.
If anybody can help that would be a relief ;))
Thanks in advance.
Arnaud.