[Solved]: Database Error - Unknown column??? [Solved]: Database Error - Unknown column???
 

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]

Main Menu

[Solved]: Database Error - Unknown column???

Started by Happiness, January 12, 2010, 03:46:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Happiness

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..

QuoteWhile 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..

Joachim Müller

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.

psylocke

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

QuoteWhile 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'

psylocke

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??

Joachim Müller

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

psylocke

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...

Joachim Müller

You can't downgrade a genuine cpg1.5.x install to cpg1.4.x, as suggested in
Quote from: http://documentation.coppermine-gallery.net/en/upgrading.htm#downgradingDowngrading 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.

psylocke

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

Joachim Müller

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

psylocke


Joachim Müller

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!

psylocke

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

Joachim Müller

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