WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
[resolved] Uploaded photos are errors (27 posts)

  1. stob88
    Member
    Posted 3 years ago #

    I cannot upload photos without importing them from FTP.

    Here are the errors I get.

    Warning: getimagesize(/home/mysite/public_html/wp-content/uploads/wppa/thumbs/1920.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/furrytow/public_html/wp-content/plugins/wp-photo-album-plus/wppa_functions.php on line 739

    Warning: Division by zero in /home/mysite/public_html/wp-content/plugins/wp-photo-album-plus/wppa_functions.php on line 746

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    Edit the album to see if the thumbnail of photo nr 1920 exists.

    If not, either try to regenerate thumbnails (by changing the size of [the largest of coverphoto size and thimbnail size] by at least 25 px, and later back) or delete the photo and re-upload.

    The problem here is not the uploading, but the generation of the thumbnail from a very large photo. This may cause out of memory errors or the server simply gives up without any errormessage.

    In this case you have the database entry and the fullsize image, but not the thumbnail. This generates the errors you get.
    If your serever does not allow you to use more than 32 mb, you still need to make your photos no larger than approx 1024 pixels.

    If you set 'resize on upload' to on, you still will have the same problem, but a little earlier, namely when the resized picture is attempted to be generated. In this case you will only have the database entry.

    When importing as opposed to uploading, this will automatically be corrected. At the start of the procedure a check will be done to see if there are broken entries like this in the most recently used album.
    In case of problems, the db entry and (if present) the fullsize image will be deleted after any failure (as is: no thumbnail could be created). The ftp'd picture is still there and you may retry.

    So: if this kind of erros persist when you have set max memory to 64MB and you have turned 'resize on upload' to on: you still need to resize your pictures before uploading or ftp'ing.

    However, i will make sure in the next version that you will no longer get an errormessage when the thumbnail image does not exist.

  3. stob88
    Member
    Posted 3 years ago #

    I set the max memory to 64MB, but I still am having problems with both way of uploading.

    Anything else I can do? Or should I manually re-size photos?

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 800 bytes) in /home/mysite/public_html/wp-content/plugins/wp-photo-album-plus/wppa_class_resize.php on line 181

  4. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    Your provider (like mine) allows you only 32 mb approx (33.554.432 bytes)
    This is the problem.

    When creating a new (smaller) image for 'resize on upload' or for the thumbnail when there is a 7 megapixel picture, the php makes a full color image to be able to resample it to the disired size, that is the way it works. This full color image is like a bitmap, so it will require 7M * 3 = 21 MB that you do not have unfortunately. It is not just 800 bytes missing, that is just the size of a small chunk by which a larger space is attepted to be allocated in steps.

    Setting WP to 64 MB is fine but it does not help you overcome your hosting providers limit.

    The only solution is resize before upload.

    If you use windows, just google on image resizer and you will find many easy to use resizers.

  5. Dimitri_V
    Member
    Posted 3 years ago #

    I have read and understand all you have said opajaap and it all sounds reasonable.
    My problem is the same...

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 800 bytes) in /home/mysite/public_html/wp-content/plugins/wp-photo-album-plus/wppa_class_resize.php on line 181

    However, I can now change nothing in the settings pages. No matter what I try to change, I get the same (above) reply. Any solutions?

    Another thing I would like to ask is this. When I single view an image in any of my galleries (even during slideshow), that image is stuck to the left of the page. Is there any way it can be moved in the center? It would look more professional.

    http://dvattika.com/gallery/galleries/?album=1&photo=40&occur=1

  6. Dimitri_V
    Member
    Posted 3 years ago #

    Oh and one more thing. When viewing an image, the bottom links from the drop down menu (pages) are not working, they seem to be behind the picture.
    And one last thing, I think you've done a great job with this plugin, if a couple of things are fixed, it can be awesome.

  7. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    Diagnosis: You have a photo in the system that is too big to make a thumbnail from.

    Try one of the following to get rid of the errormsg:

    Try to edit the album (click 'Edit' in the albumtable) and delete the photos that do not display a thumbnail. This will delete the full size and the database entry

    OR:

    Go to the upload page and upload one photo that you are sure of that it is not too big. This will automaticly do the same as the above, IF the problem is in the most recently used album.

    If both methods fail (which i doubt) do the following:

    FTP to wp-content/uploads/wppa/thumbs and find out what entries exist.
    Then go one up and see waht entries you have MORE than in the thumbs dir.

    Delete those (full-size) images.

    Do upload one photo to the album that caused the problem, this will fix the database as in the very first fix suggestion.

    The alignment problem you have:

    Normaly the width of your display column (in your case i guess 870 pixels) is the same as the full image size.
    So, Do one of the following:

    Resize your photos to 500 pixels before uploading and set full image size to 870 and uncheck Stretch.

    OR:

    set %%size=870%% as the last token in (p.e.) %%wppa%% %%album=13%% %%size=870%% and uncheck Stretch as above.

    Also in either case set vertical alignment to 'fit'. (If vertical alignment is off, also no horizontal placement is done)

    Play with all the settings i mentiond here so you get a feeling on how to..

    Because of the fading effect used in slideshow and browse full image the photo displayd is on a top level (z-value very high). Therefor it is always on to, even over a menu.

    By the way:
    Upload or import with 'Resize on upload' ON will NEVER enlarge, will only make pictures smaller.

    Pls tell me how you fixed it.

  8. Dimitri_V
    Member
    Posted 3 years ago #

    You were absolutely right, there was something wrong with one of the images, although I never found which one. I deleted all albums and images and started all over again but this time with one album and a handful of images at 500px.

    Everything is working fine apart from one thing.
    I tried what you said about the alignment of the images in the center of the main window and nothing, I tried various combinations.
    The only thing that worked was when I tick Stretch but then, they don't look nice.
    I have left the settings at %%size=500%% %%wppa%% %%album=13%% %%size=500%% just now as I don't like a large window and I hate Vertical alignment to "fit".

    Any more ideas about the alignment?

    http://dvattika.com/gallery/galleries/?album=8&slide=true&occur=1

  9. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    make a copy of wp-photo-album-plus/theme/wppa_style.css and put it in your theme directory.

    edit .slide_frmame at line 172 as follows: add:

    margin-left: 185px;

    that is (870 - 500)/2.
    This will fix it.

    Have a nice day!

  10. Dimitri_V
    Member
    Posted 3 years ago #

    I added margin-left: 135px; as I have now reduced my overall page to 800px wide and guess what...

    you are the man. I can't thank you enough and I really love your plug-in. It is my style.

    If I may suggest something for future upgrade? When you are viewing a single picture, it would be nice to be able to click a (back) button on the picture and return to the thumbs as right now, you need to find the link above the picture for return.
    Also, it would be nice to have the choice of keeping the main window for viewing the pictures at around 500px but also view them at ie 900px by clicking on them, something like lightbox.

    Oh, and a donation is on its way. Thank you.

  11. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    Thank you for your positive feedback.

    I will add a setting, something like 'Column width' or so, so you don't have to set margin-left every rev.

    There are more ideas, like a filmstrip of thumbnails below the browsed picture etc. As I'm thinking about these things ideas are always welcome.

    Enjoy it as much as i do.

  12. Dimitri_V
    Member
    Posted 3 years ago #

    Filmstrip is a really good idea indeed. I'll look fwd to the new upgrade. :)

  13. eventors
    Member
    Posted 3 years ago #

    I still am not sure how to center slide show after reading above. Can you help me?
    Jeff

  14. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    Try this:

    %%wppa%%
    %%slide=..%% (Fill in the album number)
    %%size=400%% (Example only)
    %%align=center%%

    If this doesn't help you, supply a link ro the site and be a bit more specific in your question, please

  15. eventors
    Member
    Posted 3 years ago #

    Thanks for the reply. website is"
    http://withlacoocheegulfpreserve.com/?page_id=136
    Should I just paste above in HTML editor? Where do I find album #

    Thanks very much,
    Jeff

  16. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    Yes, type the text (may be on one line, but keep the ordering sequence!) like:

    %%wppa%%%%slide=3%%%%size=400%%%%align=center%%

    The album # is the ID in the column in the table on the Photo Albums -> Photo Albums page.

    Also when editing an album (after pressing Edit in that table) it is at the top of the page (Album number: ..)

  17. eventors
    Member
    Posted 3 years ago #

    Thanks, Works perfectly.
    I assume If I want the centered image bigger, I increase to 500?
    Is there a down side of making the image bigger? What size will fill left to right dimension:
    http://withlacoocheegulfpreserve.com/?page_id=136

    Again, I appreciate you help - It looks very good!
    Jeff

  18. eventors
    Member
    Posted 3 years ago #

    One more item: Under photo it says "you must log in to vote"
    I assume I can uncheck that in settings section?
    JB

  19. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    I think approx 940 will be the maximum.

    There is no downside to it as long as your original photos are at least that size. If you check 'Resize on upload' make sure the fullsize width and height are set large enough, otherwise those numberes are used to shrink the photo so it will fit in a box of that size. The aspect ratio will always remain correct. This is a 'holy' property within wppa+

    You should NOT need the 'Stretch to fit' box to get them displayed large enough, it would blurr the images more or less.

    Just play around with those settings, you will find the settings you prefer quite easy.

    You have various options for the rating system, like the ability to change your vote or to vote more than once. The default is just a conservative choice.

    Before setting up your site 'for real' you should play around with the settings to get the feeling of what is possible (a lot!)

  20. teddyilagan
    Member
    Posted 3 years ago #

    Hello,

    How can I change the settings wherein if I choose fit the height of the slide show is expanding if the photo is portrait. What I wan't is the height is fixed. If the photo is portrait the height will remain and the width is reduced.
    http://teddyandcharmaine.com/?page_id=18&album=1&photo=52&occur=1

  21. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    1. On the Photo Albums -> Settings page set the Fullsize width (preferrable equal to the column width) to the width you want.

    2. Set the height so that it corresponds to the height of a landscape photo that fits the width you just have set.

    3. Check the 'Resize on upload' box.

    To fix the photos you already uploaded:

    Either:
    1. Set the vertical alignment on the chapter Full size & Slideshow to center

    Or:
    1. Export the album(s) that have portait images.

    2. Delete those albums.

    3. Import them again.

    99. Done! Good luck

  22. mikesandburg
    Member
    Posted 3 years ago #

    I keep getting the following error:
    Fatal error: Class 'ZipArchive' not found in /var/www/html/wp-content/plugins/wp-photo-album-plus/wppa_upload.php on line 1003

    I have verified that the zip file was indeed uploaded to the following directory,

    wppa-depot/admin/
    (the filename is zoo.zip)

    but your import function is not working for me.

  23. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    What is your php version? (See Photo Albums -> Settings admin page).

    Also, please supply a link to your site.

  24. mikesandburg
    Member
    Posted 3 years ago #

    PHP version 5.3. mikesandburg.com

  25. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    Somewhere around line 1440 in wppa_settings.php (if you have the latest version) you will find:

    <?php // Table 10: Miscellaneous ?>
    			<h3><?php _e('Table X:', 'wppa'); echo(' '); _e('PHP Configuration:', 'wppa'); ?><?php wppa_toggle_table(10) ?></h3>
    			<?php _e('This table lists all PHP server configuration parameters and is read only', 'wppa'); ?>
    
    			<div class="wppa_table_10" style="margin-top:20px; text-align:left;">
    				<?php phpinfo(5) ?>
    			</div>
    		</form>
    		<script type="text/javascript">wppaInitSettings();</script>
    	</div>

    Change <?php phpinfo(5) ?> to <?php phpinfo(-1) ?>

    This will give you all php config info in Table X of the Photo Albums -> Settings admin page. You can also see whether zipfiles are supported.
    If not, ask your administrator.

  26. vdowsett
    Member
    Posted 3 years ago #

    I'm wondering if you could explain how the max_file_uploads work. Is this the maximum photos a user will ever be able to upload, or only on a specific day or any give time period?

    If it's how many they can ever upload, is there a way to change this. The main user of my site is a photographer who would obviously like to upload more like 200 photos at a time. Is there is a way that I can change the max_file_uploads setting.

    The only reference I have found to it in the PHP files is in wppa_uploads.php is this the correct place to make the change?

    Thanks!

  27. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 3 years ago #

    max_file_uploads is a php setting (php.ini) that indicates the maximum number of files you can upload in one request. You may try to increase the number (in my server it is set to 20) but your hosting provider may have set a maximum that you can not overrule.

    If you want to upload, say 200 photos, you have to upload 10 times 20.

    Note that there may also be a limit on total filesize (upload_max_filesize) you can upload in one request (like 10MB as in my server), and maximum upload time (max_input_time) (in my server: 60 seconds).

    So there are many ways that may limit your uploading of photos, but, the good news is that wppa+ recognizes when an upload process has been interrupted by some sever restriction and 'repairs' any inconsistencies that results from this.

    To upload large numbers of photos, wppa+ has two possibilities:

    1. Make a zipfile containing your photos (the zip should not be larger than the upload_max_filesize and upload the zipfile (see the lower half of the Photo Albums -> Upload Photos admin page) and import the photos using the Photo Albums -> Import Photos admin page.

    2. Use an FTP program to upload as many photos as you want to your personal wppa+ depot that is located at .../wp-content/wppa-depot/Joe/ (if your login name is Joe) and use the Photo Albums -> Import Photos admin page.

    You can find the currently valid restrictions on the php settings mentioned above in Table X of the Photo Albums -> Settings page.

    This is about all that can be said about this topic.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic