Portal Home > Knowledgebase > Articles Database > [PHP] Issues with dynamically generated images

[PHP] Issues with dynamically generated images

Posted by latheesan, 09-20-2009, 03:10 AM
Hello, I use the following function to generate error images: This works fine when i run it on my local web server (XAMPP). But, when i upload the script to the live server, i get the following errors instead: This behaviour was only found in Internet Explorer 8 (don't know about older version of the IE). On firefox, it says the following: What am i doing wrong here? Last edited by latheesan; 09-20-2009 at 03:19 AM.

Posted by fabin, 09-20-2009, 04:57 AM
I have got this error myself in one of my previous project.. The problem seems to be with the function imagecreatetruecolor(), when there is gd2 installed on server ( not sure about this ) Read this page http://us.php.net/manual/en/function...etruecolor.php. Also, compare the php configuration of both machines and find whats missing with GD.

Posted by latheesan, 09-20-2009, 11:41 AM
My local test server (XAMPP) is running PHP Version 5.2.9 and it's configured like so: with GD: http://i33.tinypic.com/27ww32x.png ------------------ My live server is running PHP Version 5.2.6 and it's configured like so: with GD: http://i33.tinypic.com/16c98p3.png ------------------ so, what's my live server missing?

Posted by fabin, 09-20-2009, 12:20 PM
live server missing gd itself?

Posted by fabin, 09-20-2009, 12:23 PM
Try a small script like this in your live server and check how it goes..

Posted by latheesan, 09-20-2009, 04:39 PM
GD is installed and working fine though -> http://infinite-studio.com/dev/test/gd.php

Posted by fabin, 09-20-2009, 04:59 PM
is it returning false at this line?

Posted by fabin, 09-20-2009, 05:06 PM
you might be having "display_errors" setting of PHP turned on in the live server. Try turning it off.

Posted by cselzer, 09-20-2009, 06:08 PM
error_reporting(0); and it will work, your php.ini on your live server has display warnings

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Recommendations Needed (Views: 296)
Cloud I/O Speed Issues (Views: 300)
To VPS.net or not? (Views: 294)