Installing GD?

has anyone been successful in installing the GD module (or even better, ImageMagick) for use in PHP scripts? do i have to install my own version of PHP to get this running, or could i (hopefully) just install the GD module and get it to run with the existing version?


you have to install your own, although we may have it setup with the php-as-CGI version of PHP pretty soon.

i believe it’s setup now (with that version), but it’s experimental, and currently only has support for PNG images.

compiling your own is probably the best bet for the time being.

hmm. okay. question about that, then. i have the source for the latest version of php, but the installation instructions mention installing apache as well, which obviously isn’t necessary as i am not running my own server. should i install php as a standalone cgi program?

yes; to run your own version of PHP, or even to run ours without certain security restrictions, you’ll need to run PHP as a cgi.

these articles have some information that may be helpful (if you haven’t already read them).

hope this helps.

thanks for the help. i’ve been working on this all day and found considerable documentation on installing php as cgi. however in order to compile the binaries, they expect to be going in a directory other than /home/myusername/php. (/usr/var/bin?) therefore i ran a “–prefix=/dir/i/want” with the ./configure script and i keep getting errors… do i need to do something else? does this require root or am i just dumb?

I know that other customers have done this successfully (it’s not super easy, but it’s possible). Building it doesn’t / shouldn’t require root access.

./configure --prefix=/home/your_username --other-options-here
should work…

What kind of errors are you getting?

okay… i gave up on the whole compiling gd and php thing and i just want to install the standalone imagemagick package (my php-cgi script works fine otherwise and i can’t find another one with the features this has). the package i’m running uses either gd or imagemagick, and imagemagick does better quality thumbnails. i installed the binaries in my home dir, in /home/myusername/ImageMagick, but my script can’t seem to find ‘convert’… is there some special configuration i should run at the command prompt, or is it even possible in the first place to run my own custom binaries? thanks for your help so far!

imagemagick is already installed on the hosting machines, so you can use /usr/bin/convert if you want (and if our version is recent enough for you).

otherwise you’ll probably need to tell the script the path to your binaries… most likely ~/bin/convert (/home/username/bin/convert).

After a few unsuccessful attempts to link convert to /usr/bin/convert, I ran: %whereis convertImageMagick binaries do not live in /usr/bin as will reports. Instead, they live in /usr/X11R6/bin or /usr/bin/X11.

Keep this in mind when linking to convert or any other ImageMagick tool.

Over and out…
– Ed

PS – This was on I don’t know if other machines differ.

It depends. You’re right that on most of the hosting machines it’s in /usr/bin/X11… however once we upgrade to Woody, it will be in /usr/bin.

Sorry for any confusion… I must have checked on a machine that’s already running the newer release of Debian.