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
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
- Original Message -
From: Chris [EMAIL PROTECTED]
To: C.R.Vegelin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] php-general@lists.php.net
Sent: Wednesday, July 11, 2007 8:56 AM
Subject: Re: [PHP] How to pass connection as global variable ?
C.R.Vegelin wrote:
I have various PHP scripts
C.R.Vegelin wrote:
- Original Message - From: Chris [EMAIL PROTECTED]
To: C.R.Vegelin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] php-general@lists.php.net
Sent: Wednesday, July 11, 2007 8:56 AM
Subject: Re: [PHP] How to pass connection as global variable ?
C.R.Vegelin wrote:
I have
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.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
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
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
: [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 connection is set in $_SESSION to make it a global variable for
all
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
10 matches
Mail list logo