hi there,
ever since i upgraded to 4.3.8 i have been unable to use any of my previously happy GD scripts - has anyone else experienced this? i can no longer run even the sample GD scripts to test if i have it installed, however i know from phpinfo() that i have GD installed:
gd
GD Support
enabled
GD Version
bundled (2.0.23 compatible)
FreeType Support
enabled
FreeType Linkage
with freetype
GIF Read Support
enabled
JPG Support
enabled
PNG Support
enabled
WBMP Support
enabled
XBM Support
enabled
i am wondering whether my png/jpeg/otherimagetype libraries are messed up now?
comments? thanks.shouldn't be messed up. what do you get with this? it does work in 4.3.8
<?php
Header("Content-type: image/png");
/* create image */
$image = imagecreate(200,200);
/* create color R=100, G=0, R=0 */
$maroon = ImageColorAllocate($image,100,0,0);
/* create color R=255, G=255, R=255 */
$white = ImageColorAllocate($image,255,255,255);
/* create color green */
$green = ImageColorAllocate($image,0,100,0);
/* create white background*/
ImageFilledRectangle($image,0,0,200,200,$white);
/* create frame*/
ImageRectangle($image,10,10,190,190,$maroon);
/* create inner rectangle*/
ImageFilledRectangle($image,50,70,150,150,$maroon);
/* display 5 fonts */ for ($i=1; $i <= 5; $i++)
ImageString($image,$i,15,$i*10,'Test',$green);
/* render image */
ImagePNG($image);
/* cleanup memory */
ImageDestroy($image);
?>hi scoutt,
nope that doesn't work. no errors in the error log either. we have a funky install of php here so i am thinking that the sys-admin who originally installed PHP for me either (a) installed PHP in a weird location, and/or (b) installed the graphics libraries in a weird location.
who knows. all i know is that my current sys-admin (the one who initally installed PHP 2 years ago was asked to leave 6 months ago!) is getting tired of me asking what is up..... he made a nice clean install of PHP but no love from GD.
:bash:
any other ideas anyone?the weird thing is that when running a GD-esque script like scoutt wrote above is that the browser does indeed spit out a PNG file, but it is just a blank white image. no content. but the browser does know it is a PNG or a GIF. but I guess this is because the header content type is hard-coded in.
hmmmmmmmmm....... ?if that didn't work then yeah, your install is hosed. I tested it right before I posted it and you should get a image with text in it.
I would start looking for a new host
ever since i upgraded to 4.3.8 i have been unable to use any of my previously happy GD scripts - has anyone else experienced this? i can no longer run even the sample GD scripts to test if i have it installed, however i know from phpinfo() that i have GD installed:
gd
GD Support
enabled
GD Version
bundled (2.0.23 compatible)
FreeType Support
enabled
FreeType Linkage
with freetype
GIF Read Support
enabled
JPG Support
enabled
PNG Support
enabled
WBMP Support
enabled
XBM Support
enabled
i am wondering whether my png/jpeg/otherimagetype libraries are messed up now?
comments? thanks.shouldn't be messed up. what do you get with this? it does work in 4.3.8
<?php
Header("Content-type: image/png");
/* create image */
$image = imagecreate(200,200);
/* create color R=100, G=0, R=0 */
$maroon = ImageColorAllocate($image,100,0,0);
/* create color R=255, G=255, R=255 */
$white = ImageColorAllocate($image,255,255,255);
/* create color green */
$green = ImageColorAllocate($image,0,100,0);
/* create white background*/
ImageFilledRectangle($image,0,0,200,200,$white);
/* create frame*/
ImageRectangle($image,10,10,190,190,$maroon);
/* create inner rectangle*/
ImageFilledRectangle($image,50,70,150,150,$maroon);
/* display 5 fonts */ for ($i=1; $i <= 5; $i++)
ImageString($image,$i,15,$i*10,'Test',$green);
/* render image */
ImagePNG($image);
/* cleanup memory */
ImageDestroy($image);
?>hi scoutt,
nope that doesn't work. no errors in the error log either. we have a funky install of php here so i am thinking that the sys-admin who originally installed PHP for me either (a) installed PHP in a weird location, and/or (b) installed the graphics libraries in a weird location.
who knows. all i know is that my current sys-admin (the one who initally installed PHP 2 years ago was asked to leave 6 months ago!) is getting tired of me asking what is up..... he made a nice clean install of PHP but no love from GD.
:bash:
any other ideas anyone?the weird thing is that when running a GD-esque script like scoutt wrote above is that the browser does indeed spit out a PNG file, but it is just a blank white image. no content. but the browser does know it is a PNG or a GIF. but I guess this is because the header content type is hard-coded in.
hmmmmmmmmm....... ?if that didn't work then yeah, your install is hosed. I tested it right before I posted it and you should get a image with text in it.
I would start looking for a new host