Adding Photos Fails

think_about

Joined: 2005-07-26
Posts: 2
Posted: Wed, 2005-07-27 06:08

I installed Gallery 1.4.4-pl6 and tried to add photos to my first album. It failed to add the photos: details are below. (I hope the verbosity below helps rather than hinders your diagnosis!)

I tried adding photos through the "Form" interface. After specifying the path to the photo in the file box, I submitted the form. The photo was not added to the album, and I got the following error output (with debug mode on):

-----------------------
- Adding DCP_1035.jpg
Warning: copy(DCP_1035.jpg) [function.copy]: failed to open stream: No such file or directory in /home/www/htdocs/photo/gallery-1.4.4/platform/fs_unix.php on line 26

Resizing/compressing original image
Warning: getimagesize(/home/www/htdocs/photo/gallery/albums/album01/DCP_1035.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/www/htdocs/photo/gallery-1.4.4/util.php on line 436

The file /home/www/htdocs/photo/gallery/albums/album01/DCP_1035.jpg does not exist ?!
----------------------

I have tried using the Gallery Remote applets with the same result. However, the URL method of uploading photos works fine.

I then tried poking through the code to see if I could determine more details about the source of the error. The error output above seems to happen because in util.php line 2170, the $file parameter to the move_uploaded_file() function is null. (This means the galleryXXXXX file created in /tmp is empty (file size of 0), and so no image is eventually copied to the albums directory.)

I traced back to find out why $file is blank. $file (in this case) seems to be assigned its value in save_photos.php line 293. ( $file = array_shift($userfile); )

Then I tried to figure out where $userfile is assigned. From what I can deduce, the variable is from includes/add_photos/add_form.inc line 92: it is a post parameter that contains the file path and name as entered in on the Add Photos (form method) page. If this is the case, why is $userfile blank when we perform an array_shift() on it in save_photos.php?

Or is there a simpler explanation for why I can't add photos?

(I have tried this with both large and small photos (icons), and so I don't belive I'm running into a problem with a maximum upload files.)

I then tried installing Gallery 1.5.1-RC1, but got the same error output. This leads me to believe that it's almost certainly a problem with my system setup. Any ideas?

(The files and line numbers above refer to the 1.4.4-pl6 release.)

Thanks!

----
Gallery version: 1.4.4-pl6 and 1.5.1-RC1 (tried both)
Apache version: 2.0.54
PHP version: 5.0.4
Graphics Toolkit: ImageMagick 6.0.4
Operating system: Mandrake Linux 10.1
Web browser/version (if applicable): Firefox

 
think_about

Joined: 2005-07-26
Posts: 2
Posted: Fri, 2005-07-29 16:59

I'm just replying to my post to bump it up a bit, as per the instructions for submitting a problem report:

"If you haven't gotten a response in 48 hours, feel free to bump your post by replying to it. This will ensure that we see you still haven't gotten an answer."

Thanks!