{ask}PHP with GD dan FreeType Support

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
ciremai
Posts: 6
Joined: 31. May 2016, 21:40

{ask}PHP with GD dan FreeType Support

Post 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
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: {ask}PHP with GD dan FreeType Support

Post by laprjns »

Did you install freetype?

Code: Select all

sudo slapt-get -i freetype
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
ciremai
Posts: 6
Joined: 31. May 2016, 21:40

Re: {ask}PHP with GD dan FreeType Support

Post by ciremai »

laprjns wrote:Did you install freetype?

Code: Select all

sudo slapt-get -i 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.
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: {ask}PHP with GD dan FreeType Support

Post 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 
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
ciremai
Posts: 6
Joined: 31. May 2016, 21:40

Re: {ask}PHP with GD dan FreeType Support

Post 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
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: {ask}PHP with GD dan FreeType Support

Post by gapan »

Why are you trying to compile php, and not using the package that is in the repositories?
Image
Image
ciremai
Posts: 6
Joined: 31. May 2016, 21:40

Re: {ask}PHP with GD dan FreeType Support

Post 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?
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: {ask}PHP with GD dan FreeType Support

Post 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.
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: {ask}PHP with GD dan FreeType Support

Post 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:

Code: Select all

--with-gd=shared \
Post Reply