Hello,
I just finished upgrading my Red Hat 5.2 box from PHP3 to PHP4
with MySQL support and I also upgraded GD from 1.3 to 1.8.3
so that now I have according to <?php phpinfo(); ?> support
for both of them but I have the following problem. I pasted
the PNG code from the manual and tried to view the corresponding
PHP file with netscape but no image appeared and when I clicked
on view page source netscape just crashed. I don't know if this
is the problem but could it be that since I have both gd 1.3
and gd 1.8.3 installed that somehow PHP4 is finding the wrong
version of GD?
[nzanella@tulip nzanella]$ rpm -q gd
gd-1.3-6
gd-1.8.3-4
[root@tulip public_html]# rpm -e gd-1.3-6
error: removing these packages would break dependencies:
libgd.so.1 is needed by linuxconf-1.17r2-6
libgd.so.1 is needed by gnuplot-3.7.1-5
But PHP info says:
PHP Version 4.0.1pl2
gd
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
PNG Support enabled
JPG Support enabled
Why am I having this problem? Is there a problem with the sample
code from the manual or did I misconfigure something? I did
not specify anything after the --with-gd flag since I did
not know whether to specify /usr/lib or /usr/include as my
gd installation directory as Red Hat (correctly) installs gd
files all over the place.
Thanks!
Neil
BTW, here is the PNG code from the manual:
<?php
Header("Content-type: image/png");
$string=implode($argv," ");
$im = imageCreateFromPng("images/button1.png");
$orange = ImageColorAllocate($im, 220, 210, 60);
$px = (imagesx($im)-7.5*strlen($string))/2;
ImageString($im,3,$px,9,$string,$orange);
ImagePng($im);
ImageDestroy($im);
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]