3 Replies Latest reply on Mar 20, 2008 12:21 PM by Günter Schenk

    page redirect losing session data

      I have a web site that I tested on a local server that now fails on a production server. The problem appears to be when using the redirect action after processing a form. For example I have a form that inserts a row on a table using the insert record behaviour, the behaviour is configured as after inserting redirect to comfirm.php, the problem is that in confirm.php I do not have any of my session variables available. Also if in confirm.php I try to do a redirect I get Output already started error. The bigest problem is though that my session variables are not available to me.

      This did not happen when testing on my local server.
        • 1. Re: page redirect losing session data
          Günter Schenk Level 4
          Hi,

          ----
          The bigest problem is though that my session variables are not available to me
          ----

          please try with adding...



          ...on line 1 of your redirection pages. You don´t need to add that to ADDT´s Lists and Forms, as they detect the session by default, but on manually created PHP pages it´s usually required.

          ------
          This did not happen when testing on my local server
          ------

          That doesn´t mean anything, because a host´s php.ini settings may be different from your local server´s configuration.

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: page redirect losing session data
            Level 1
            I already hace as the very first line on the page.

            I have also noted that all urls in my site have ?PHPSESSID=xxx added to them. I do not have this on other sites or indeed on my local site. My other sites all have te same version of php and the same php.ini file configuration, so why does this site have PHPSESSID in the urls whereas the other sites do not, even thought all sites are configured the same. Does ADDT add/make PHPSESSID appear in the url as that would appear to be the only difference between this and the other sites.
            • 3. Re: page redirect losing session data
              Günter Schenk Level 4
              ------
              Does ADDT add/make PHPSESSID appear in the url as that would appear to be the only difference between this and the other sites.
              ------

              ADDT doesn´t do that, it´s the remote server´s php settings.

              Seems like that particular site has the following php.ini setting:

              - session.use_trans_sid: 1

              This setting will have to have the opposite value, means:

              - session.use_trans_sid: 0

              Cheers,
              Günter Schenk
              Adobe Community Expert, Dreamweaver