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.

Database Errors after Moving to new Host

August 16, 2011 10:32am

Subscribe [4]
  • #1 / Aug 16, 2011 10:32am

    chrigu

    21 posts

    Hi,

    I set up my EE Website on local dev. environment with MAMP (1.9, PHP 5.3.2, MySQL 5.1.44), where all it works like should. I followed the Instructions Manual ‘Moving ExpressionEngine to Another Server’, tested my live hosting with the ee wizard, where all test sucessfully passed.

    After all, I got on my live Serverhosting some ‘Database Errors’ with ‘Error Number: 1054’. Seems like Database connections are working but what does it mean:

    Index Site:

    Error Number: 1054
    
    Unknown column 'id' in 'field list'
    
    SELECT `id`, `url`, `m_field_id`, `m_field_name`, `m_field_fmt` FROM (`exp_member_fields`)
    
    Filename: modules/channel/mod.channel.php
    
    Line Number: 1005

    admin.php:

    Error Number: 1054
    
    Unknown column 'site_id' in 'where clause'
    
    SELECT * FROM (`exp_members`) WHERE `site_id` = '1' AND `last_activity` < 1313497817
    
    Filename: models/member_model.php
    
    Line Number: 280

    Thanks for any hints!

  • #2 / Aug 16, 2011 8:13pm

    Dan Decker

    7338 posts

    Hi chrigu,

    It looks like you might need to DROP the ExpressionEngine database from your live site and re-import the SQL dump form your development environment.

    Let us know if that clears up your errors.
    Cheers,

  • #3 / Aug 17, 2011 12:56pm

    chrigu

    21 posts

    The SQL command ‘DROP’ isn’t enabled in my live hosting, except to delete and recreate a database from my hosting backend, what I exactly did. phpMyAdmin shows me then a new database with zero tables.

    After the re-import, It seems for me, that theres no difference. Exactly same errors as before.

  • #4 / Aug 18, 2011 6:48pm

    Dan Decker

    7338 posts

    chrigu,

    Are you running the same version of ExpressionEngine on both local and production servers? Can you describe for me the process you went through to export your database from your local environment? Finally, can you look in PHPMyAdmin on your production server and find ‘exp_member_fields’ table and verify that there is an ‘id’ column on that table?

    Something is not surviving the export process.

    Let us know what you discover.

    Cheers,

  • #5 / Aug 19, 2011 5:41am

    chrigu

    21 posts

    MAMP Local Dev. Environment:
    Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2
    MySQL-Client-Version: 5.1.44

    Webhosting Environment:
    Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g mod_perl/2.0.3 Perl/v5.8.8
    MySQL Client-Version: 5.0.51a
    MySQL Version: 5.0.51a-3ubuntu5.4

    Till the EE 1.6.8 Version I moved the MySQL Dump between the MAMP Local Dev. and Webhosting successfully the same way, by exporting the SQL Dump in PHPMyAdmin. I updated the EE 1.6.8 to 2.1.1 - Build 20110705 on my Local Dev. Environment in my Opinion successfully too, there where no errors left or other abnormally behaviors.

    For export the MySQL Dump to the Webhosting Environment I used the following SQL (pixelmania_db_3.sql) , think the way should be obvious there.

    I testet the SQL Statements who produces the database errors above in my Local Dev. Environment and Webhosting Environment, strangely there were the same SQL errors left in PHPMyAdmin. There isn’t a ‘id’ column in the ‘exp_member_fields’ left, in my Local Dev. Environment and Webhosting Environment as well, but on local the Website works without any errors… And I’m absolutely sure, that they are use both the same SQL Dump or database content.

    Thanks for stay tuned and feel free for any further advices
    Christoph

  • #6 / Aug 22, 2011 4:00pm

    Sue Crocker

    26054 posts

    Hi, Christoph.

    Let’s see what kind of custom fields you have set up for your members. There isn’t an id field in exp_member_fields - so can we have you double check what is in both databases in that table?
    It also wouldn’t hurt to upgrade to 2.2.2. Is that an option for you?

  • #7 / Aug 23, 2011 9:19am

    chrigu

    21 posts

    Ok, I did the upgrade to the latest build 2.2.2, there were no obvious changes so far.

    I ran the following SQL state

    SELECT * FROM  `exp_member_fields` LIMIT 0 , 30

    in both databases and there were no results (they are blank).

    I can’t understand why the live site produce following error with SQL state and the env. site obvious not:

    Error Number: 1054
    
    Unknown column 'id' in 'field list'
    
    SELECT `id`, `url`, `m_field_id`, `m_field_name`, `m_field_fmt` FROM (`exp_member_fields`)
    
    Filename: modules/channel/mod.channel.php
    
    Line Number: 1005
  • #8 / Aug 24, 2011 3:42pm

    chrigu

    21 posts

    Hmm, any further ideas?

  • #9 / Aug 25, 2011 7:05pm

    Dan Decker

    7338 posts

    chrigu,

    Sorry for the delay in responding to you, but I’ve been a bit perplexed over this. Did you make *any* changes to the SQL file before you tried to move it to your server? On your server, what type of MySQL management software are you using, PHPMyAdmin, or something else?

    Cheers,

  • #10 / Aug 26, 2011 8:00am

    chrigu

    21 posts

    Hi Dan,

    I use PHPMyAdmin on both enviroment (Live Site: phpMyAdmin - 2.8.2.4 and Local Site: phpMyAdmin - 3.2.5). I exported and reimported the SQL database a few times now and compared the tables “exp_member_fields”, there isn’t a column ‘id’ and ‘url’ which is as Sue said correct.

    In my opinion the problem is, that EE generates the following SQL Statement with not existing columns, which produces errors above:

    SELECT `id`, `url`, `m_field_id`, `m_field_name`, `m_field_fmt` FROM (`exp_member_fields`)

    Could it be, that the following code in modules/channel/mod.channel.php file produce this SQL Statement?

    $this->EE->db->select('m_field_id, m_field_name, m_field_fmt');
    $query = $this->EE->db->get('member_fields');

    But from where does this unknow columns “id” and “url” come from? A thing I can’t comprehend and where I need help.

    Greets

  • #11 / Aug 28, 2011 5:53pm

    Dan Decker

    7338 posts

    chrigu,

    I’m sorry this is still an issue for you, but we are going to stick with it until we get to the bottom of it. Can you tell us where you are seeing this error produced? What actions are you doing before this error comes up? Is this the *only* error you see, or are there other errors associated with it?

    Thank you for your patience.

    Cheers,

  • #12 / Aug 29, 2011 4:39am

    chrigu

    21 posts

    Hi Dan,

    I tested the EE site successfully on my MAMP dev. enviroment and moved to the live site by following the instructions manual ‘Moving ExpressionEngine to Another Server’.

    After I set the Error Reporting on the index.php to

    $debug = 1;

    , i get these Errors you can see on the live site:

    http://clients.pixelmania.ch/ or
    http://clients.pixelmania.ch/admin.php

    I send you the FTP Login access by PM, if it helps.

    Edit: Your PM Box seems to be full.

    Greets

  • #13 / Aug 29, 2011 6:07pm

    Dan Decker

    7338 posts

    chrigu,

    As a Customer Advocate, we have or PMs disabled to protect against unsecured communications. For instance, sending me login details via PM would pose a security risk for your site. However, you are correct in that we are to the point that we would like to go in and take a look at what’s happening. Please be on the look out for an email from me 😊

    Cheers,

  • #14 / Aug 30, 2011 7:28am

    chrigu

    21 posts

    There are some progresses to isolate the problem. I moved temporarily the EE site from the MAMP enviroment to another live hosting exactly the same way, where it works without problems.

    Temporary Webhosting Enviroment:
    Apache/2.2.14 (FreeBSD) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 mod_hcgi/0.7.1 mod_webkit2/0.9.3 PHP/5.2.12 with Suhosin-Patch
    MySQL-Client-Version: 5.1.52
    MySQL-Server-Version: 5.1.51

    I don’t know if there are major differents between MySQL Server Version 5.0.51a and 5.1.51, but it could also a detail of the webhosting configurations (caching etc., no idea). Any inputs for advising my webhosting partner could be helpful.

    Greets

  • #15 / Aug 30, 2011 8:17pm

    Dan Decker

    7338 posts

    chrigu,

    I’m not really capable of offering advise to give to your hosting provider. Did you receive the email I sent?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases