$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>plugins - After WP installation no GD lib recognition despite module is installed|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

plugins - After WP installation no GD lib recognition despite module is installed

matteradmin8PV0评论

Centos 6 sys with php5.3.3, php5.6 and php7.0.
Virtual Host set with php5.3.3 Just installed WP.
Adding a plugin I get:

Adaptive Images Error — PHP GD image library missing
The PHP GD image library is not detected in your server. ...

php -m | grep -i gd

gd

rpm -qa | grep php

rh-php70-php-gd-7.0.27-1.el6.x86_64
php-gd-5.3.3-49.el6.x86_64

I could successfully installed the same plugin in another WP installation (different virtual host, same server and php version) I have long time ago.
I don't realize what's going on. I created the virtual host using Virtualmin.
Also switched from 5.3.3 to 7.0 php version but GD wasn't found too

Centos 6 sys with php5.3.3, php5.6 and php7.0.
Virtual Host set with php5.3.3 Just installed WP.
Adding a plugin I get:

Adaptive Images Error — PHP GD image library missing
The PHP GD image library is not detected in your server. ...

php -m | grep -i gd

gd

rpm -qa | grep php

rh-php70-php-gd-7.0.27-1.el6.x86_64
php-gd-5.3.3-49.el6.x86_64

I could successfully installed the same plugin in another WP installation (different virtual host, same server and php version) I have long time ago.
I don't realize what's going on. I created the virtual host using Virtualmin.
Also switched from 5.3.3 to 7.0 php version but GD wasn't found too

Share Improve this question edited Feb 10, 2019 at 23:47 dstonek asked Feb 10, 2019 at 22:22 dstonekdstonek 1035 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

It was a Virtualmin control panel issue.
It displayed a wrong php version used by this Virtual Host. Virtual hosts template is set to use 5.3.3 by default (user can change it later) and it is as it was displayed but phpinfo() displayed 5.6 w/o GD module.
As stated in the question, only 5.3.3 and 7.0 were installed with DG from Virtualmin repositories.
So I solved that installing GD for php5.6 from Centos repositories.
I also have to point out that from Virtualmin CP I "changed" php version to php7.0 but it seems that was not successful because WP still complained about lacking GD.

The versions of PHP and libraries used by the command line (shell) and by the web server (Apache) can be quite different. It might be that the Virtualmin CP switched the command line over to PHP 7 (and associated libraries), but didn't reconfigure Apache. It might be instructive to compare php --ini (or just php -i) with phpinfo(). Apache's use of PHP is via mod_php (see http://php/manual/en/configuration.changes.php) but config. might be less direct in your environment.

Added
Another possibility is that Apache was re-configured but not re-started (or perhaps just a re-load is needed). (For background, understand that, for efficiency, Apache only reads some config files on load (after start) or on reload, not with every incoming request.)

Post a comment

comment list (0)

  1. No comments so far