build php5.6 with GD

Kernels & Hardware, configuring network, installing services

build php5.6 with GD

Postby kmchen » 2018-10-15 07:06

Hi,
I installed php5.6-fpm as additional extension on Debian 9 for an old web site. I added old extensions mysql and gd that way:

cd /usr/local/src/php5.6-build/php-5.6.33
./configure --prefix=/opt/php-5.6 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl=/opt/openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm --with-mysql --with-gd

compiled and installed without problems. Mysql connection works fine after some adaptations and
the GD extension seems to be fine:

root@ns1:/var/www/webologix.com/web# /opt/php-5.6/bin/php -r "echo phpinfo();" | grep with-gd
Configure Command => './configure' '--prefix=/opt/php-5.6' '--with-pdo-pgsql' '--with-zlib-dir' '--with-freetype-dir' '--enable-mbstring' '--with-libxml-dir=/usr' '--enable-soap' '--enable-calendar' '--with-curl' '--with-mcrypt' '--with-pgsql' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-zlib' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-pcntl' '--enable-mbregex' '--enable-exif' '--enable-bcmath' '--with-mhash' '--enable-zip' '--with-pcre-regex' '--with-pdo-mysql' '--with-mysqli' '--with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--with-openssl=/opt/openssl' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--with-libdir=/lib/x86_64-linux-gnu' '--enable-ftp' '--with-kerberos' '--with-gettext' '--with-xmlrpc' '--with-xsl' '--enable-opcache' '--enable-fpm' '--with-mysql' '--with-gd'

but the old web site still complains about GD library with that type of message:

Creating thumbnail from JPG, 600 x 800...
GD image library not installed!

Any idea ?
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 29
Joined: 2013-04-24 06:29

Re: build php5.6 with GD

Postby kmchen » 2018-10-16 05:19

Somebody there ?
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 29
Joined: 2013-04-24 06:29

Re: build php5.6 with GD

Postby kmchen » 2018-10-16 05:41

It seems that I should install and give the GD location at configure --with-mysql=path_to_gd
But I don't know where it is.
Tried that:
root@ns1:/usr/local/src/php5-build/php-5.3.29# dpkg -l *gd*
...
un libgd-tools <none> <none> (no description available)
ii libgd3:amd64 2.2.4-2+deb9u amd64 GD Graphics Library
ii libgdbm3:amd64 1.8.3-14 amd64 GNU dbm database routines (runtime vers
un myspell-gd <none> <none> (no description available)
un php-gd <none> <none> (no description available)
ii php7.0-gd 7.0.30-0+deb9 amd64 GD module for PHP

root@ns1:/usr/local/src/php5-build/php-5.3.29# apt-get install php-gd
Reading package lists... Done
Building dependency tree
...
Unpacking php-gd (1:7.0+49) ...
Setting up php-gd (1:7.0+49) ...

root@ns1:/usr/local/src/php5-build/php-5.3.29# whereis php-gd
php-gd:
root@ns1:/usr/local/src/php5-build/php-5.3.29# whereis gd
gd:
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 29
Joined: 2013-04-24 06:29

Re: build php5.6 with GD

Postby kmchen » 2018-10-16 15:56

What's wrong here ? There is nobody or my question is silly ?
Développeur WEB
http://www.webologix.com
kmchen
 
Posts: 29
Joined: 2013-04-24 06:29

Re: build php5.6 with GD

Postby Dai_trying » 2018-10-17 07:58

I have never done what you are trying to do so cannot really offer too much advice on it but one thing that might be affecting this is the bug?/feature of su where you would need to use su - to get the $PATH variable populated which has been mentioned quite a lot in the forum recently.

As for a reason why nobody has/can answer you it is quite likely that nobody else currently browsing the forum has done this either, I usually just install the php packages I need when setting up a server as the method you are using would seem (to me) to be very inefficient to update, that is if an update comes out for php-gd you would have to go through your entire process again to have it updated (unless I have misunderstood what you are doing).
Dai_trying
 
Posts: 557
Joined: 2016-01-07 12:25

Re: build php5.6 with GD

Postby GarryRicketson » 2018-10-17 10:02

Well, I am not a professional "webdeveloper" , or anything like that, but when ever I have problems with php and mysql, I go to their web sites, if I don't find a solution in their documentation, then I ask them. For PHP : http://www.php.net/support.php
I don't know what else to say, I have not ever had this problem myself.
I wouldn't expect to get much help here, so that is why I all ways have looked for solutions to PHP and Mysql problems , else where.
User avatar
GarryRicketson
 
Posts: 5163
Joined: 2015-01-20 22:16
Location: Durango, Mexico


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable