SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php session Error

    hi all,

    If any one knows the meaning of following error, and way to rectify plz tell...


    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

  2. #2
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh that's pretty confusing one
    Took me a hours to dig out. Even php source code were examined.

    Make sure you don't have $_SESSION array key names matching global variable name.
    E.g. if you have $_SESSION['cart'] variable and $cart variable in same script, one of them must be changed.
    Name it $_SESSION['sess_cart'] and error will disappear.

    also, variable declaration would help

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for reply...


    now that error has cleared


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •