[FX.php List] Annoying PHP warning

Jonathan Schwartz jschwartz at exit445.com
Sun Sep 7 13:38:50 MDT 2008


Again, I'm sorry to hijack Bob's original email.  I'm thinking that 
we can learn something by adding in my similar experiences.

On that, I don't have a current error, I'm going from past 
experience.  However, I do often use the same name for $_SESSION 
variables and regular variables.  Plus it is my practice to have 
register_globals set to off. And I don't use session_register.

I will keep an eye out for the next time it occurs.

Thanks for the feedback.

Jonathan

At 7:45 PM +0200 9/7/08, Leo R. Lundgren wrote:
>Well, I don't really know for sure. I haven't encountered that error 
>myself and therefore haven't fixed it either.
>
>So, you're saying that you have a "yes" to #2, but not #1 (in the 
>cases of #2), when you encountered the same error?
>
>I'm merely trying to see what could be the cause, but I don't know 
>anything yet :-)
>
>Bob; Is it possible to see the code that might be causing this error?
>
>
>7 sep 2008 kl. 18.06 skrev Jonathan Schwartz:
>
>>Hmmm...not to hijack Bob's email....but I have definitely used the 
>>same name for regular variables and $_SESSION variables in the same 
>>script/solution.  Thsi is a no-no?
>>
>>Answer to other questions is "no".
>>
>>J
>>
>>
>>At 3:52 PM +0200 9/7/08, Leo R. Lundgren wrote:
>>
>>>Some thoughts:
>>>
>>>
>>>1) Do you have the setting register_globals set to On?
>>>
>>>2) Do you somewhere in your code use variable names such as $myVar 
>>>where a session variable with the same name (for example 
>>>$_SESSION['myVar']) is/have been used?
>>>
>>>3) Are you using session_register() somewhere in your code, such 
>>>as session_register('variable_name')?
>>>
>>>
>>>I've never seen that error before, but my guess is that #2 is the 
>>>problem (and to be fair, #1 is in error as well ;-)
>>>
>>>
>>>
>>>7 sep 2008 kl. 03.36 skrev Bob Patin:
>>>
>>>
>>>>I'm getting this warning, and I *think* it's because I have an 
>>>>undeclared variable, but if that's the case I can't find it.
>>>>
>>>>
>>>>Can anyone tell me the most common cause for this error?
>>>>
>>>>
>>>>ERROR MSG:
>>>>
>>>>
>>>>Warning: Unknown(): Your script possibly relies on a session 
>>>>side-effect which existed until PHP 4.2.3. Please be advised that 
>>>>the session extension does not consider global variables as a 
>>>>source of data, unless register_globals is enabled. You can 
>>>>disable this functionality and this warning by setting 
>>>>session.bug_compat_42 or session.bug_compat_warn to off, 
>>>>respectively. in Unknown on line 0
>>>>
>>>>
>>>>Thanks,
>>>>
>>>>
>>>>Bob Patin
>>>>
>>>>Longterm Solutions
>>>>
>>>><mailto:bob at longtermsolutions.com>bob at longtermsolutions.com
>>>>
>>>>615-333-6858
>>>>
>>>><http://www.longtermsolutions.com>http://www.longtermsolutions.com
>>>>
>>>>iChat: bobpatin
>>>>
>>>>AIM: longterm1954
>>>>
>>>>FileMaker 9 Certified Developer
>>>>
>>>>Member of FileMaker Business Alliance and FileMaker TechNet
>>>>
>>>>--------------------------
>>>>
>>>>FileMaker hosting and consulting for all versions of FileMaker
>>>>
>>>>PHP * Full email services * Free DNS hosting * Colocation * Consulting
>>>>
>>>>
>>>>_______________________________________________
>>>>
>>>>FX.php_List mailing list
>>>>
>>>><mailto:FX.php_List at mail.iviking.org>FX.php_List at mail.iviking.org
>>>>
>>>><http://www.iviking.org/mailman/listinfo/fx.php_list>http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>
>>>
>>>
>>>-|
>>>
>>>
>>>
>>>_______________________________________________
>>>FX.php_List mailing list
>>><mailto:FX.php_List at mail.iviking.org>FX.php_List at mail.iviking.org
>>><http://www.iviking.org/mailman/listinfo/fx.php_list>http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>>
>>
>>--
>>Jonathan Schwartz
>>Exit 445 Group
>><mailto:jonathan at exit445.com>jonathan at exit445.com
>><http://www.exit445.com>http://www.exit445.com
>>415-370-5011
>>_______________________________________________
>>FX.php_List mailing list
>><mailto:FX.php_List at mail.iviking.org>FX.php_List at mail.iviking.org
>><http://www.iviking.org/mailman/listinfo/fx.php_list>http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
>
>-|
>
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20080907/f92ef479/attachment.html


More information about the FX.php_List mailing list