Advertisement:

Author Topic: JFIF Image uploading  (Read 3149 times)

Offline ftforum

  • Semi-Newbie
  • *
  • Posts: 18
JFIF Image uploading
« on: December 22, 2010, 01:13:42 PM »
We have a user who has a .jpg file extension but the file is actually in JFIF format. When he tries to upload, it crashes and comes up with a security error. This is stange as I have disabled attachment security in admin.

Any ideas?

kat

  • Guest
Re: JFIF Image uploading
« Reply #1 on: December 22, 2010, 01:27:58 PM »
Yeah. Tell the user not to use JFIF encoded images! :)

Easy enough to convert, after all.

Offline ftforum

  • Semi-Newbie
  • *
  • Posts: 18
Re: JFIF Image uploading
« Reply #2 on: December 24, 2010, 04:44:56 AM »
Well we have now had a whole host of complaints from people who do not have JFIF images and just standard jpg and stil get the message:

An Error Has Occurred! Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.

What's going on?
« Last Edit: December 24, 2010, 04:48:44 AM by ftforum »

Offline ftforum

  • Semi-Newbie
  • *
  • Posts: 18
Re: JFIF Image uploading
« Reply #3 on: December 24, 2010, 04:48:28 AM »
And with recoding turned on we get...

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2365 bytes) in /home/ftf/public_html/forum/Sources/Subs-Graphics.php on line 424

kat

  • Guest
Re: JFIF Image uploading
« Reply #4 on: December 24, 2010, 08:21:34 AM »
This error message usually springs up in a previously functional PHP script when the memory requirements exceed the default 8MB limit. Don’t fret, though, because this is an easy problem to overcome.

To change the memory limit for one specific script by including a line such as this at the top of the script:

ini_set("memory_limit","12M");

The 12M sets the limit to 12 megabytes (12582912 bytes). If this doesn’t work, keep increasing the memory limit until your script fits or your server squeals for mercy.

You can also make this change permanently for all PHP scripts running on the server by adding a line like this to the server’s php.ini file:

memory_limit = 12M

Offline ftforum

  • Semi-Newbie
  • *
  • Posts: 18
Re: JFIF Image uploading
« Reply #5 on: January 06, 2011, 03:30:58 AM »
Thanks, problem now resolved.

I set the limit to unlimited on the PHP config but this resulted in the form script crashing (but the image actually uploading ok).

I changed the limit to a specified value until it worked (as suggested) and now it seems to work fine.


kat

  • Guest
Re: JFIF Image uploading
« Reply #6 on: January 06, 2011, 01:46:59 PM »

Offline nukinfuts29

  • Semi-Newbie
  • *
  • Posts: 18
Re: JFIF Image uploading
« Reply #7 on: June 03, 2011, 05:50:27 PM »
I'm having a VERY similar issue, except that my users can't post anything bigger than 86KB. Where could i enter these vairables to circumvent any possible issues?

http://www.simplemachines.org/community/index.php?topic=436338.0