ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

DB error when trying to create Staging Server

October 29, 2011 1:47pm

Subscribe [5]
  • #1 / Oct 29, 2011 1:47pm

    grantmx

    1439 posts

    I’m trying to replicate my site on a staging sub domain, so I made a copy of everything on my live domain to my staging domain including db, made the path changes, etc.  But when I login I get this db error:

    A Database Error Occurred

    Error Number: 1054

    Unknown column ‘site_id’ in ‘field list’

    INSERT INTO `exp_sessions` (`admin_sess`, `session_id`, `ip_address`, `member_id`, `last_activity`, `site_id`, `user_agent`) VALUES (1, ‘43a80dd73fcf655cc9c13fba6aa55c9d16d97f04’, ‘74.217.86.15’, 1, 1319909751, 1, ‘Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1’)

    Filename: libraries/Session.php

    Line Number: 421

    Running MSM on the live site, which sounds like is causing the problem on my staging site when it’s trying to insert the session in to the db.

    But not quite sure of a work around. Thanks for any help!

  • #2 / Oct 31, 2011 4:31am

    John Henry Donovan

    12339 posts

    Hi Marshall,

    can you try deleting your staging database and reimporting. Check the exp_sessions table columns match your live exp_sessions tables’

    What are you using to login? The admin.php or system/index.php


    What version and build of EE are you using?

  • #3 / Oct 31, 2011 9:25am

    grantmx

    1439 posts

    Thanks John -

    Yes, the tables match; and that column is indeed missing in both live and staging.  Using system/index.php to login and running 2.3.1 build 20111017.

    When I go to the staging home page I get this message:

    Site Error: Unable to Load Site Preferences; No Preferences Found

    Not sure if that helps.

     

  • #4 / Oct 31, 2011 9:29am

    grantmx

    1439 posts

    Doesn’t appear that I can pull the latest version down from Downloads & Support.  It says I’m not logged in.

  • #5 / Nov 01, 2011 2:58pm

    Sue Crocker

    26054 posts

    Hi, Grant. Try logging in again… can you now download?

  • #6 / Nov 21, 2011 12:10pm

    aircrash

    293 posts

    Was this ever resolved? I am having the same issue.

    I’m running 2.1.3, and my live site is working fine. I just backed up the live site, copied it to the staging server and copied over the live site’s database, and now I am getting this same error. I’ve dropped and re-imported the database, and deleted and re-uploaded the entire site, and am still getting the error.

    I’ve checked both databases, and the site_id column is missing from both the live and staging dbs, but I am able to successfully log in to the live site. When I go to the staging home page, I get a blank screen (no php errors).

    Both versions of the site are running on the same host, so there should be no issues there.

  • #7 / Nov 22, 2011 7:08pm

    Sean C. Smith

    3818 posts

    Hi aircrash,

    Are you running MSM and if so did you move those files as well to your staging server?

    Sean

  • #8 / Nov 22, 2011 9:25pm

    aircrash

    293 posts

    No, it was my own fault. I mis-labeled my files, so I was re-uploading my old site files rather than the new ones (both times), so I had the 2.3.1 database and 2.2.x files. Once I uploaded the correct files, everything was fine.

  • #9 / Nov 23, 2011 4:49am

    John Henry Donovan

    12339 posts

    Thanks for the update aircrash.

    where are you with this Marshall. Were you able to resolve on your own?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases