You are here: Re: rare, intermittent bug with getimagesize ? « PHP Programming Language « IT news, forums, messages
Re: rare, intermittent bug with getimagesize ?

Posted by lawrence k on 09/12/06 16:48

lawrence k wrote:
> I've got an intermittent bug that is very hard to trace. On my site, if
> I log into a new account and try to upload some images, something goes
> wrong the first time. Everything works fine after the first time, but
> the first time getimagesize fails to return a type, which is blank in
> the following error messge. I'm going to check for weird path issues
> that might be related to first login, but is anyone aware of situations
> where getimagesize doesn't return a type?
>
>
> list ($w, $h, $type, $attr) = getimagesize ($src_path);
> if (($side = $w) > $h) $side = $h;
> $dst = imagecreatetruecolor (PHOTO_SIDEX, PHOTO_SIDEY);
>
> if ($type == 1 || $type == 2 || $type == 3 || $type == 6) {
> /// lots of code goes here
> } else {
> $controller->error("In makeCroppedPhoto the type of image was '$type'
> for image '$src_path' which is not an allowed type. All that is allowed
> is gif(1), jpg(2), png(3) and bmp(6)."); }


Additional testing makes this seem even more odd. fileperms() returns
33279 which is -rwxrwxrwx

a mime-type command I have correctly returns "image/jpeg"

but getimagesize is returning blank. when i hit it with print_r I get
nothing

And all of the 3 above commands are being handed the same address.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация