Today I tried uploading some picture to my Gallery 2 and got error, I have tried several things and still have the problem. I really hope one of you can help me.
Error message
Quote:
Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1007 (GalleryCoreApi::error)
in modules/core/classes/GalleryStorage.class at line 521 (GalleryStorageExtras::addMapEntry)
in modules/core/classes/GalleryCoreApi.class at line 2955 (GalleryStorage::addMapEntry)
in modules/core/classes/GalleryEntity.class at line 271 (GalleryCoreApi::addMapEntry)
in modules/core/classes/GalleryItem.class at line 414 (GalleryEntity::save)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 183 (GalleryItem::save)
in modules/core/classes/GalleryCoreApi.class at line 1668 (GalleryItemHelper_medium::addItemToAlbum)
in modules/core/ItemAddFromBrowser.inc at line 99 (GalleryCoreApi::addItemToAlbum)
in modules/core/ItemAdd.inc at line 159 (ItemAddFromBrowser::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules/core/classes/GalleryTemplateAdapter.class at line 1092
in /home/snow07/g2data-old/smarty/templates_c/%%4026596137/snow/%%77^773^7731C556%%theme.tpl.php at line 69 (GalleryTemplateAdapter::trailer)
in lib/smarty/Smarty.class.php at line 1255
in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88
I have researched the error on the FAQs and forum and tried a few things but they didn't solve the problem.
- I checked folder permissions, and the g2data folder is correctly set to 777
- I checked g2_SequenceId table and the value is ok
- I turned on debug mode and this seems to be the error it gave me.
Quote:
Query: SELECT g_itemId FROM g2_ImageBlockDisabledMap WHERE g_itemId=29454 failed. Table 'REDACTED.g2_ImageBlockDisabledMap' doesn't exist
1146: Table 'REDACTED.g2_ImageBlockDisabledMap' doesn't exist
I am not sure this is all you need. I can post the entire thing here if will help.
I tried to repair this table, but it's can't be repaired, and actually there is no data in it.
Here is my systems details.
Quote:
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.5 apache2handler
Webserver = Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5
Database = mysqli 5.0.95-community-log, lock.system=flock
Toolkits = Exif, Getid3, LinkItemToolkit, Thumbnail, SquareThumb, ArchiveUpload, ImageMagick, NetPBM, Gd
Acceleration = none, none
Operating system = Linux snowbrasil.fbyneserv.com 2.6.32-042stab057.1 #1 SMP Fri Jun 22 02:17:07 MSD 2012 x86_64
Default theme = snow
gettext = enabled
Locale = pt_BR
Browser = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Rows in GalleryAccessMap table = 17
Rows in GalleryAccessSubscriberMap table = 2149
Rows in GalleryUser table = 3
Rows in GalleryItem table = 2137
Rows in GalleryAlbumItem table = 90
Rows in GalleryCacheMap table = 0
I hope you can point me in the right direction to fix this.
Thanks so much
Posts: 8339
See if you can empty or repair the g2_ImageBlockDisabledMap table in phpMyAdmin or similar tool
you could also uninstall/re-install the imageblock module
-s
Posts: 103
Ok, so at first I tried to uninstall the Image Block plugin and got an error.
But after I turned on buffered debug, it went through. So I tried uploading a picture again with debug on, and for the same ERROR_STORAGE_FAILURE...
In the debug output, these seems to be the last nines related to the error. I am assuming I don't need to post the entire debug output.
Anything else I can try? Thanks much
Posts: 8339
can you view and delete this item?
yoursite.com/gallery2/main.php?g2_itemId=29938
-s
Posts: 103
Item not found, but I see the line on the AccessSubscriberMap tablet.
I tried some other g2_itemID, and the latest one that works is the 29930.
In other words, all items added after, from 29935 to 29950 are missing. I am pretty sure these refer to all the tries yesterday to upload pictures without success. Although in the g2data folder I see a couple of the pictures that I tried to upload.
Should I manually delete them from the tables? Any other table I would need to work on besides AccessSubscriberMap?
Thanks
Posts: 8339
I have a script that will remove those http://www.flashyourweb.com/filemgmt/index.php?id=45
-s
Posts: 103
Thanks so much for the script. But it didn't find any errors, what was actually odd.
I was taking a look on admin event logs and found out there have been several Storage errors even on dates I didn't try to upload or change anything. The last time I uploaded something was on July 17th, and then I tried again 2 days ago when I got errors uploading files.
I also see some collision errors, not sure what they mean
Not sure what else to do. I don't have a recent backup.
My VPN has recently moved me to a new server, and it was on the next day that I had some issues with mysql, and they said they identified a corrupted table g2_SessionMap.
Thanks
Posts: 103
Important update. I tried uploading an item in a different album and had no issues. It seems the errors are when I tried to upload to one specific album. So I am hoping there is a way I can manually fix this in the database.
Posts: 8339
Move all the viewable items out of that album -> delete the album -> re-create album -> move items back
-s
Posts: 1
Suprsidr - I had the same situation and used your script to remove the tables. Worked like a charm. Thanks for you help and your comments on the forum. - Dave
Posts: 103
Super odd, I was trying to add images to another album, or create a brand new album, or add images to the problematic album and always getting those storage errors (duplicate entry on debug). But I kept trying to do the same things, adding images, creating album, etc...and eventually it started working (except that it didn't create a thumbnail)
Then I tried to delete a test folder I had just created and got the error
From debug
So first I was getting errors for duplicate entry, then after successfully adding stuff, I get error for non existant entry.
Is the DB doomed?
I don't have a recent backup and would very much like to fix it.
Thanks so much
Posts: 8339
try uninstalling the hidden items module
-s
All New jQuery Minislideshow for G2/G3
Posts: 103
Great news! I deactivated the hidden items module and was able to upload new pictures and create new albums. I even moved a newly uploaded picture to another album. No errors!!!
My concern is now if I continue using this DB and it will keep getting bigger, would I run into bigger issues? What could I do to prevent them?
- Is it still a good idea to move all photos from the problematic album to a new album? I couldn't figure out how to move all photos in one album, only to move one at a time.
- I tried backing up the database using the maintenance options, and still got storage error and it pointed to the hidden map module:
- I tried to completely uninstall the item hidden module, and to delete it, and got storage errors. The debut output didn't really say what the error was.
Any ideas what else I could try?
Thanks so much for helping
Posts: 8339
recreate the table in your DB tool
-s
All New jQuery Minislideshow for G2/G3
Posts: 103
It says the table already exists. But when I look in PHPMyAdmin under Structure it doesn't show up. Once I switch to Search, it's listed as one of the options, but when I do a wildcard search it find the table but no matches in it.
Seems like the ItemHiddenMap is indeed hidden
Do I need to maybe delete it and recreate?
Posts: 8339
yes that table probably crashed. You may be able to repair it.
-s
All New jQuery Minislideshow for G2/G3
Posts: 103
If I try to repair it I get that ir doesn't exist
But if I try to create it I get that it already exists
But I think that even if it found the table it wouldn't be able to repair it. Because when I try to run a repair in the entire database it fails for every table:
Except these 3:
g2_SequenceEventLog , g2_SequenceId ,g2_SequenceLock and g2_SessionMap
Any other ideas?
Thanks
Posts: 8339
so you executed the following SQL:
REPAIR TABLE `g2_ItemHiddenMap`
and it failed?
-s
All New jQuery Minislideshow for G2/G3
Posts: 103
Yes
Thanks
Posts: 103
Any suggestions?
Couldn't it also be a problem the fact the engine used is InnoDB? My hosting tells me that InnoDB engine doesn't support repairing DBs.
Thanks
Posts: 8339
export your entire db to simple sql document
open your exported sql document in a text editor
remove the mangled g2_ItemHiddenMap table
empty your db or you may have to delete it and re-create it if you still cannot remove this table
import edited sql
create g2_ItemHiddenMap table w/ snippet from above (as gallery is going to expect it)
-s
All New jQuery Minislideshow for G2/G3
Posts: 103
So, the guys at my VPS support moved the .frm file for the ItemHiddenMap table outside the folder of the database and then I was able to recreate it.
So now I was just able to upload several pictures. I was also able to run a full backup through the admin interface.
I couldn't do a full repair through phpmyadmin or webhostmanager, apparently because InnoDB engine doesn't allow it. Can this be a problem in the future?
Do you still recommend I move all pictures from the formely problematic album to a new album? Couldn't you please let me know how to do that?
Thanks for all the help, I am immensely grateful.
Thanks
Posts: 8339
I'm glad that worked, but you should not play w/ those files.
One issue I've run into is that InnoDB files can grow large and there is no way to truncate them without deleting and recreating tables.
My old server the /var partition ran out of space because of this.
Now would be a good time to remove any modules you are not using.
Like if you are not hiding items, remove the hiddenItems module.
Also if you don't use exif remove it, getId3 has absolutely no use whatsoever...
Then make a backup of your DB
Only if it is still erroring
-s
All New jQuery Minislideshow for G2/G3
Posts: 103
Thank for all the help, very much appreciated. I hope this post helps others in the future.