Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to enable GD in my installation of Apache2, PHP5 and MySQL on my Ubuntu server.

I installed php5-gd with:
apt-get install php5-gd

And when I run php -i I get:


GD Support => enabled
GD Version => 2.0
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.8
T1Lib Support => enabled
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => unknown
PNG Support => enabled
libPNG Version => 1.2.46
WBMP Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 0 => 0

But it does not show up in phpinfo();
I have restarted the server four times and I have tried to restart Apache2 four million times.

Does anyone have any idea of how to fix this problem?

share|improve this question
up vote 2 down vote accepted

It looks like libjpeg62 isn't installed on your server.

Install libjpeg62and restart Apache2.

sudo apt-get install libjpeg62

share|improve this answer
I did not even think about that when I read the error message. – Qzen Oct 19 '12 at 0:50
It seems like its working now. Thanks! – Qzen Oct 19 '12 at 0:51

Are you sure that the php being pointed in your apache webserver is the same as the php you are running in your program?

From what I can see, php -i, is actually running phpinfo();.

If you are in doubt:

   echo '<?php phpinfo(); ?>' | php 
share|improve this answer
But when I do <?php phpinfo(); ?> in a php-file and run it in the browser it doesn't show. – Qzen Oct 18 '12 at 22:01
In /etc/apache2/mods-enabled/php5.load it sais LoadModule php5_module /usr/lib/apache2/modules/ But when i do which php5 it sais /usr/bin/php5. Does that have anything to do with this? – Qzen Oct 18 '12 at 22:13
What about 'which php'? – mdpc Oct 18 '12 at 22:15
which php shows /usr/bin/php – Qzen Oct 18 '12 at 22:16

had the same issue in Windows / Apache. Fixed by using the full path in extension_dir

change: extension_dir = "ext"

to: extension_dir = "c:/progra~1/php5513/ext"

obviously change your path to suit your install folder

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.