You are here: imagecreatetruecolor sometimes causes forced-download of index.php for some JPEG images « PHP Programming Language « IT news, forums, messages
imagecreatetruecolor sometimes causes forced-download of index.php for some JPEG images

Posted by comp.lang.php on 08/04/06 16:22

index.php:

[PHP]
// STUFF
// STEP 1: imagecreatetruecolor ONLY IF GD 2.0+ SUPPORTED AND FOUND
if ($this->isSuccessful && !$hasMogrified && $image && !$newImage &&
function_exists('imagecreatetruecolor') && preg_match('/2\.0/i',
$this->gd_info_array[0])) {
$newImage = @imagecreatetruecolor($configArray['width'],
$configArray['height']);
if (!$newImage) {
$this->isSuccessful = false;
$this->setErrorArray(array('action' => 'Could not seem to create
new image'));
}
}

[/PHP]

This block of code will sometimes, for reasons I just don't understand,
cause a forced-download of the entire index.php script! This is not
even a consistent issue inasmuch as this only happens to certain JPEG
images. I am completely unable to discern a pattern; it happens to
some JPEG images and not to others; furthermore, this behavior does not
occur in GIF or PNG images.

I am using PHP 4.3.9 with GD 2.0.1 in Linux RHEL 4.

Thanx
Phil

 

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

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