Reply to rare, intermittent bug with getimagesize ?

Your name:

Reply:


Posted by lawrence k on 09/12/06 14:47

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)."); }

[Back to original 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

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