error 500 on image upload

michaelknauf

Joined: 2009-05-01
Posts: 1
Posted: Fri, 2009-05-01 19:08

http://frenchwoods.com/gallery3/

just downloaded and installed gallery everything seems fine, but I can't upload anything... I get an error 500 message from the upload box.

permissions seem ok, database seems ok, everything but uploading images seems to work... what should I kick?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-05-03 23:39

Check var/logs .. anything useful in the log files there? How about your Apache error logs?

 
jstricker

Joined: 2009-05-07
Posts: 8
Posted: Thu, 2009-05-07 04:11

I was running into this problem myself and I noticed this in the var/logs/{date}.log.php:

2009-05-06 22:35:16 -04:00 --- error: Uncaught PHP Error: Undefined index: extension in file core/controllers/simple_uploader.php on line 52

From simple_uploader.php:


48      $temp_filename = upload::save("Filedata");
49      try {
50        $title = substr(basename($temp_filename), 10);  // Skip unique identifier Kohana adds
51        $path_info = pathinfo($temp_filename);
52        if (in_array(strtolower($path_info["extension"]), array("flv", "mp4"))) {

It looks like the path_info associative array doesn't have an entry for extension. My guess is that it didn't retrieve any of the path info due to a silent failure in upload::save().

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-05-08 19:36

Either that, or the original file didn't have an acceptable extension. I filed this ticket http://apps.sourceforge.net/trac/gallery/ticket/256 and resolved it in 20699 -- want to try again with the latest svn or nightly?

 
b.thomas.gallagher

Joined: 2009-05-20
Posts: 2
Posted: Wed, 2009-05-20 05:55

I get a similar error. From the log:

2009-05-02 00:14:47 -07:00 --- error: Uncaught PHP Error: realpath() [<a href='function.realpath'>function.realpath</a>]: open_basedir restriction in effect. File(/usr/bin) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/') in file kohana/libraries/drivers/Image/ImageMagick.php on line 45

Any idea what to do with this one?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2009-05-20 07:10

@b.thomas.gallagher: FAQ: Why do I get errors like this: Warning: open_basedir restriction in effect. File is in wrong directory in /home/johndoe/public_html/gallery/platform/fs_unix.php on line 53? In this case, you need to get /usr/bin into the open_basedir list. Most hosts allow this.
---
Gallery 3 problems? Check gallery3/var/logs before you post!
Gallery 3 nightlies: http://www.gallery2.hu/download/Gallery3/gallery3nightly.tar.gz
Gallery 3 subversion: http://codex.gallery2.org/Gallery:Using_Subversion#Quick_Start

 
mike__howe

Joined: 2009-05-21
Posts: 1
Posted: Thu, 2009-05-21 01:06

I've found if I try and upload any photo over the 1MB-2MB size it brings up a 500 error... but if I upload a smaller image it works fine!

Is there anyway I can change this?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-05-21 01:16
 
b.thomas.gallagher

Joined: 2009-05-20
Posts: 2
Posted: Thu, 2009-05-21 04:00

Thanks a million, bharat.

 
Forkboy2

Joined: 2008-09-22
Posts: 3
Posted: Mon, 2009-06-08 05:06

If you are getting Error 500's on upload make sure you are using ImageMagik and not GD. See if that helps. Fixed it for me. I"m not expert, but I think GD requires a higher PHP Memory Limit than ImageMagick to process the thumbnails, etc.

Matt

 
screamstone

Joined: 2009-08-31
Posts: 1
Posted: Mon, 2009-08-31 15:51

Hey gang... new to G3 but used G2 in the past..

I'm also getting 500 errors on a fresh install. Using IM (GD didnt' work either). Switched all folders in var to 777, and all error logs are empty (G3 and apache). I'd love to get the student gallery for my class website rolling (brainbuffet.com). the kids like to see their work on the site! Thanks for the help...

All files just a couple hundred K.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-08-31 20:40

First please make sure you're using the latest experimental code:
http://codex.gallery2.org/Gallery3:Upgrading

Once you've upgraded, if it's still not working PM me login details and I'll see if I can see anything. Just click "Write to author"
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here