View Full Version : Image Upload error
otester
04-14-2012, 02:25 AM
If I upload an image and then click next on the submit 2/3 I get...
Notice: unserialize() [function.unserialize]: Error at offset 388 of 389 bytes in /home/getsmash/public_html/hotaru/content/plugins/submit/libs/SubmitFunctions.php on line 296
According to [http://drupal.org/node/529866], unserializing a resource (image?) can cause problems, any ideas?
otester
04-14-2012, 10:28 PM
Got rid of the error, but there is still some work to be done to get the image to display (remove the C:\fakepath\ bit), more postings to come soon.
http://stackoverflow.com/questions/10152904/unserialize-function-unserialize-error-at-offset
PuckRobin
04-15-2012, 01:16 AM
Some server installations add slashes to quotes while serializing, which is wrong. Instead of those complex advices, just change that part in line 296 as:
return unserialize(stripslashes($submitted_data));
otester
04-15-2012, 09:18 AM
Some server installations add slashes to quotes while serializing, which is wrong. Instead of those complex advices, just change that part in line 296 as:
return unserialize(stripslashes($submitted_data));
Problem I have at the moment is when the image is posted (x = website name, hover with mouse to see full url):
http://www.x.co.uk/hotaru/content/plugins/tim_thumb/libs/timthumb.php?src=http://www.x.co.uk/hotaru/content/uploads/2012/04/C:\fakepath\5b980e3f7f6a2e62da500d6de69c.gif&w=90&h=60&zc=1
instead of:
http://www.x.co.uk/hotaru/content/plugins/tim_thumb/libs/timthumb.php?src=http://www.x.co.uk/hotaru/content/uploads/2012/04/5b980e3f7f6a2e62da500d6de69c.gif&w=90&h=60&zc=1
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.