RE: Session Vars loaded from MSSQL Query drop, those loaded from MYSQL Query stick

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew - I didn't mean to ignore your reply...

Here is your earlier post - 

" The fact that you can echo the $_SESSION information on the same page and they contain the correct values suggest to me that the issue of MySQL/MSSQL is a red herring. I would look into things like the value for register_globals to make sure you don't have a global variable stepping on some of your session variables."

Register_globals is off in our php.ini file.   

Again, I am fairly new to PHP. I guess I don't understand how a global variable can "step on" a session variable if the only thing I'm assigning anywhere in my application to said session variable is a value from a database query.  When PHP changes pages, it might be arbitrarily assigning some value to a session variable, even though I'm not telling it to?  

Can you please explain this to me?  Thanks -    

-----Original Message-----
From: Andrew Ballard [mailto:aballard@xxxxxxxxx] 
Sent: Thursday, September 16, 2010 2:21 PM
To: Cheryl Sullivan
Cc: Tommy Pham; php-general@xxxxxxxxxxxxx
Subject: Re:  Session Vars loaded from MSSQL Query drop, those loaded from MYSQL Query stick

On Thu, Sep 16, 2010 at 10:26 AM, Cheryl Sullivan <csulliva@xxxxxxx> wrote:
[snip]
> When I echo all five $_SESSION vars from here, they are all populated.
> Then I can either redirect or form post to the next page.  In either
> case, the $_SESSION vars populated from SQL Server ( the SSN and Cost
> Center vars) are blank when I echo them on the destination page.

On Thu, Sep 16, 2010 at 2:12 PM, Cheryl Sullivan <csulliva@xxxxxxx> wrote:
> Tommy  - I ran phpinfo() but I don't see anything in it referencing
> MSSQL or SQLSRV.  I have included all the references to "sql" I see
> below, but the only references I see to databases are to mySQL and
> SQLLite.  Unfortunately I don't have any control over how service-packed
> the database server is.  Is there something in SP 4 for SQL Server 2000
> that is supposed to fix the issue I'm having, I may be able to plead my
> case for getting the latest SP.  Is this the case, do you know?
>
[snip]

Again, I ask - based on what you said earlier - are you sure this is
even a database issue? You said that when you echo the values in your
$_SESSION array AFTER reading them from the database they are there,
and you only lose them on the next request after either a redirect or
a manual form POST. If the values are getting into $_SESSION correctly
within this page, your issue is not related to the database at all.

Am I misunderstanding you?

Andrew

Notice: This communication, including attachments, may contain information that is confidential and protected. It constitutes non-public information intended to be conveyed only to the designated recipient(s). If you believe that you have received this communication in error, please notify the sender immediately by return e-mail and promptly delete this e-mail, including attachments without reading or saving them in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail, including attachments, is prohibited and may be unlawful. Thank you.


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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux