Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: Database Error - Unknown column???  (Read 5854 times)

0 Members and 1 Guest are viewing this topic.

Happiness

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
[Solved]: Database Error - Unknown column???
« on: January 12, 2010, 03:46:19 am »

Ok.. I believe that I have followed the rules here.. if not just let me know so I can add what is needed to fix this issue...

Gallery Link: www.supernaturalfansonline.com/gallery

Issue
About two months ago we moved servers... after moving to the new server our gallery just stopped working... the person I had for a TECHIE has kind of went MIA so I am really not sure just what has been done during the last two months... (lets just say.... NOTHING at this point)...  At this point we can LOGIN.. but we can't upload or view any of the images or albums in our gallery other then thumbails on the "Random" or "Latest" uploads...

When you click on ANY of the images it pops up with this error message..

Quote
While executing query "SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, votes, pic_rating, title, caption,hits,owner_id,owner_name from cpg_pictures WHERE ((aid='169'  ) ) AND approved='YES'  ORDER BY filename ASC  LIMIT 0 ,28" on 0

mySQL error: Unknown column 'owner_name' in 'field list'


Not sure if a screen shot is needed.. if so let me know..
« Last Edit: January 16, 2010, 11:06:12 pm by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Database Error - Unknown column???
« Reply #1 on: January 12, 2010, 08:15:08 am »

Then you have an issue with the move from one server to the other: it seems like that move was not done properly. The error message looks familiar, see http://forum.coppermine-gallery.net/index.php/topic,62943.0.html
Seems like this error message shows up if you upgrade improperly to cpg1.5.x

You'll need a tool like phpMyAdmin to correct the issue, so as a first step you should get that tool (your webhost might provide it for you; alternatively there is a free download from http://phpmyadmin.net/) and get it up and running (if you don't already have it). Make sure to secure it so only you can access it.
Logged

psylocke

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Database Error - Unknown column???
« Reply #2 on: January 14, 2010, 12:35:14 am »

Yes, our server has that, but the gallery was broken even after the move. How can I add this missing field?

Quote
While executing query "INSERT INTO cpg_pictures (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('303', 'promotional_pics/test/', 'supernatural-lucifer.jpg', '35553', '60622', '445', '295', '1263425171', '1', 'admin','', '', '', 'YES', '', '', '', '', '', '', '0')" on 0

mySQL error: Unknown column 'owner_name' in 'field list'
Logged

psylocke

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Database Error - Unknown column???
« Reply #3 on: January 14, 2010, 12:39:11 am »

Not sure how to edit my post, but I forgot to mention that we don't have a previous backup before the move, the gallery for some reason stopped working even before the move, so I tried to upgrade and it didn't work, so I tried the "downgrade", even restoring the old backup nothing seems to work, the database was really messed up already, is there any sql query to add this column, or do I need to re-do the gallery??
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Database Error - Unknown column???
« Reply #4 on: January 14, 2010, 05:55:41 pm »

Did you (at some stage) install cpg1.5.x?
Logged

psylocke

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Database Error - Unknown column???
« Reply #5 on: January 14, 2010, 06:12:13 pm »

Yes, I did a 1.5 install, but it had an issue to create albums, and I tried to restore a backup, but no lucky, and then I tried to "downgrade". But even before i did the install of 1.5, the db was all messed up...
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Database Error - Unknown column???
« Reply #6 on: January 14, 2010, 06:52:49 pm »

You can't downgrade a genuine cpg1.5.x install to cpg1.4.x, as suggested in
Downgrading from cpg1.5.x to an older version

CPG1.5.x incorporates many new features (compared to older versions), so we encourage all users to upgrade. However, there may be some who want to test cpg1.5.x and decide later that they want to go back to an older version. You have to keep in mind that a full upgrade changes the overall layout of coppermine's database that includes converting the encoding to unicode. This process can't be reverted: once you have done the conversion, the only way back is to restore a complete mySQL database dump (of course you have to create this backup before you upgraded in the first place). Creating mySQL dumps (backups) is recommended anyway, so you should do so now.

To make this absolutely clear: you can only downgrade if you used to have cpg1.4.x before and upgraded this version to cpg1.5.x. If you have made a fresh install of cpg1.5.x, you can not downgrade at all!

To actually perform the downgrade, replace all cpg1.5.x files on your server with the files from the older version (as if you were doing an upgrade, see above). Then restore your database dump that you must have made before upgrading. If you don't have a database dump (backup), you can't go back!

Uninstall cpg1.5.x completely, i.e. drop that. Then get your backup from cpg1.4.x restored both on file and database level. I have no other recommendation.
Logged

psylocke

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Database Error - Unknown column???
« Reply #7 on: January 14, 2010, 07:01:12 pm »

But if I re-install the 1.5 version, will it work too?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Database Error - Unknown column???
« Reply #8 on: January 14, 2010, 07:19:51 pm »

Maybe. Who knows? Try it for yourself, as cpg1.5.x goes unsupported (as in "no support at all").
Logged

psylocke

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Database Error - Unknown column???
« Reply #9 on: January 14, 2010, 09:06:08 pm »

It worked so far! Thank you
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Database Error - Unknown column???
« Reply #10 on: January 15, 2010, 09:01:24 am »

OK, fine. What about the thread starter "Happiness"? Are you related in any way? Are yours separate issues? Please clarify and properly resolve your thread!
Logged

psylocke

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Database Error - Unknown column???
« Reply #11 on: January 15, 2010, 03:47:22 pm »

I am the Techie person that she mentioned, we are admins on the site.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Database Error - Unknown column???
« Reply #12 on: January 16, 2010, 11:05:53 pm »

Thanks for resolving. Marking as "solved" then, although we would have appreciated it if the original thread starter would have done that as per Board rules -> Resolve your threads
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.