SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    lisboa
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    register_globals on

    I just checked in my host server and noticed they have php 4.2.3 and
    register_globals is on.
    In my scripts i use
    PHP Code:
    $_SERVER['PHP_SELF'
    I'm posting this because in my testing environment everything is fine, but in my host, when i click in a submit button, looks like i loose the session (i've protected pages), i mean, i'm sent to login page again.
    May this be the reason?
    What can i do?

  2. #2
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What version of PHP have you for testing ? The $_SERVER[...] shouldn't really interfere with $_SESSION[...] as far as I know.

  3. #3
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    lisboa
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in my testing environment i've php 4.3.1

  4. #4
    lean mean coding machine cosmo's Avatar
    Join Date
    Aug 2001
    Location
    the cosmos
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe you should post the part of your code where you handle the sessions. It will be much easier to pinpoint the problem.
    Luthfur R. - Web Developer
    PHP Lite.com - Professional PHP Scripts and Web Applications
    Calendar Express 2 - Web Based Calendar and Event Publishing System

  5. #5
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    lisboa
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for helping
    the problem is:
    i made this php site, and from my pc, it works fine; when i uploaded it to the web host, i started with these problems, so i guessed should be something related with sessions;
    The site its adapted from K Yank's book and the protected pages from his article too...
    I've 20 or 30 pages, so dont know where to start from...
    Sometimes when i click in an input, other times just by clicking in a link, and here i am being sent to the login page again...
    EDIT
    i've a remember me checkbox, that stores username+password in cookies, and in this way i dont ever loose the session
    Last edited by rfl; Jun 29, 2003 at 12:17.


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
  •