LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-22-2010, 12:30 AM   #1
rozihan
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Rep: Reputation: 0
Thumbs down php 5.2.9 - reconfigure to support gd


hi

i'm newbie here.when i try to use gd in my web application,it says that i didn't install gd support.

howto install php gd support to my existing php installation? i use php 5.2.9 for slackware.

Code:
PHP Version 5.2.9 

System  :Linux jbendkck1 2.6.29.6-smp #2 SMP Mon Aug 17 00:52:54 CDT 2009 i686  

Build Date : May 4 2010 18:04:55  

Configure Command : './configure' '--with-mysql' '--with-apxs2=/usr/local/httpd/bin/apxs'  

Server API : Apache 2.0 Handler  

Virtual Directory Support : disabled  

Configuration File (php.ini) Path  /usr/local/lib  

Loaded Configuration File  /usr/local/lib/php.ini  

Scan this dir for additional .ini files  (none)  

additional .ini files parsed  (none)  

PHP API  20041225  

PHP Extension  20060613  

Zend Extension  220060519  

Debug Build  no  

Thread Safety  disabled  

Zend Memory Manager  enabled  

IPv6 Support  enabled  

Registered PHP Streams  php, file, data, http, ftp  

Registered Stream Socket Transports  tcp, udp, unix, udg  

Registered Stream Filters  string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*
 
Old 09-22-2010, 03:54 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

The easiest way is to get the latest php-5..2.14 (for security reasons) and compile it, adding the necessary options for gd in the ./configure script used to compile php-5.2.9. Eg:
Code:
./configure --with-mysql --with-apxs2=/usr/local/httpd/bin/apxs  --with-gd --with-zlib-dir --with-jpeg-dir --with-png-dir
If for some reason you don't want to go this way, here is what you can do to install gd as an extension.
Go into the php-5.2.9 sources directory and run:
Code:
cd ext/gd
phpize
./configure --with-zlib-dir --with-jpeg-dir --with-png-dir --with-freetype-dir
make
su -
make install
Watch the last lines of make install to see where gd.so is copied (something like /usr/local/lib/php/extensions/no-debug-XYZ)
After that open php.ini and make sure you use:
Code:
extension_dir=/usr/local/lib/php/extensions/no-debug-XYZ
extension=gd.so
Restart apache and you should have gd support in php.

Regards

Last edited by bathory; 09-22-2010 at 03:56 AM.
 
1 members found this post helpful.
Old 09-22-2010, 04:15 AM   #3
rozihan
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
thanks for reply.

i'm try with your 2nd solution but having an error when run "make"
sorry..i'm really newbie.


Code:
root@jbendkck1:/home/zihan/serverfile/php-5.2.9/ext# cd gd
root@jbendkck1:/home/zihan/serverfile/php-5.2.9/ext/gd# ls
CREDITS    config.w32  gd.dsp    gdcache.c  gdttf.c  libgd/    tests/
config.m4  gd.c        gd_ctx.c  gdcache.h  gdttf.h  php_gd.h
root@jbendkck1:/home/zihan/serverfile/php-5.2.9/ext/gd# phpize ./configure --wit
h-zlib-dir --with-jpeg-dir --with-png-dir --with-freetype-dir
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
configure.in:144: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): sus
picious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3535: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5473: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5472: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2952: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2932: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2895: AC_PROG_LIBTOOL is expanded from...
configure.in:144: the top level
configure.in:144: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspic
ious cache-id, must contain _cv_ to be cached
aclocal.m4:3490: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7600: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:144: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): su
spicious cache-id, must contain _cv_ to be cached
aclocal.m4:5586: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5585: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4621: _LT_AC_TAGCONFIG is expanded from...
configure.in:144: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): sus
picious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3535: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5473: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5472: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2952: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2932: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2895: AC_PROG_LIBTOOL is expanded from...
configure.in:144: the top level
configure.in:144: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspic
ious cache-id, must contain _cv_ to be cached
aclocal.m4:3490: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7600: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:144: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): su
spicious cache-id, must contain _cv_ to be cached
aclocal.m4:5586: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5585: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4621: _LT_AC_TAGCONFIG is expanded from...
root@jbendkck1:/home/zihan/serverfile/php-5.2.9/ext/gd# make
make: *** No targets specified and no makefile found.  Stop.
root@jbendkck1:/home/zihan/serverfile/php-5.2.9/ext/gd# ls
CREDITS          config.guess*  configure.in  gdttf.c     mkinstalldirs
Makefile.global  config.h.in    gd.c          gdttf.h     php_gd.h
acinclude.m4     config.m4      gd.dsp        install-sh  run-tests.php
aclocal.m4       config.sub*    gd_ctx.c      libgd/      tests/
autom4te.cache/  config.w32     gdcache.c     ltmain.sh
build/           configure*     gdcache.h     missing
 
Old 09-22-2010, 04:29 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You forgot to run phpize before anything else. It's use to prepare the extension for compiling.
Now I guess you have to run "make distclean" into the gd directory and start over.
 
Old 09-23-2010, 04:41 AM   #5
rozihan
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thumbs up

thanks buddy..

wowww..it successfull install gd support.once again..thanks
 
Old 04-17-2011, 09:49 PM   #6
Acer2004
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 0
Thumbs up Thanks alot

After googling, and visiting a lot of pages, My problem is solved

Thank you
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reconfigure php? ZAMO Linux - Software 4 04-26-2007 07:46 AM
php with gd support ryedunn Linux - Software 5 05-21-2005 01:41 PM
Apache+Postgresql+PHP. reconfigure? vickr1z Linux - Newbie 2 08-23-2004 02:58 AM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM
PHP, Apache reconfigure to support Databases aaronsols Programming 0 04-20-2002 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration