Computer Science Canada

GD...w/e! HELP!

Author:  Amailer [ Sat Sep 06, 2003 9:19 pm ]
Post subject:  GD...w/e! HELP!

code:

<?php
header ("Content-type: image/png");
$im = @imagecreatetruecolor (50, 100)
      or die ("Cannot Initialize new GD image stream");
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 1, 5, 5,  "A Simple Text String", $text_color);
imagepng ($im);
imagedestroy ($im);
?>



Error:
code:

The image "http://termix-zero.ath.cx/scripts/GD.php" cannot be displayed, because it contains errors.


Or in other words (IE) broken link.

WHY!
HELP!
[script from php.net]

-- http://termix-zero.ath.cx/scripts/GD.php ---
See whats wrong :S!

PHP VERSION: 4.3.3 (w/e the latest is)

Author:  Tony [ Sat Sep 06, 2003 11:31 pm ]
Post subject: 

does IE support png image format?

Author:  octopi [ Sun Sep 07, 2003 1:07 am ]
Post subject: 

You don't have gd installed.


IE does support png's, except for transparent ones, which it shows the transparent part as grey. (50/50 w/b)

Author:  Asok [ Sun Sep 07, 2003 1:25 am ]
Post subject: 

.php extention is not an image extention

Author:  Blade [ Sun Sep 07, 2003 3:03 am ]
Post subject: 

no, but you can create images with php....
Posted Image, might have been reduced in size. Click Image to view fullscreen.
http://avatar.dblade.sytes.net/test.php
.... meh its nothing right now, but i'm learning how to do fractals..

its alot like octopi's avatar... his is a perl script

Author:  Amailer [ Sun Sep 07, 2003 6:31 am ]
Post subject: 

where can i get it to install it?
Or it is in the php.ini or some dll???idk!

Author:  octopi [ Sun Sep 07, 2003 7:08 am ]
Post subject: 

remove the ';' from the line in your php.ini file that looks similar to below


extention=*gd*.dll

I don't know the specific name...but it can't be too hard to find.

Make sure you have the proper dll in the folder.

Author:  Amailer [ Sun Sep 07, 2003 7:59 am ]
Post subject: 

SAYS MODULE NOT FOUND!!! AHAHAH!
extension=php_gd.dll

ahha grr help!

Author:  octopi [ Sun Sep 07, 2003 1:50 pm ]
Post subject: 

Make sure the php_gd.dll is in the extention_dir, and make sure you have the file....if you don't find one that is compatible with your version of php, or else you will get insane errors.

Author:  Amailer [ Sun Sep 07, 2003 2:24 pm ]
Post subject: 

rit..lets find that dir brb
Err no such dir..where is that dir suppose to be?

and i don't havee the php_gd.dll or w/e

Author:  Homer_simpson [ Sun Sep 07, 2003 3:59 pm ]
Post subject: 

here u go

Author:  Amailer [ Sun Sep 07, 2003 4:09 pm ]
Post subject: 

, thanks dude.
Now the extensions dir..where does that have to be in?

Author:  Amailer [ Sun Sep 07, 2003 4:13 pm ]
Post subject: 

ERROR!

Author:  octopi [ Sun Sep 07, 2003 6:31 pm ]
Post subject: 

Seriously, does no one listen?

octopi wrote:
Make sure the php_gd.dll is in the extention_dir, and make sure you have the file....if you don't find one that is compatible with your version of php, or else you will get insane errors.

Author:  Amailer [ Sun Sep 07, 2003 6:56 pm ]
Post subject: 

No hehe j/k
Ok, i need 1 for v4.3.3!

Where can i get it?

Author:  Homer_simpson [ Sun Sep 07, 2003 7:58 pm ]
Post subject: 

"googled it" i also know how to use google Wink Laughing
http://rpm.pbone.net/index.php3/stat/4/idpl/699307/com/php-gd-4.3.3-1.1.i586.rpm.html

Author:  octopi [ Sun Sep 07, 2003 8:01 pm ]
Post subject: 

....rpm's are for redhat linux (and other distro's)....not for windows.


If your using 4.3.3 then you probally already have it.
You just using the wrong dll file. Look for php_gd2.dll

If you don't have it then download it....

You should be able to find the right place by yourself...but I will be nice and include a link:

http://ca2.php.net/get/php-4.3.3-Win32.zip/from/a/mirror

Author:  Amailer [ Sun Sep 07, 2003 9:35 pm ]
Post subject: 

Thanks :S


: