WordPress.org

Ready to get started?Download WordPress

Forums

PhotoContest Plugin
Allowing larger photos? (5 posts)

  1. jannmirch
    Member
    Posted 3 years ago #

    Is there any way to increase the allowable file size? A number of users are trying to upload larger files and it sends them to a blank screen. And because we are requiring them to join the mailing list first, it's becoming a bit of a nuisance...

    Contest is here: http://soundearth.com/BARC/

    Entry form is here: http://soundearth.com/BARC/wp-content/plugins/wp-photocontest/play.php?post_id=27

  2. rjcord
    Member
    Posted 3 years ago #

    My suggestion is to turn on debug messages in the photocontest settings (Admin > Photocontest > Update Settings > DEBUG FLAG) and see if you get a Fatal error: Out of memory... I suspect you are hitting your server's memory-limit. If allowed raise it (there may be several ways to do that), if not you may have to find a better hosting package.

    Hope this helps.

  3. jannmirch
    Member
    Posted 3 years ago #

    Thanks for the suggestion. I'll try that.

  4. jannmirch
    Member
    Posted 3 years ago #

    It looks like the photos are actually getting uploaded; I see them on the server. But the actual entry does not appear. I've checked the actual database and it's not there either...

    It looks like photos under 850kb are fine and we've made a note on the entry page but some folks are ignoring it or don't know how to check their image file size and uploading files over 4mg...

    Any help would be appreciated.

  5. rjcord
    Member
    Posted 3 years ago #

    The scripts make three thumbnails from the original (named <userid>_<filename>). I'm getting fatal errors during the creation of these after the first one is generated. One thumbnail is a custom size called <size>_<userid>_<filename> (size depends on the settings for the contest) the other two are called med_<userid>_<filename) and pre_<userid>_<filename>. You can ftp into the .../wp-content/plugins/wp-photocontest/contests_holder/<contest name> folder to see them.

    I'm running out of memory with 30MB allocated to php and hoping to raise this to 60MB. For me the break point is somewhere between 330kb and 430kb for original image file sizes.

    So when the script hits the fatal error (and dies) during this process it wont get to the database updating but will leave files on the server that prevent re-uploading because there is a file-exists check based on the original filename.

    One possibility is to add a file_size check to the code to kick out any upload above xKB before it tries to generate thumbnails but this is site specific. I'd rather get more memory. I suggest you call the tech support guys at the hosting company you use to get the real memory limits you have and explore options with them. PHP scripts only set and return settings that for me are completely fallacious being over-ridden by hosting account settings. I don't know what happens with really large image files and more memory yet. So even then a file size limitation may still be needed given today's digital cameras with as much as 18MB sensors.

    May be frekel will have other suggestions (and corrections to my analysis).

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic