#1 2011-07-11 04:22:26

Jerzy
Guest

Upload Photos

When I select photos (select files) to be uploaded (Photos -> Add -> Drop into Existing Album) and click upload everything looks fine but after upload in finished not all files are uploaded. There is no rules which ones. In some cases after upload is completed there is no confirmation on the screen and in that case no single photo is uploaded. I am using default themes.

 

#2 2011-07-11 04:34:45

Bernie
Guest

Re: Upload Photos

I ran into a similar problem. I uploaded 10 images to an album, but only 9 showed up. No matter how many times I re-uploaded the missing image, it would not show up and I did not get a confirmation after the upload. So I thought perhaps there was some sort of problem with the image itself. I opened the image in my photo editor, re-saved the image, and uploaded it again. Voila, it showed up!

Bernie

 

#3 2011-07-11 04:42:07

Zarbon
Member
2011-07-07
6

Re: Upload Photos

Are the missing pictures .png files? I've had similar problems myself. If they are, just open in Photoshop or any other program you might use and resave as .jpg

Offline

 

#4 2011-07-14 02:34:12

Jerzy
Guest

Re: Upload Photos

I recreated jpg file and it still not worked (upload from Administration Home -> Add).
I tried to upload to different albums with the same results. After upload is completed I get a quick message "successful” but I never get the thumbnail on the screen and photo is not there.
I could upload other pictures without any issue so it looks like something related to picture(s).

I also tried to use pLoader and it seemed to work. I used the word “seem” since there is a small issue with that photo. It shows correctly on the screen and all functions work but one, “click on the photo to see it in high definition”. A am using “Look_like_gbo2” plug-in. I tried to turn on/off that feature but my “bad” picture is stubborn. All other functions seems to be working on mouse move over the picture (next, previous, thumbnails).

Thanks

 

#5 2011-07-14 08:26:12

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7304

Re: Upload Photos

whith bath manager have you look if photo is present ?


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#6 2011-07-14 20:59:36

Jerzy
Member
Connecticut, USA
2011-07-14
4

Re: Upload Photos

I went deeper and checked the MySql and directory structure. I believe that there is the issue with updating album (removing/reading images)

1. Here is the listing of my directories:

jolajerz@jola-jerzy.us [~/www/jjalbum/upload/2011/07]# ls -l
drwxrwxrwx 6 jolajerz jolajerz  4096 Jul 13 15:52 ./
drwxrwxrwx 3 jolajerz jolajerz  4096 Jul 10 17:47 ../
drwxrwxrwx 4 jolajerz jolajerz 12288 Jul 13 16:13 10/
drwxrwxrwx 4 jolajerz jolajerz  4096 Jul 11 20:41 11/
drwxrwxrwx 4 jolajerz jolajerz  4096 Jul 12 19:44 12/
drwxrwxrwx 4 jolajerz jolajerz  4096 Jul 13 16:22 13/

So it looks like I uploaded photos for 4 days, starting July 10 and last upload was done on July 13.

2. I run a simple loop to count all my photos:

jolajerz@jola-jerzy.us [~/www/jjalbum/upload/2011/07]# for day in 10 11 12 13
> do
>  no=$(ls -l ./$day/*.jpg | wc -l)
>  hno=$(ls -l ./$day/pwg_high/*.jpg | wc -l)
> echo "Day= $day  Number_of_images= $no  Number_of_high_images= $hno"
> done

Day= 10  Number_of_images= 108  Number_of_high_images= 163
Day= 11  Number_of_images= 14  Number_of_high_images= 34
Day= 12  Number_of_images= 1  Number_of_high_images= 2
Day= 13  Number_of_images= 2  Number_of_high_images= 11

If I add all numbers in 2nd column (Number_of_images) it gives me 125 and it is equal to number of pictures in my album. So far so good.
But why the number of high resolution images (3rd column) does not match number of photos (2nd column)?

3. Let's check MySql now:

The “piwigo_images” table has 125 records. It is equal to number of photos in my album. It looks like database has been updated correctly.

4.Let's remove one photo, the one I uploaded on July 12 ( Day= 12  Number_of_images= 1 Number_of_high_images= 2) and see what happens.

Before (just changing to July 12 directory)

jolajerz@jola-jerzy.us [~/www/jjalbum/upload/2011/07]# cd 12
jolajerz@jola-jerzy.us [~/www/jjalbum/upload/2011/07/12]# ls -l *.jpg
-rw-r--r-- 1 jolajerz jolajerz 173335 Jul 12 19:44 20110712193020-14b2b224.jpg

jolajerz@jola-jerzy.us [~/www/jjalbum/upload/2011/07/12]# ls -l ./pwg_high/*.jpg
-rw-rw-rw- 1 jolajerz jolajerz 457249 Jul 12 19:26 20110712192628-21f434a4.jpg
-rw-r--r-- 1 jolajerz jolajerz 457249 Jul 12 19:41 20110712194142-21f434a4.jpg

By just looking what it there none of the two files inside pwg_high directory is high resolution jpg for the photo in parent directory (20110712193020-14b2b224.jpg). That is probably why “Click on the photo to see it in high definition” dos not work.
Actually, to be more precise, the HTML code was never generated to do so (see below)

<div id="theImage">
<!-- LLGBO2 picture_content -->

    <!--  navigation on picture  -->
    <map id="prevnext" name="prevnext"> 
    <area shape="rect" coords="0,0,192,600" href="picture.php?/20/category/2" title="Previous : "  alt="" rel="prev">
    <area shape="rect" coords="192,0,608,300" href="index.php?/category/2" title="Thumbnails" alt="" rel="up" >
    <area shape="rect" coords="608,0,800,600" href="picture.php?/7/category/2" title="Next : "  alt="" rel="next">
    </map>
     <span  id="gboh2" style ="background:transparent;z-index:3;color:#111111">BMW Museum</span>
    <div  id="gbo" style="width:844px; height:644px;">
    <div id ="llgboframe31" style="border: 1px solid #666e83">

Here is also database record for that one photo from July 12 before removal:

id     192
file     P6142878.jpg
date_available     2011-07-12 19:30:20
date_creation     2011-06-14 08:08:51
tn_ext     jpg
name     BMW Museum
comment     NULL
author     NULL
hit     24
filesize     169
width     800
height     600
representative_ext     NULL
date_metadata_update     2011-07-13
average_rate     NULL
has_high     NULL
path     ./upload/2011/07/12/20110712193020-14b2b224.jpg
storage_category_id     NULL
high_filesize     NULL
level     0
md5sum     21f434a499f4a51b8a4dc935131f0f2b
added_by     1

Deleting photo now (Albums → Manage → checked photo → Action → Delete Selected Photo)
GONE

Checking directories:

File disappeared from ~/www/jjalbum/upload/2011/07/12 directory and there are still 2 jpg files in pwg_high directory as we expected since there have nothing to do with original photo.

Checking MySql:

Record is gone.

5. Re-adding the same photo (Photos → Add → To existing album):

No confirmation thumbnail on the screen.
Let check directories:
Obviously there is a new directory for July 14 but it is empty but pwg_high has one file.

jolajerz@jola-jerzy.us [~/www/jjalbum/upload/2011/07/14]# ls -l *.jpg
/bin/ls: *.jpg: No such file or directory

jolajerz@jola-jerzy.us [~/www/jjalbum/upload/2011/07/14]# ls -l ./pwg_high/*.jpg
-rw-rw-rw- 1 jolajerz jolajerz 457249 Jul 14 12:28 ./pwg_high/20110714122851-21f434a4.jpg

and there is no thumbnails directory either.

Let check now how MySql has been updated:

The same number of record as before – 124. It means that nothing has been added.


CONCLUSSION:

There must be a bug in the php code in adding photo module. I will be more than happy to do more debugging. I still cannot understand why I can upload some photos without issue to the same album.

Also with pLoader I have no issues (I enabled HD and both images are there).

Thank you.

Offline

 

#7 2011-07-15 02:13:06

Jerzy
Member
Connecticut, USA
2011-07-14
4

Re: Upload Photos

Found the following error in ~/www/admin/include/uploadify/error_log:

[14-Jul-2011 17:10:31] PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 3200 bytes) in /home1/jolajerz/public_html/jjalbum/admin/include/functions_upload.inc.php on line 585

So it is inderectly related to function_upload.inc.php and explained why some photos are ok and some not.
It does not seem to be related to file size but to resolution of the photo.
For example, I had no issue with 536kB photo with 4032X2688 resolution but upload of 447kB photo with size 4032X3024 failed.

I think I saw something about php error before so I need to search forum again.
I am very cloose to resolve that mystery (one inch or for guys with metric system, 2.54 cm) ;)

Jerzy

Offline

 

#8 2011-07-15 03:55:39

Jerzy
Member
Connecticut, USA
2011-07-14
4

Re: Upload Photos

Resolved.

The issue was related to PHP configuration.
I found many comments regarding that issue that suggested to change the following variables (increase size) in php.ini file;

upload_max_filesize = 10M    ; default value
post_max_size = 8M        ; default variable

some suggested increasing to 200M!

The real issue was the amount of memory (limit) that is allowed to be used by script.
To correct that you can try to increase memory from default value (in my case 64M) to something bigger. I just doubled it to 128M.

So the entry in php.ini should look like:

memory_limit = 128M    ; Maximum amount of memory a script can consume.

I tried that without making changes to “upload-max-filesize' and “post_max_size' and upload from inside PiWigo finally worked.

Jerzy.

Offline

 

#9 2011-07-15 08:21:46

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7304

Re: Upload Photos

Thanks for your explanation ;-)


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#10 2011-10-10 14:26:46

Barry
Guest

Re: Upload Photos

Just as an addendum to this solution, for those on shared hosting environments you can tackle this restriction by adding the php.ini to the root of your piwigo installation as well as the root of the uploadify plugin in /admin/include/uploadify/

I have detailed what I have done on my own blog, http://www.mainframes.co.uk/index.php/2 … out-error/

regards,

Barry.

 

#11 2011-10-10 17:03:39

IGraham
Member
UK
2011-09-28
193

Re: Upload Photos

hello Barry
How opportune was your last post - spot on
You are a Star, I was limited to a 2mb upload, had tried unsuccessfully to use a hcaccess file and thought i was stuck with the 2mb  limit.
your method works thanks

tried to post a thanks on your blog but got a fatal error

Offline

 

#12 2011-10-10 17:13:07

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13954

Re: Upload Photos

Great post Barry, we'll add your solution in the wiki.

Did you try with Piwigo 2.3? The upload form has been modified a lot and you should get useful information before you select and upload photos.

Offline

 

#13 2011-10-10 23:36:18

Barry
Guest

Re: Upload Photos

Hi,

yes i upgraded to 2.3 after I realised that I had this issue, thinking that this was a bug in 2.3. So this solution definitely works with 2.3.

cheers,

Barry.

 

Board footer

Powered by FluxBB

github linkedin newsletter Piwigo.org © 2002-2025 · Contact