PHP Session Issues -

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default PHP Session Issues -

    Hello,

    I have two identical sites hosted with two different ISPs; one has
    login/logout issues, the other does not. The only difference is there is a PHP
    Conncetion file that points to the MySQL database at each hosting server. The
    databases are identical, same name, same tables, it was a copy.

    The fully functional site was uploaed to the other hosting company server. I
    then changed the 4 connection variables on my connection PHP file; 1-MySQL DB
    server name, 2-database name, 3-user name, 4-password. Other than that, every
    line of code is identical between the sites. I even ran them through source
    code compare tools.

    I am having various auto-logout issues. One example is that when I add to the
    shopping cart by clicking the add-to-cart button, I end up on the add-to-cart
    page as I should but I have a "your shopping cart is empty", and I am now
    logged out. My site requires the user to be logged in to buy.

    Another example is when a new user registers they are auto-logged in. On one
    site this works fine, on the other site after registering they are directed to
    the login page indicating the auto-login failed.

    I positive the code and databases are identical between the sites.

    Has anyone ever experienced this before? Any suggestions? I was thinking
    that the PHP server settings are different on the two servers, so I created a
    PHP info page and compared them side by side, but I simply do not have the
    skills to know what setting could cause these session issues and the
    auto-logout. I have been on this for almost 2 weeks and simply have to get this
    done.

    Thanks in advance

    harrillj Guest

  2. Similar Questions and Discussions

    1. #16263 [Com]: session.start() create new empty session file and not resume existing session
      ID: 16263 Comment by: pat at burnttech dot com Reported By: kur at natur dot cuni dot cz Status: No Feedback...
    2. authentication and session issues with resources
      Hi, I have a webforms application which uses Forms Authentication. There are two webforms, mainform.aspx which retrieves data from a data.aspx...
    3. #25551 [NEW]: Session data loss when accessing session from multiple windows.
      From: brett at realestate-school dot com Operating system: Linux - Red Hat PHP version: 4.3.1 PHP Bug Type: Session related...
    4. #25307 [Opn->Ver]: Crash when session.serialize_handler=wddx & session, post, get vars
      ID: 25307 Updated by: sniper@php.net Reported By: cristea at pntcd dot ro -Status: Open +Status: ...
  3. #2

    Default Re: PHP Session Issues -

    harrillj wrote:
    > I have two identical sites hosted with two different ISPs; one has
    > login/logout issues, the other does not.
    Almost certainly a question of register_globals being set to "on" on the
    server that works, and "off" on the one that doesn't. "Off" is the
    correct setting. The problem lies with outdated code in the Dreamweaver
    server behaviors. The solution is simple, and it's explained here in a
    post I wrote on the friends of ED forum more than a year ago:

    [url]http://friendsofed.infopop.net/2/OpenTopic?a=tpc&s=989094322&f=8033053165&m=3241024 21&r=324102421#324102421[/url]

    --
    David Powers
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    Co-author "PHP Web Development with DW MX 2004" (Apress)
    [url]http://computerbookshelf.com[/url]
    David Powers Guest

  4. #3

    Default Re: PHP Session Issues -

    Hi Dave and thanks a lot for the response. I think I may have another cause
    however. I used InterAKT's software for my login instead of Dreamweaver
    authentication extensions. Also, I created a PHP Info page on both sites and
    link to them from my home page. In both cases PHP version 4.3.10 is being
    used, and also, in both cases the register_globals is set to "on", yet one site
    works and the other not.

    harrillj Guest

  5. #4

    Default Re: PHP Session Issues -

    Is it possible you have a full web address coded into a form action for
    example, and your going from one site to the other? Sessions cannot be
    transferred across domains, so if one site is submitting to the other site,
    you`ll wont be able to read the session information on the second site.



    gareth Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139