session variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darksteel21
    New Member
    • Jul 2008
    • 36

    #1

    session variables

    hi to all,
    i am a programmer here in our company,using php and actually my first job...i have problems regarding displaying of session variables..when i created my application in my local apache server, session variables are working fine but when i uploaded my application on our company's remote server, they are not working anymore or they don't display the values of my session variables..are there any configurations on the remote server??or do ihave to revise my codes??
    i hope someone could advice me on this...Thanks
  • webster5u
    New Member
    • Jan 2008
    • 28

    #2
    it is sound like my last time problem, i guess probably your company server doesn't set session.save_pa th variable correctly?

    you try check the apache configuration in your server httpd.config, is it set to correct path.

    Comment

    • darksteel21
      New Member
      • Jul 2008
      • 36

      #3
      ah i see...i guess i dont have the permission to configure our remote server and besides i don't know yet how to operate unix servers..by the way i did some work around and it solved my problem...befor e i used the session_registe r in creating session variables i just changed it to $_SESSION in assigning values to my session variables, but i wana know what's the difference between the two functions??why is the session_registe r wont work on our remote server while the $_SESSION works??is it in the configuration that you are saying a while ago??....and by the way thaaaaaaaaaaaaa aaaaanksss!

      Comment

      • dlite922
        Recognized Expert Top Contributor
        • Dec 2007
        • 1586

        #4
        Sessions only work for one domain

        if the part between the "http://" and "/page.php" changes at any point, it will get lost.

        Pay attention to this in your pages before pointing the finger.


        Dan

        Comment

        • Atli
          Recognized Expert Expert
          • Nov 2006
          • 5062

          #5
          Hi.

          The session_registe r function is an old, deprecated, method of registering session variables.
          It requires that the register_global s directive is enabled on your server, which it is not by default in PHP5. It is also not recommended to turn this on for security reasons.
          Not to mention that this directive will be completely removed in PHP6.

          Using the $_SESSION array is the ideal way to handle sessions in PHP5 and later versions of PHP4.

          Comment

          Working...