[PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
I have various PHP scripts that use the same database. The startup script default.php sets the connection once for all the scripts. This connection is set in $_SESSION to make it a global variable for all scripts. When switching from page default to page faq, I get errors I can't explain. Any hel

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread Chris
C.R.Vegelin wrote: I have various PHP scripts that use the same database. The startup script default.php sets the connection once for all the scripts. This connection is set in $_SESSION to make it a global variable for all scripts. When switching from page default to page faq, I get errors I ca

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
- Original Message - From: "Chris" <[EMAIL PROTECTED]> To: "C.R.Vegelin" <[EMAIL PROTECTED]> Cc: "[EMAIL PROTECTED]" Sent: Wednesday, July 11, 2007 8:56 AM Subject: Re: [PHP] How to pass connection as global variable ? C.R.Vegelin wrote: I

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread Chris
C.R.Vegelin wrote: - Original Message - From: "Chris" <[EMAIL PROTECTED]> To: "C.R.Vegelin" <[EMAIL PROTECTED]> Cc: "[EMAIL PROTECTED]" Sent: Wednesday, July 11, 2007 8:56 AM Subject: Re: [PHP] How to pass connection as global variable ? C.R.

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
C.R.Vegelin wrote: I have various PHP scripts that use the same database. The startup script default.php sets the connection once for all the scripts. This connection is set in $_SESSION to make it a global variable for all scripts. When switching from page default to page faq, I get errors I c

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread M. Sokolewicz
C.R.Vegelin wrote: C.R.Vegelin wrote: I have various PHP scripts that use the same database. The startup script default.php sets the connection once for all the scripts. This connection is set in $_SESSION to make it a global variable for all scripts. When switching from page default to page f

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread clive
Hi Chris, I recreated a new connection in faq.php and it's working now. I had the impression that 1 connection could last during a user session, but apparently a user session may need many connections. Thanks again, Cor Have a read on persistent connections Regards, Clive. {No electrons

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread chris smith
On 7/11/07, clive <[EMAIL PROTECTED]> wrote: > Hi Chris, > > I recreated a new connection in faq.php and it's working now. > I had the impression that 1 connection could last during a user session, > but apparently a user session may need many connections. > > Thanks again, Cor > Have a read on

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread C.R.Vegelin
D]" Sent: Wednesday, July 11, 2007 9:56 AM Subject: Re: [PHP] How to pass connection as global variable ? C.R.Vegelin wrote: C.R.Vegelin wrote: I have various PHP scripts that use the same database. The startup script default.php sets the connection once for all the scripts. This connecti

Re: [PHP] How to pass connection as global variable ?

2007-07-11 Thread Richard Lynch
You can't make a database connection survive past the end of a script. So putting it in the $_SESSION is about as pointless as it gets. On Wed, July 11, 2007 3:47 am, C.R.Vegelin wrote: > I have various PHP scripts that use the same database. > The startup script default.php sets the connection o