coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: tkouk on September 17, 2004, 06:55:47 PM

Title: Error occured when I tried to upload a pic.
Post by: tkouk on September 17, 2004, 06:55:47 PM
It was not  the first time I uploaded a pic, obviously, but this happened now without any obvious reason....

I get this common message: There was an error while processing a database query. in every page that connect to the db
and in debug mode I get that the error is in tjis query:

While executing query "SELECT count(*) FROM cpg130_pictures WHERE approved = 'NO'" on 0

mySQL error: Can't open file: 'cpg130_pictures.MYI'. (errno: 145)


or

While executing query "SELECT count(*) FROM cpg130_pictures, cpg130_albums WHERE cpg130_pictures.aid = cpg130_albums.aid AND category = 2" on 0

mySQL error: Can't open file: 'cpg130_pictures.MYI'. (errno: 145)


I obviously need info about the file 'cpg130_pictures.MYI'

Any help aprecciated ;)
Title: Re: Error occured when I tried to upload a pic.
Post by: yoshikiwei on September 17, 2004, 08:21:36 PM
sounds like you got a corrupted table

do you have access to MySQL commands ? if yes, try the following to repair your table

login to MySQL
mysql -u yourdbusername -h yourhostname yourdbname --password=yourdbpassword

use the repair command
repair table cpg130_pictures;

or try this from shell if the above doesn't work
myisamchk -r cpg130_pictures

if all failed, you might have to restore the table from a backup copy, provided you do have one  ;)
Title: Re: Error occured when I tried to upload a pic.
Post by: tkouk on September 17, 2004, 08:47:07 PM
Thanx a lot my friend!
REPAIRing the table worked just fine! ;D

Regards from Greece!