Announcement

Collapse
No announcement yet.

Wrong Connection problems

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wrong Connection problems

    Hi - can anyone help

    I have deployed my application to live from dev and set up the relevant database connections using the production environment console

    The problem is, that when i log into ,my application it is still connecting to the dev database rather than the live database

    Both test and live databases are on the same server (Mysql)

    anyone got any ideas?

    Will
    Will
    www.willhogarth.com

  • #2
    Try with another browser, is because your session vars probably.
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Originally posted by Giu View Post
      Try with another browser, is because your session vars probably.
      When i log into another browser I can get my LIVE DB via my LIVE system .. BUT ... then my TEST system is connecting to the LIVE DB

      It seams that whichever environment i log into first becomes the persistent DB connection no matter which environment I log into?

      Anyone any ideas on how to force a reset ?
      Will
      www.willhogarth.com

      Comment


      • #4
        Originally posted by william@victus-vsuk.co.uk View Post
        When i log into another browser I can get my LIVE DB via my LIVE system .. BUT ... then my TEST system is connecting to the LIVE DB

        It seams that whichever environment i log into first becomes the persistent DB connection no matter which environment I log into?

        Anyone any ideas on how to force a reset ?
        This realy sounds like a cookie problem. Are you mixing dev and prod environments? Then I recommend you to clear your browser cache and cookies.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          I have 4 environments DEV - TEST - NEAR LIVE - LIVE

          LIVE on its own box
          I have found if i use an incognito window and close it when I have finished that I can switch between my TEST - NEAR LIVE
          Although it is a bit of a pain
          Will
          www.willhogarth.com

          Comment


          • #6
            Originally posted by aducom View Post
            This realy sounds like a cookie problem. Are you mixing dev and prod environments? Then I recommend you to clear your browser cache and cookies.
            ^^^^^^

            This
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment


            • #7
              Originally posted by aducom View Post
              This realy sounds like a cookie problem. Are you mixing dev and prod environments? Then I recommend you to clear your browser cache and cookies.
              yep .. its cookies ... once i delete the cookie it works

              Cheers ... just need to find a suitable solution ... other than splitting servers
              Will
              www.willhogarth.com

              Comment


              • #8
                Virtual hosts must do the job too.
                /Giuseppe

                Professional Scriptcase Services
                Some Customers opinions

                Comment


                • #9
                  William,

                  In your root directory for a particular server, create/edit a .htaccess file and plug in this line:

                  php_value session.name "MYSESSID"

                  For each server (i.e., DEV, TEST, NEAR_LIVE, LIVE) change "MYSESSID" to a unique value.

                  Of course clear cache and cookies after creating the .htaccess files.

                  This enables different virtual hosts to use differently named cookies to store their PHP Session ID.
                  If this does not seem to work, then make sure your Virtual Host definition (Apache) sets AllowOverride to All.

                  Dave
                  Last edited by daveprue; 03-31-2015, 12:23 AM.
                  Dave Prue
                  Code Whisperer
                  Lahar International Corp
                  www.lahar.net

                  Comment


                  • #10
                    Originally posted by daveprue View Post
                    William,

                    In your root directory for a particular server, create/edit a .htaccess file and plug in this line:

                    php_value session.name "MYSESSID"

                    For each server (i.e., DEV, TEST, NEAR_LIVE, LIVE) change "MYSESSID" to a unique value.

                    Of course clear cache and cookies after creating the .htaccess files.

                    If this does not seem to work, then make sure your Virtual Host definition sets AllowOverride to All.

                    Dave
                    Good trick
                    /Giuseppe

                    Professional Scriptcase Services
                    Some Customers opinions

                    Comment

                    Working...
                    X