Author Topic: Error messages when transferring to a new host...  (Read 2931 times)

0 Members and 1 Guest are viewing this topic.

Offline Sleepy

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Error messages when transferring to a new host...
« on: June 07, 2007, 09:17:16 AM »
Hello,

Here are my steps to transfer my gallery to a new host:
1. copy all the files under 4image to the new space
2. use "Download a MySQL Database Backup" in "Backups  in Cpanel" and restore the backup file to the new site
3. add the datebase user name and add it to the database restored in step 2 (the username is different the one in the old host, but I've modified it in config.php)
4. Then, I saw the following error message in the frontpage:

An unexpected error occured. Please try again later.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sleepy7/public_html/album/includes/db_mysql.php on line 116


After I logged in, the error message became:

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 16, 2, 1, 11, 3, 17, 5, 9, 7, 8, 18, 6, 10, 19, 12, 13, 14, 4, 15) ORDER BY RAND() LIMIT 4
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sleepy7/public_html/album/includes/db_mysql.php on line 116



Except for the frontpage, other pages worked fine without any problem.

Does anyone know what happened to my gallery??? The mod I used in the frontpage is only "add more random images".

Here's the correct album: http://album.sleepy.tw/
Here's the new one with problem: http://garm.lunarservers.com/~sleepy7/album/


Thank you very much...

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Error messages when transferring to a new host...
« Reply #1 on: June 07, 2007, 10:04:31 AM »
Hi,

Quote
Unknown column 'i.user_id' in 'on clause'
MySQL 5.0.x  Problem, i think

Look here about your problem:
http://www.4homepages.de/forum/index.php?topic=10184.15


cu
Kurt

Offline Sleepy

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Error messages when transferring to a new host...
« Reply #2 on: June 07, 2007, 07:29:37 PM »
Thanks, KurtW.
It worked...^_^
It's indeed the problem of MySQL 5.0.x.

However, there's only one file, index.php, I needed to add " (   ) ". Other files already had it.
Anyways, my problem solved.

Thank you very much.

Offline chyler

  • Pre-Newbie
  • Posts: 4
    • View Profile
    • www.chyler-leigh.net
Re: Error messages when transferring to a new host...
« Reply #3 on: July 08, 2007, 10:16:46 AM »
Thanks for this- gonna be moving hosts this week myself.

So the full procedure is:

-copy over all the files;
-restore the db's from the old to the new host;
-edit the config file as necessary;

Anything else, or should that do it?