Re: [PHP] odbc_pconnect doesnt reuse connection

2002-04-03 Thread eric.coleman

Why won't you just use odbc_connect ?
- Original Message -
From: Maris Kalnins [EMAIL PROTECTED]
To: 
Sent: Wednesday, April 03, 2002 3:07 AM
Subject: [PHP] odbc_pconnect doesnt reuse connection


 Hi!

 Configuration: WinXP, the latest Apache, PHP4

 The problem is that every time the script runs and the following command
is
 executed
 $cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw);
 it happens very often that a new connection is created instead of reusing
 the old one!

 Is there any idea what's wrong... ?

 And another question - when user hits reload or submit button at the
moment
 when
 actually this odbc_pconnect is in progress - it generates another
connection
 leaving the old one
 (half opened or whatever) still alive..

 So if you will click on submit button more than 10 times with a little
short
 interval -
 we will get ODBC error - Database server connection limit exceeded

 I tried to set in PHP config file
 odbc.max_persistent = 1

 but it still overgoes more than 1 connection to the same database, user
and
 password..

 What's  wrong?







 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] odbc_pconnect doesnt reuse connection

2002-04-03 Thread Maris Kalnins

because odbc_connect takes some time to establish connection
while odbc_pconnect establishes it once after that it suppose to
give faster access through already existing connection!

that's what I got from php manual..
the bad thing is .. that in reality it works a little bit different..
so I am wondering .. why?



Eric Coleman [EMAIL PROTECTED] wrote in message
026b01c1db1c$860b2890$0201a8c0@devstation">news:026b01c1db1c$860b2890$0201a8c0@devstation...
 Why won't you just use odbc_connect ?
 - Original Message -
 From: Maris Kalnins [EMAIL PROTECTED]
 To: 
 Sent: Wednesday, April 03, 2002 3:07 AM
 Subject: [PHP] odbc_pconnect doesnt reuse connection


  Hi!
 
  Configuration: WinXP, the latest Apache, PHP4
 
  The problem is that every time the script runs and the following command
 is
  executed
  $cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw);
  it happens very often that a new connection is created instead of
reusing
  the old one!
 
  Is there any idea what's wrong... ?
 
  And another question - when user hits reload or submit button at the
 moment
  when
  actually this odbc_pconnect is in progress - it generates another
 connection
  leaving the old one
  (half opened or whatever) still alive..
 
  So if you will click on submit button more than 10 times with a little
 short
  interval -
  we will get ODBC error - Database server connection limit exceeded
 
  I tried to set in PHP config file
  odbc.max_persistent = 1
 
  but it still overgoes more than 1 connection to the same database, user
 and
  password..
 
  What's  wrong?
 
 
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] odbc_pconnect doesnt reuse connection

2002-04-03 Thread eric.coleman

I have an IDEA

If your familiar with OOP

Write a class that is like a WRAPPER to the ODBC functions.

Then, you can connect once, and keep the connection
ALL this using just odbc_connect

This is what I have done, and if you would like, I can write a quick one.

Eric
- Original Message -
From: Maris Kalnins [EMAIL PROTECTED]
To: 
Sent: Wednesday, April 03, 2002 10:11 AM
Subject: Re: [PHP] odbc_pconnect doesnt reuse connection


 because odbc_connect takes some time to establish connection
 while odbc_pconnect establishes it once after that it suppose to
 give faster access through already existing connection!

 that's what I got from php manual..
 the bad thing is .. that in reality it works a little bit different..
 so I am wondering .. why?



 Eric Coleman [EMAIL PROTECTED] wrote in message
 026b01c1db1c$860b2890$0201a8c0@devstation">news:026b01c1db1c$860b2890$0201a8c0@devstation...
  Why won't you just use odbc_connect ?
  - Original Message -
  From: Maris Kalnins [EMAIL PROTECTED]
  To: 
  Sent: Wednesday, April 03, 2002 3:07 AM
  Subject: [PHP] odbc_pconnect doesnt reuse connection
 
 
   Hi!
  
   Configuration: WinXP, the latest Apache, PHP4
  
   The problem is that every time the script runs and the following
command
  is
   executed
   $cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw);
   it happens very often that a new connection is created instead of
 reusing
   the old one!
  
   Is there any idea what's wrong... ?
  
   And another question - when user hits reload or submit button at the
  moment
   when
   actually this odbc_pconnect is in progress - it generates another
  connection
   leaving the old one
   (half opened or whatever) still alive..
  
   So if you will click on submit button more than 10 times with a little
  short
   interval -
   we will get ODBC error - Database server connection limit exceeded
  
   I tried to set in PHP config file
   odbc.max_persistent = 1
  
   but it still overgoes more than 1 connection to the same database,
user
  and
   password..
  
   What's  wrong?
  
  
  
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] odbc_pconnect doesnt reuse connection

2002-04-02 Thread Maris Kalnins

Hi!

Configuration: WinXP, the latest Apache, PHP4

The problem is that every time the script runs and the following command is
executed
$cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw);
it happens very often that a new connection is created instead of reusing
the old one!

Is there any idea what's wrong... ?

And another question - when user hits reload or submit button at the moment
when
actually this odbc_pconnect is in progress - it generates another connection
leaving the old one
(half opened or whatever) still alive..

So if you will click on submit button more than 10 times with a little short
interval -
we will get ODBC error - Database server connection limit exceeded

I tried to set in PHP config file
odbc.max_persistent = 1

but it still overgoes more than 1 connection to the same database, user and
password..

What's  wrong?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] odbc_pconnect doesnt reuse connection

2002-04-02 Thread Maris Kalnins

Hi!

Configuration: WinXP, the latest Apache, PHP4

The problem is that every time the script runs and the following command is
executed
$cx=odbc_pconnect($G_dbname, $G_dblogin, $G_dbpassw);
it happens very often that a new connection is created instead of reusing
the old one!

Is there any idea what's wrong... ?

And another question - when user hits reload or submit button at the moment
when
actually this odbc_pconnect is in progress - it generates another connection
leaving the old one
(half opened or whatever) still alive..

So if you will click on submit button more than 10 times with a little short
interval -
we will get ODBC error - Database server connection limit exceeded

I tried to set in PHP config file
odbc.max_persistent = 1

but it still overgoes more than 1 connection to the same database, user and
password..

What's  wrong?







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php