View Full Version : Mobile "Place Ad" Image fails
January 11th, 2013, 12:30 PM
When you attempt to place an ad from a mobile phone and include an image from the phone's Gallery the ad uploads, but the image doesn't show up and the resultant ad shows that there are 9 images in the ad, and each one is a single character spelling - i m a g e . j p g
Here is a a link to a test ad I just made from my phone. It's not veiwable to the public but since Chuck has an Admin access to my account I think he can see it.
Message - Guitars and Gear For Sale (http://www.tdpri.com/phpclassifieds/showproduct.php?product=33547&title=test-add&cat=87)
I've also included a screen shot (from a computer) of the resultant iphone place ad with the image blank and spelling out image.jpg.
January 11th, 2013, 01:22 PM
well how big is this Image?
I would suspect the same thing would happen on the computer. That looks to me like some freaky PHP issue where PHP freaks out with a huge image the server drops the image but somehow your image title ends up being the image title split up.
I have seen that a couple of times over the years on normal sites. No one can ever reproduce the issue consistently.
Check the image size and let me know. Increasing your PHP memory to like 96M and making sure the proper max upload filesize is set would resolve the issue.
I can also try and do one more round of checks before the query is saved to recheck that the image names are actually image names.
January 11th, 2013, 02:40 PM
Well, that's the problem. On the mobile phone, it uses an image from the Gallery and you don't have a say in the size of the image or even any way to tell. You could send or copy the photo to a computer and I'd guess it is over one meg in size
I too, have seen that from a computer.
I was surprised that the phone even offered to use a photo from the phone's Gallery to upload to the ad. I expected that it wouldn't do that.
But the phone takes photos one size fits all. And you don't get to edit it for bytes.
When sending a photo in a message or email app on the phone the phone will ask you what size you wish to send. But in the Classifieds it doesn't offer any size choices.
When you send an image from your Gallery to your computer via email you get a name like photo.jpg and photo1.jpg.
I've just figured out a work around for this -- you take a photo with the phone or a photo in the Gallery, and you send it to yourself in an email. And you select the "smallest" size available. Then you open the email and save the phone in your email to your gallery. Then you create the ad with the small size photo and it works perfectly.
Too bad the small, med, large photo size option isn't displayed when you use a photo from the Gallery originally.
Thanks for the help. This isn't a bug.
January 11th, 2013, 03:06 PM
I've played around with this some more. My work around above works, but the image is rotated 90 degrees CCW. Easily corrected.
I also created a test ad where instead of choosing a photo in the Gallery I took a new photos with the phone and used that photo. That worked instantly without problem, though the photo was rotated 90 degrees CCW, as well.
January 11th, 2013, 03:20 PM
Yeah the feature your talking about is a phone only feature for use in there operating system with attaching things to email or text messages has nothing to do with anything else. ;)
As far as our program to prevent weird names being entered in image fields if your server does wig out is easy. You would simply use the functions already in our program.
In image-inc.php after the line in bold add the lines I note here. I have already tested this and added this to our 3.0 Beta.
$keywords = pp_word_filter( $keywords );
if ( !is_image( $realname ) ) $realname = '';
if ( !is_image( $bigimage ) ) $bigimage = '';
if ( !is_image( $bigimage2 ) ) $bigimage2 = '';
if ( !is_image( $bigimage3 ) ) $bigimage3 = '';
if ( !is_image( $bigimage4 ) ) $bigimage4 = '';
if ( !is_image( $bigimage5 ) ) $bigimage5 = '';
if ( !is_image( $bigimage6 ) ) $bigimage6 = '';
if ( !is_image( $bigimage7 ) ) $bigimage7 = '';
if ( !is_image( $bigimage8 ) ) $bigimage8 = '';
if ( !is_image( $bigimage9 ) ) $bigimage9 = '';
January 11th, 2013, 05:00 PM
Thanks I'll give this a try. Yes, I realize the image size thing is built into the phone and there's no way to invoke that routine in a mobile skin in the browser. I just meant too bad that this was the case.
Thanks for your help.
January 11th, 2013, 05:53 PM
Yeah also I uploaded to your site and my images are not rotated at all. They display the proper orientation but yes you can change it easily.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.