4

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

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?

Qzen
  • 43

3 Answers3

2

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

Install libjpeg62and restart Apache2.

sudo apt-get install libjpeg62

Airikr
  • 136
0

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 
mdpc
  • 11,914
0

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

Jenny D
  • 28,400
  • 21
  • 80
  • 117
Ian
  • 1