Page 1 of 1
{ask}PHP with GD dan FreeType Support
Posted: 31. May 2016, 22:08
by ciremai
I want to install PHP 5.6 with GD dan FreeType enabled. I was following this tutorial
http://www.thegeekstuff.com/2013/10/enable-gd-php/
but no success. The GD was succesfully installed but the FreeType was not.
Below is my PHP configuration,
Code: Select all
'./configure'
'--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-mysql'
'--with-mysqli'
'--with-pdo-mysql'
'--with-mcrypt'
'--enable-soap'
'--with-zlib'
'--with-curl'
'--enable-mbstring'
'--with-gd'
'--with-freetype-dir=/usr'
'--with-jpeg-dir=/usr'
'--enable-gd-native-ttf'
'--with-png-dir=/usr'
'--with-zlib-dir=/usr'
And this is the GD section from phpinfo()
Code: Select all
GD Support enabled
GD Version bundled (2.1.0 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
libPNG Version 1.4.12
WBMP Support enabled
XBM Support enabled
there is no "FreeType-support enabled" over there.
thanks before
Re: {ask}PHP with GD dan FreeType Support
Posted: 1. Jun 2016, 00:47
by laprjns
Did you install freetype?
Re: {ask}PHP with GD dan FreeType Support
Posted: 1. Jun 2016, 03:42
by ciremai
laprjns wrote:Did you install freetype?
yes, I think it's installed in /usr directory.
Code: Select all
$sudo slapt-get -i freetype
Reading Package Lists...Done
freetype is up to date.
0 upgraded, 0 reinstalled, 0 newly installed, 0 to remove, 0 not upgraded.
Re: {ask}PHP with GD dan FreeType Support
Posted: 1. Jun 2016, 10:25
by laprjns
Maybe get rid of the tics (') and used the backslash on each line to continue the "configure" command.
Code: Select all
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
-with-mysqli \
--with-pdo-mysql \
--with-mcrypt \
--enable-soap \
--with-zlib \
--with-curl \
--enable-mbstring \
--with-gd \
--with-freetype-dir=/usr \
--with-jpeg-dir=/usr \
--enable-gd-native-ttf \
--with-png-dir=/usr \
--with-zlib-dir=/usr
Re: {ask}PHP with GD dan FreeType Support
Posted: 1. Jun 2016, 11:33
by ciremai
laprjns wrote:Maybe get rid of the tics (') and used the backslash on each line to continue the "configure" command.
Code: Select all
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
-with-mysqli \
--with-pdo-mysql \
--with-mcrypt \
--enable-soap \
--with-zlib \
--with-curl \
--enable-mbstring \
--with-gd \
--with-freetype-dir=/usr \
--with-jpeg-dir=/usr \
--enable-gd-native-ttf \
--with-png-dir=/usr \
--with-zlib-dir=/usr
Thanks. Actually my real PHP configuration was like this
Code: Select all
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql --with-mcrypt --enable-soap --with-zlib --with-curl --enable-mbstring --with-gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --enable-gd-native-ttf --with-png-dir=/usr --with-zlib-dir=/usr
I try your suggestion and restart apache server but the result is the same.
I read from stackoverflow that there is a package called php5-gd that will enable GD and FreeType as well. Is there a similar package in Salix?
http://stackoverflow.com/questions/2121 ... e-on-linux
Re: {ask}PHP with GD dan FreeType Support
Posted: 1. Jun 2016, 17:59
by gapan
Why are you trying to compile php, and not using the package that is in the repositories?
Re: {ask}PHP with GD dan FreeType Support
Posted: 2. Jun 2016, 00:32
by ciremai
gapan wrote:Why are you trying to compile php, and not using the package that is in the repositories?
If I have to use PHP package from repositories how do I uninstall current PHP installation?
having read from here
http://www.linuxquestions.org/questions ... hp-837310/
there are two options, either remove all files and folders from following locations
Code: Select all
$ whereis php
php: /usr/local/bin/php /usr/local/lib/php /usr/local/lib/php.ini /usr/local/lib/php.ini~ /usr/local/php
or re-configure and "make uninstall". Or is there a better way?
Re: {ask}PHP with GD dan FreeType Support
Posted: 2. Jun 2016, 09:11
by gapan
ciremai wrote:If I have to use PHP package from repositories how do I uninstall current PHP installation?
I don't know. You should know. You installed that.
Re: {ask}PHP with GD dan FreeType Support
Posted: 2. Jun 2016, 16:45
by mimosa
re-configure and "make uninstall"
Try that - it's probably your best bet.
In general, working with what's in the repositories (using Salix package management) is the safest starting-point. It may well be that in this case, it would have met your needs.
If it doesn't, it might be worth looking at the Slackware package and experimentally rebuilding it with minimal changes the the configure options:
http://www.mirrorservice.org/sites/down ... SlackBuild
However, looking quickly through them, it does seem as though gd should be enabled - whatever that is: