(Resolved) Image upload functions stop working...

svx94

Joined: 2005-07-25
Posts: 4
Posted: Mon, 2005-07-25 17:50

I am building up my albums and the image upload functions suddenly stop working. The error started when I created a new album and add new photos to it. I did "Add Item" "From Web Browser", the following error shows up:

Error (ERROR_BAD_PATH)
in modules/core/classes/GalleryDataItem.class at line 130 (GalleryUnknownItem::error)
in modules/core/classes/GalleryUnknownItem.class at line 77 (GalleryUnknownItem::create)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 203 (GalleryUnknownItem::create)
in modules/core/classes/GalleryCoreApi.class at line 1486 (ItemAddFromBrowser::addItemToAlbum)
in modules/core/ItemAddFromBrowser.inc at line 89 (ItemAddFromBrowser::addItemToAlbum)
in modules/core/ItemAdd.inc at line 94 (ItemAddFromBrowser::handleRequest)
in main.php at line 173 (ItemAddController::handleRequest)
in main.php at line 87
in main.php at line 78

System Information
Gallery version 2.0-beta-4
PHP version 5.0.4 apache2handler
Webserver Apache/2.0.54 (Fedora)
Database mysql 4.1.11
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux poudy 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Sgrunt|V109|3060|S1556127214|dial; snprtz|T04063268303199; .NET CLR 1.1.4322)

----

Gallery URL (optional): [url]www.hukai.net/gallery/[/url]
Gallery version:
Webserver (with version):
Datatabase (with version):
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
G1 version (for migration bugs):

 
svx94

Joined: 2005-07-25
Posts: 4
Posted: Mon, 2005-07-25 18:11

Additional information to this issue: The problem seems to related to JPG files. I can upload GIF files just fine.

Also, I remember this problem happens to SOME jpg first, and then, after I tried to upload 10+ photos in "Upload Applet", jpg file stop working.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-25 18:33

this is all very vague, impossible to say what's wrong.

you could start by activating buffered debug mode and then do the same thing that should give you an error. then we'll have much more debug information. (and no, we're not interested in the smarty debug information).

see:
http://codex.gallery2.org/index.php/Gallery2:faq#What_information_is_required_when_I_ask_for_help_in_the_forums.3F

 
svx94

Joined: 2005-07-25
Posts: 4
Posted: Tue, 2005-07-26 13:57

My friend fixed it:

ITguru#1: /**
* Call 'identify' to determine the image colorspace
*/
function _getColorspace($filename) {

ITguru#1: that's where the problem is
ITguru#1: CMYK

SillyMe:let me double check on that now
ITguru#1: Executing: ( "/usr/bin/identify" "-format" "%r" "/var/www/html/www.hukai.net/gallery/g2data/albums/Alaska Cruise/Honeymoon0088.jpg" ) 2>/var/www/html/www.hukai.net/gallery/g2data/tmp/g2dbgGJRgRM file_exists(/var/www/html/www.hukai.net/gallery/g2data/tmp/g2dbgGJRgRM) filesize(/var/www/html/www.hukai.net/gallery/g2data/tmp/g2dbgGJRgRM) unlink(/var/www/html/www.hukai.net/gallery/g2data/tmp/g2dbgGJRgRM) Regular Output: Error Output: Status: 139
ITguru#1: that's the error
ITguru#1: running that /usr/bin/identify

ITguru#1: this is the code I commented out
ITguru#1: modules/imagemagick/classes/ImageMagick.class
ITguru#1: if (!$success || empty($output)) {
#return array(GalleryStatus::error(ERROR_TOOLKIT_FAILURE, __FILE__, __LINE__), null);
}

ITguru#1: (commented out that return)
ITguru#1: when debugging
ITguru#1: I found that both conditions were true
ITguru#1: echo 'success: ' . !$success . '<br>';
echo 'output: ' . empty($output) . '<br>';

ITguru#1: outputs
ITguru#1: success: 1
output: 1

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-07-26 14:11

svx94, ok, this didn't help. do you use GD?

please give us some system information, phpinfo, ..

http://codex.gallery2.org/index.php/Gallery2:faq#What_information_is_required_when_I_ask_for_help_in_the_forums.3F

 
svx94

Joined: 2005-07-25
Posts: 4
Posted: Tue, 2005-07-26 15:27

valiant,

Thank you very much for looking into this!

Please see above post. My friend helped me fixed it.

Thanks again!
G2 is great !

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-07-26 15:32

without any information, e.g. activate toolkits, version of imagemagick etc. this isn't very useful. but good that you sorted it out (even with a very dirty fix :) ).

 
komacke

Joined: 2005-08-16
Posts: 5
Posted: Tue, 2005-08-16 04:42

I'm having the same problem and the "fix" mentioned above caused the upload to work.

Here's the info requested for debugging:
Gallery version = 2.0-rc-1 core 0.9.34
PHP version = 5.0.4 apache2handler
Webserver = Apache/2.0.54 (Fedora)
Database = mysql 4.1.12
Toolkits = Exif, ImageMagick, NetPBM
Operating system = Linux sydney.komacke.com 2.6.12.3 #1 Thu Jul 28 13:07:27 PDT 2005 i686
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1)

www.koberstein.net/gallery

http://www.koberstein.net/gallery/phpinfo.php

problem described above is the same for me.

I have looked through the debug output and see an error 139 from identify.

I can provide the whole output if you like.

Thanks,

davek

UPDATE: It is a security block by selinux. I did this:
chcon -R -t httpd_sys_content_t /var/www/g2data
chcon -R -t httpd_sys_content_t /tmp
and problem was resolved. Note that even after I did the edit noted above, I was still having troubles with thumbnails. Those issues are resolved, too.

Shouldn't gallery use /var/www/g2data/tmp rather than /tmp?

OK ANOTHER UPDATE
With the context changed for /tmp, mambo runs into certain strange errors? Could I request that Gallery use ./g2data/tmp rather than /tmp? I think that will close the selinux issue. I really don't want to turn selinux off.

 
knproductions

Joined: 2010-11-08
Posts: 2
Posted: Fri, 2010-11-12 02:32

I'm having a similar issue after my host changed servers. I made the initial error of doing an install using dataglob as part of the root install folder. I've managed to remove the old dataglob information, but I still get an error when trying to add images.

Error Detail -
Error (ERROR_PLATFORM_FAILURE)

* in modules/core/classes/GalleryDataItem.class at line 173 (GalleryCoreApi::error)
* in modules/core/classes/GalleryUnknownItem.class at line 56 (GalleryDataItem::create)
* in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 148 (GalleryUnknownItem::create)
* in modules/core/classes/GalleryCoreApi.class at line 1583 (GalleryItemHelper_medium::addItemToAlbum)
* in modules/itemadd/ItemAddFromServer.inc at line 185 (GalleryCoreApi::addItemToAlbum)
* in modules/itemadd/ItemAddFromServer.inc at line 113 (ItemAddFromServer::addItem)
* in modules/core/ItemAdd.inc at line 84 (ItemAddFromServer::handleRequest)
* in main.php at line 231 (ItemAddController::handleRequest)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.5
PHP version 5.2.14 cgi-fcgi
Webserver Apache
Database mysqli 5.1.39-log
Toolkits ImageMagick, Thumbnail, NetPBM, Gd
Operating system Linux taurus 2.6.32.8-grsec-2.1.14-modsign-xeon-64 #2 SMP Sat Mar 13 00:42:43 PST 2010 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12

Thanks in advance for the help.