Re: [PHP4BETA] Informix problems with php4
| From: | (Danny Heijl) | Date: | Wed, 25 Aug 1999 08:09:05 +0000 |
| Subject: | Re: [PHP4BETA] Informix problems with php4 | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3706@lists.php.net to get a copy of this message | ||
I have no problems switching connections using either ifx_connect() or
ifx_pconnect().
Perhaps you can make a simple test script that demonstrates the problem so
that I can try to reproduce it ?
What I have tested :
ifx_connect to database a
ifx_connect to database b
query database b
query database a
query database b
query database a
ifx_close database b
query database a
ifx_close database a
Also be aware that you can't use multiple connections with shared memory
(ipcshm) connections, you need soctcp or tlitcp for that.
Make sure that you do not use ifx_pclose or ifx_close when using pconnect,
because no matter what is in the documentation, links *will* be closed and
you lose the performance gain of ifx_pconnect.
In fact, except in CGI where ifx_pconnect is pointless, or if you want to
restrict the number of simultaneous connections to the database server, you
should not use ifx_(p)close if you use ifx_pconnect.
Danny.
---
----- Original Message -----
From: "Peter Kocks" <peter.kocks@baygate.com>
Newsgroups: php4.beta
Sent: woensdag 25 augustus 1999 7:22
Subject: [PHP4BETA] Informix problems with php4
> Hhmmm.... Not sure if this is worth reporting as a bug...
>
> php4.0b2, Solaris 7 (sparc and x86), apache 1.3.6
>
> ifx_connect works, but not if you switch databases your connecting to. I
> use ifx_connect and ifx_close to connect to the same database in the same
> script a couple of times, then my script switches to a new database and
> ifx_connect fails. ifx_message reports that the system it cannot establish
a
> connection.
>
> The same code works fine in php3.
>
> Of course, I really should be using ifx_pconnect, which I switched to and
> now everything works fine with ifx_pconnect.
>
> --pk
>
>
> --
> PHP 4 Beta
>