Error uploading pictures

iliko

Joined: 2012-10-17
Posts: 8
Posted: Wed, 2013-04-03 18:37

My Gallery 2 was working for many years and all of a sudden I started to get below error:

Error (ERROR_PLATFORM_FAILURE)
in modules/core/classes/GalleryDataItem.class at line 178 (GalleryCoreApi::error)
in modules/core/classes/GalleryPhotoItem.class at line 104 (GalleryDataItem::create)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 148 (GalleryPhotoItem::create)
in modules/core/classes/GalleryCoreApi.class at line 1668 (GalleryItemHelper_medium::addItemToAlbum)
in modules/itemadd/ItemAddFromServer.inc at line 313 (GalleryCoreApi::addItemToAlbum)
in modules/itemadd/ItemAddFromServer.inc at line 190 (ItemAddFromServer::addItem)
in modules/core/ItemAdd.inc at line 159 (ItemAddFromServer::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules/core/classes/GalleryTemplateAdapter.class at line 1089
in g2data/smarty/templates_c/%%3866944701/carbon/%%2E^2E1^2E11E2E2%%theme.tpl.php at line 141 (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 suspect what I did wrong was uploading my pictures into a folder inside /g2data/albums and trying to Add items from within that folder but meantime I have had a warning from my hostmonster about huge number of G2 cache which I cleared immediately. I removed uploaded folder now out of g2data but this did not resolve it. I checked FAQ: I get a ERROR_PLATFORM_FAILURE, what should I do? and my phpinfo is at jamalli.biz/gallery2/lib/support/phpinfo.php

Here is my debug http://pastebin.com/Zbs7hvLU

Can you please help?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-04-03 19:19

the most common issue is filesystem permissions on the storage directory
FAQ: How can I fix the filesystem permissions of the Gallery storage folder?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
iliko

Joined: 2012-10-17
Posts: 8
Posted: Wed, 2013-04-03 21:20

Thanks suprsidr, it all set to CHMOD 777. Any other suggestions please?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-04-03 21:42

it needs to be recursive chmod -R 0777 /path/to/g2data/

Quote:
Error (ERROR_PLATFORM_FAILURE)
in modules/core/classes/GalleryDataItem.class at line 178 (GalleryCoreApi::error)

this is where gallery is copying the tmp file to the album in g2data and it is failing - that would be a direct indication of filesystem permission problems.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
iliko

Joined: 2012-10-17
Posts: 8
Posted: Thu, 2013-04-04 08:08

It was working for years and nobody changed the permissions. Anyway I applied recursive chmod last night and it was doing it for quite a long time (via filezilla) but no joy with the same error.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-04-04 11:38
Quote:
Anyway I applied recursive chmod last night and it was doing it for quite a long time (via filezilla) but no joy with the same error.

You cannot use filezilla, it does not report errors when it cannot complete a request - so the permissions remain unchanged.

I have a handy little script if you don't have shell access.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
iliko

Joined: 2012-10-17
Posts: 8
Posted: Thu, 2013-04-04 12:05

Thanks for this. Well FileZilla shows the result in the small window and it looks like all the folders have got 777 at the moment.
Looks like my hoster is aware of the script and returned following error:

"500 Server Error

A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again.
URL: http://www.jamalli.biz/.../.../shellExec.php
Dangerously writable: [/home1/mursalov/public_html/.../.../shellExec.php]
FIXED"

I will get Shell access and try chmod-ding properly and let you know.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-04-04 12:07
Quote:
Dangerously writable: [/home1/mursalov/public_html/.../.../shellExec.php]

when you upload shellExec.php it does nod need to be writable its permissions should be 644

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
iliko

Joined: 2012-10-17
Posts: 8
Posted: Thu, 2013-04-04 12:28

Thanks again. Got it working now:

Status: Command \"chmod -R 0777 /home1/public_html/.../gallery2/g2data\" successfully executed.

but no joy again:

Error (ERROR_PLATFORM_FAILURE)
in modules/core/classes/GalleryDataItem.class at line 178 (GalleryCoreApi::error)
in modules/core/classes/GalleryPhotoItem.class at line 104 (GalleryDataItem::create)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 148 (GalleryPhotoItem::create)
in modules/core/classes/GalleryCoreApi.class at line 1668 (GalleryItemHelper_medium::addItemToAlbum)
in modules/itemadd/ItemAddFromServer.inc at line 313 (GalleryCoreApi::addItemToAlbum)
in modules/itemadd/ItemAddFromServer.inc at line 190 (ItemAddFromServer::addItem)
in modules/core/ItemAdd.inc at line 159 (ItemAddFromServer::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules/core/classes/GalleryTemplateAdapter.class at line 1089
in g2data/smarty/templates_c/%%3866944701/carbon/%%2E^2E1^2E11E2E2%%theme.tpl.php at line 141 (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

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-04-04 12:35
suprsidr wrote:
Error (ERROR_PLATFORM_FAILURE)
in modules/core/classes/GalleryDataItem.class at line 178 (GalleryCoreApi::error)
this is where gallery is copying the tmp file to the album in g2data and it is failing - that would be a direct indication of filesystem permission problems.

you'll have to ask your host or if you have access to your server's error_log you can look there for clues

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
iliko

Joined: 2012-10-17
Posts: 8
Posted: Thu, 2013-04-04 14:38

Here is my error_log
[03-Apr-2013 13:45:35] PHP Notice: Undefined index: powered_by in /public_html/jamalli-biz/wp-content/plugins/wp-followme/followme.php on line 149
[03-Apr-2013 17:24:04] PHP Warning: stripos() [<a href='function.stripos'>function.stripos</a>]: needle is not a string or an integer in /public_html/jamalli-biz/wp-includes/functions.php on line 658
[04-Apr-2013 08:22:09] PHP Warning: stripos() [<a href='function.stripos'>function.stripos</a>]: needle is not a string or an integer in /public_html/jamalli-biz/wp-includes/functions.php on line 658
[04-Apr-2013 08:29:20] PHP Warning: stripos() [<a href='function.stripos'>function.stripos</a>]: needle is not a string or an integer in /public_html/jamalli-biz/wp-includes/functions.php on line 658
[04-Apr-2013 10:25:11] PHP Warning: stripos() [<a href='function.stripos'>function.stripos</a>]: needle is not a string or an integer in /public_html/jamalli-biz/wp-includes/functions.php on line 658

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-04-04 14:57

You felt you needed to show me WordPress errors?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
iliko

Joined: 2012-10-17
Posts: 8
Posted: Thu, 2013-04-04 15:14

Sorry for this :-(

This is the error_log gtom gallery2 folder:

[04-Apr-2013 09:10:41] PHP Warning: copy(/home/mursalov/public_html/jamalli-biz/gallery2/g2data/albums/Paris_2013/20130330_061253.jpg) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in /home1/mursalov/public_html/jamalli-biz/gallery2/modules/core/classes/GalleryPlatform.class on line 65

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-04-04 15:31

ask your host

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
iliko

Joined: 2012-10-17
Posts: 8
Posted: Thu, 2013-04-04 15:31

Wow, worked. Apparently it was trying to pick up pictures from old local path which did not exist anymore.
Thanks a lot for your help suprsidr!