PHP module GD not installed

php
help

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1.When i try to load my owncloud page I get the following error screen.(attached image)
2.I have verified that I have php7.0-gd and php-gd installed.
3.I have loaded php.info from my webserver and didn't see any errors

Expected behaviour
Tell us what should happen

It should load the central page of owncloud. It was working for 4 or 5 days without error.

Actual behaviour
Tell us what happens instead

It loads an error page saying that GD is not installed.

Server configuration
Operating system: Unbuntu 1604 LTS
Web server: Apache2
Database:MySQL
PHP version:7.0
ownCloud version (see ownCloud admin page): 9.0.3
Updated from an older ownCloud or fresh install: Fresh Install
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):No

ownCloud log (data/owncloud.log)

Please paste possible errors in the following code block, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808 for more info

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/gd.so' - /usr/lib/php/20151012/gd.so: undefined symbol: gdImageCreateFromJpegCtx in Unknown on line 0

Integrity status for oC9+

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
That screen is the same as the main screen with the GD not installed message.


#2

Hi,

as this is not an ownCloud issue have you tried to serach for this error here on the net:

This shows a serve issue on your operation system and PHP setup itself.


#3

This ended up being the solution to fix this issue.
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470483)

Anyways (to be sure it doesn't change again), the solution is the folowing:

Problem:
Executing php prints the folowing error:|
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20060613+lfs/gd.so' - /usr/lib/php5/20060613+lfs/gd.so:
undefined symbol: gdImageCreateFromJpeg in Unknown on line 0

more specifically when processing a php page it displays the folowing:
|Fatal error: Call to undefined function imageCreate()
in /home/irc/website/makeworldmap.php on line 13
|
Answer:
There's something wrong with gd itself,|

|/usr/lib/php5/20060613+lfs/gd.so is different from one of a clean install
It actually loads the wrong libgd, which can be found by typing locate libgd
We find other versions of libgd in /usr/local/lib/:
libgd.so, libgd.so.2, libgd.so.2.0.0

do the folowing things:
sudo mkdir libgd.backup
sudo mv libgd.so* libgd.backup
restart apache: sudo /etc/init.d/apache2 restart|