Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2007
    Posts
    61
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Changing global / Predefined variables in PHP

    Hi,

    I had my site working earlier in HT Access authentication. This registered the global variable $HTTP_AUTH_USER as the authenticated user on my website.
    HOwever, due to changed requirements, I am now using sessions.


    What I want to do is change the $HTTP_AUTH_USER to PHPSESSID['ulogin'] instead.

    Is there a way to override $HTTP_AUTH_USER on all pages that changes it to PHPSESSID thing instead ?


    THe sessionid thing starts once the user logs in using sessions.


    Thanks

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Use find/replace?

  • #3
    New Coder
    Join Date
    Jul 2007
    Posts
    61
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Could you elaborate a little more please ?

    Thanks

  • #4
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I assume he means using your favorite text editor, replace all occurrences of $HTTP_USER_AUTH with PHPSESSID['ulogin']. Most good editors will have a feature to replace all.


  •  

    Posting Permissions

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