Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

build php5.6 with GD

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
kmchen
Posts: 74
Joined: 2013-04-24 06:29

build php5.6 with GD

#1 Post by kmchen »

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 ?

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: build php5.6 with GD

#2 Post by kmchen »

Somebody there ?

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: build php5.6 with GD

#3 Post by kmchen »

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:

kmchen
Posts: 74
Joined: 2013-04-24 06:29

Re: build php5.6 with GD

#4 Post by kmchen »

What's wrong here ? There is nobody or my question is silly ?

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: build php5.6 with GD

#5 Post by Dai_trying »

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).

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: build php5.6 with GD

#6 Post by GarryRicketson »

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.

Post Reply