Hi,
Having a problem and not really sure where to start looking. I have a PHP file named 'test.png', and the htaccess file makes that run in PHP when called.
PHP code:
As a .php file, this runs fine and a nice red square is produced. As a .png file the following error is produced:
The .htaccess file:
Anyone know what would cause this? The site is running on CentOS 5 with cPanel v11 and PHP5.
Cheers
Having a problem and not really sure where to start looking. I have a PHP file named 'test.png', and the htaccess file makes that run in PHP when called.
PHP code:
Code:
<?php
header("Content-type: image/png");
$image = imagecreate( 200, 200 );
imagecolorallocate($image,200,100,100);
imagepng($image);
imagedestroy($image);
?>
As a .php file, this runs fine and a nice red square is produced. As a .png file the following error is produced:
The image “test.png” cannot be displayed, because it contains errors.
The .htaccess file:
Code:
<Files test.png>
SetHandler application/x-httpd-php5
</Files>
Anyone know what would cause this? The site is running on CentOS 5 with cPanel v11 and PHP5.
Cheers