Problem with GD on Linux

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
lcwakeman
Forum Newbie
Posts: 1
Joined: Mon Mar 12, 2007 12:57 pm

Problem with GD on Linux

Post by lcwakeman »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I am developing under Windows and using a Linspire (Debian) box for deplyment testing.  I have the following PHP script that is working fine on windows but doesn't work on Linux.

Code: Select all

<?php
header("Content-type: image/jpeg");
$string = base64_decode($_GET['emailTo']);
$im = @imagecreate(strlen($string)*9, 16)
   or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 0, 85, 15);
imagestring($im, 5, 0, 0,  $string, $text_color);
imageline($im,0,15,strlen($string)*9,15, $text_color);
imagejpeg($im);
imagedestroy($im);
?>
From phpinfo()
'../configure'
'--prefix=/usr'
'--with-apxs=/usr/bin/apxs'
'--with-regex=php'
'--with-config-file-path=/etc/php4/apache'
'--disable-rpath'
'--enable-memory-limit'
'--disable-debug'
'--with-layout=GNU'
'--with-pear=/usr/share/php'
'--enable-calendar'
'--enable-sysvsem'
'--enable-sysvshm'
'--enable-track-vars'
'--enable-trans-sid'
'--enable-bcmath'
'--with-bz2'
'--enable-ctype'
'--with-db4'
'--with-iconv'
'--enable-exif'
'--enable-filepro'
'--enable-ftp'
'--with-gettext'
'--enable-mbstring'
'--with-pcre-regex=/usr'
'--enable-shmop'
'--enable-sockets'
'--enable-wddx'
'--disable-xml'
'--with-expat-dir=/usr'
'--enable-yp'
'--with-zlib'
'--without-pgsql'
'--with-kerberos=/usr'
'--with-openssl=/usr'
'--with-exec-dir=/usr/lib/php4/libexec'
'--disable-static'
'--with-curl=shared,/usr'
'--with-dom=shared,/usr'
'--with-dom-xslt=shared,/usr'
'--with-dom-exslt=shared,/usr'
'--with-zlib-dir=/usr'
'--with-gd=shared,/usr'
'--enable-gd-native-ttf'
'--with-jpeg-dir=shared,/usr'
'--with-xpm-dir=shared,/usr/X11R6'
'--with-png-dir=shared,/usr'
'--with-freetype-dir=shared,/usr'
'--with-imap=shared,/usr'
'--with-imap-ssl'
'--with-ldap=shared,/usr'
'--with-mcal=shared,/usr'
'--with-mhash=shared,/usr'
'--with-mm'
'--with-mysql=shared,/usr'
'--with-unixODBC=shared,/usr'
'--with-recode=shared,/usr'
'--enable-xslt=shared'
'--with-xslt-sablot=shared,/usr'
'--with-snmp=shared'
'--enable-ucd-snmp-hack'
'--with-sybase-ct=shared,/usr'
'--with-ttf=shared,/usr'
'--with-t1lib=shared,/usr'
I see that GD is installed shared. Another posts on the forum indicated that I needed to run the package manager to get it going, but that seems to be a RedHat utility. How can I get theis to run with Linspire.


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I believe you are looking for

Code: Select all

> apt-get install php-gd
Post Reply