I have PHP 4.1.1, and i need to use php GD library. From where i can get it. my verson will support it or not.
Problem related to Gd library
Collapse
X
-
-
Hi
I'm in PHP Version 4.4.4 and the configure command contains: (checking through <?php phpinfo()?>
'../configure' '--with-pear' '--with-mysql=/usr' '--with-zlib' '--enable-debug=no' '--enable-safe-mode=no' '--enable-discard-path=no' '--with-gd' '--with-png-dir=/usr/lib' '--enable-track-vars' '--with-db' '--with-gdbm' '--enable-force-cgi-redirect' '--with-ttf=/usr/' '--enable-ftp' '--with-mcrypt' '--enable-dbase' '--enable-memory-limit' '--enable-calendar' '--enable-wddx' '--with-jpeg-dir=/usr/src/kundenserver/jpeg-6b' '--enable-bcmath' '--enable-gd-imgstrttf' '--enable-shmop' '--enable-mhash' '--with-mhash=/usr/src/kundenserver/mhash-0.8.9/' '--with-openssl' '--enable-xslt' '--with-xslt-sablot' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--with-imap' '--with-curl' '--with-iconv=/usr/local' '--with-freetype-dir=/usr/include/freetype2' '--with-bz2' '--with-gettext' '--enable-exif' '--with-idn' '--enable-mbstring=all'
Though I can see '--with-gd'...but when I run gd proglrm as below (and other examples from gd library site, all the results are a lot of unreadable code not drawing. I'm in 1and1 php server. How can I enable gd library? Please help. Thanks!
<?php
Header("Content-type: image/png");
$height = 300;
$width = 300;
$im = ImageCreate($wi dth, $height);
$bck = ImageColorAlloc ate($im, 10,110,100);
$white = ImageColorAlloc ate($im, 255, 255, 255);
ImageFill($im, 0, 0, $bck);
ImageLine($im, 0, 0, $width, $height, $white);
for($i=0;$i<=29 9;$i=$i+10) {
ImageLine($im, 0, $i, $width, $height, $white); }
ImagePNG($im);
?>Comment
Comment