PHP Image Functions and PHP RPMs

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
bdrew
Forum Newbie
Posts: 3
Joined: Fri Jul 21, 2006 8:22 am

PHP Image Functions and PHP RPMs

Post by bdrew »

I'm running PHP with Apache on Fedora 5, all installed from the Fedora RPMs

After getting some basic PHP pages working, I am now trying to the image functions to manipulate JPEGs.

However I'm getting the error "Call to undefined function imagecreatefromjpg".

I am assuming that the Fedora PHP RPM does not have the required --with-gd[=DIR] compile flag set, hence the error message that the PHP funciton is not available.

Could someone please confirm that:

1. My problem is the compiled options of the Fedora RPM.

2. To get this to work I am going to have to compile PHP and install from the source.

3. Do I need to do anything to stop the Fedora update system from automatically overwriting my compiled PHP installation when a new RPM becomes available?

Many thanks

Bryan
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

  1. phpinfo() can answer this
  2. that's how to get GD in non-Windows installs
  3. Don't run update on your new php install? I don't really know as the last time I ran a RedHat install successfully it wasn't called Fedora yet.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

The update manager shouldn't update PHP if you've uninstalled it. If you install it manually from source the RPM system won't be aware that it's installed anyway ;)

EDIT | You can probably download an RPM that has GD compiled into it.... or maybe you can just download an RPM with the correct extensions.
Post Reply