LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 02-15-2007, 10:24 AM   #1
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Rep: Reputation: 0
MediaWiki thumbnail error Incomplete GD library configuration: missing function image


Hi

i'm trying to add thumbnail images in my mediawiki wiki on linux mandrake 9.0 however if i view the image as full size it displays it no prob. However as a thumb i get the message

Incomplete GD library configuration: missing function imagecreatefromjpeg

so i tried downloading gd-2.0.34 unzipped it and ran

./configure
make
make install

and it appears to have installed ok. however the problem still remains and i can't view the thumbnails.

can anyone help?

Thanks Matt.
 
Old 02-15-2007, 11:19 AM   #2
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Do you have gd enabled in PHP? If not you can probably install it with your distros package manager.
 
Old 02-15-2007, 11:53 AM   #3
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
not sure how would i check whether or not i've got gd enabled in PHP?

matt
 
Old 02-15-2007, 11:59 AM   #4
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Create a file named info.php with the contents of:

<?php

phpinfo();

?>

Then put the file in your webroot directory and open it in your browser:

http://servername/info.php

You should see a page with details about your PHP install. If you have gd installed with PHP you should see a Section called GD and it should say it's enabled.
 
Old 02-16-2007, 05:51 AM   #5
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
thanks for the reply.

there is no gd section in i assume i must have installed the gd library wrongly? can anyone help me do this then? as i dont want to risk bringing the wiki down.

heres the output to info.php

System
Linux SQUIRTEL2 2.4.19-16mdk #1 Fri Sep 20 18:15:05 CEST 2002 i686


Build Date
Dec 5 2006 15:31:11


Configure Command
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-libxml-dir=/usr/local'


Server API
Apache 2.0 Handler


Virtual Directory Support
disabled


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


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

if you need any more info let me know thanks.

matt
 
Old 02-16-2007, 09:01 AM   #6
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Which Distro are you using? From your first post I assume you compiled gd yourself, did you compile PHP as well? If you did compile PHP all you'll have to do is recompile it wich shouldn't affect the running wiki.

If you're going to recompile PHP to enable gd do a:

Quote:
./configure --help
And look for gd in the output. There should be something like --with-gd=path_name so when you do your ./configure it'll be something like:

Quote:
./configure --with-gd=/usr/local/gd (or wherever the directory where you compiled gd is)
Once you've recompiled you'll just need to restart Apache to use the new PHP binaries with gd support.

If you're using a rpm based distro you should be able to install a package that already enables gd look for something like php-gd.
 
Old 02-19-2007, 05:52 AM   #7
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Hi yes i didnt copile and install php 5.2.0 myself.

i've begun to recompile php again however i get this error now and wonder if you know wha it means. I pulled this ./configure line from the media wiki website.
'./configure' '--with-mysql' '--without-sqlite' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib' '--with-ldap' '--with-gd' '--with-jpeg-dir=/usr/local/lib' '--with-iconv-dir' '--enable-mbstring'

and i changed the apxs2 to be '--with-apxs2=/usr/sbin/apxs2'

when i use this config i get the error

configure: error: libjpeg.(a|so) not found.

now i have downloaded and installed libjpeg-6b and done the following

./configure
make install

this seems to have installed the libjpeg librar. however i still get the error.

Thanks Matt.
 
Old 02-19-2007, 09:52 AM   #8
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Is this where you installed libjpeg?

'--with-jpeg-dir=/usr/local/lib'

If not you should point it to where you compiled it. Do you really need libjpeg? If not I'd try removing that entry and just going with what you know you absolutely need.

Once you have it working and you find out you do need some extra functionality you can always recompile with the correct flags. My advice is to document which flags you do use so if you do need to recompile later you won't miss them.
 
Old 02-20-2007, 04:46 AM   #9
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
thanks for the reply.

yes i have tried using the /usr/local/lib and also /usr/lib/bin (this was where the make install seemed to be putting the files, bearing in mind i simply used all the deefault options i.e.

./configure
make install

i didnt want to remove them as i thought they may be needed to get my problem solved. ok ive removed the --with-jpeg-dir=/usr/local/lib'. I now get the following error

If configure fails try --with-jpeg-dir=<DIR>
configure: error: libpng.(a|so) not found.

so i changed '--with-gd' to be '--with-gd=/usr/local/include' (where the gd.h file is held which i found using find command)

i then get the following

configure: error: Unable to find libgd.(a|so) anywhere under /usr/local/include

any ideas?

Matt
 
Old 02-20-2007, 07:02 AM   #10
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
just to update i downloaded the libpng package and have installed this and now get the error

configure: error: Cannot find ldap.h

when trying to configure php

any ideas to get around this?
 
Old 02-20-2007, 08:29 AM   #11
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
That's the options for LDAP support. If you don't need it don't put in the following:

'--with-ldap'

If you do need LDAP support in PHP then you'll need to install OpenLDAP or another LDAP server that PHP works with. I'm really only familiar with OpenLDAP, but I'd think others would be supported. Anyway, you probably don't have it enabled now so I'd just disable it and see if it will build.
 
Old 02-21-2007, 04:32 AM   #12
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Ok. i've removed this. i did download the openldap package but it was asking for some kind of db to be installed also so thought i shoul check with you before i went aheaqd installing it all. Just in case my stupidness brought the wiki down. what exactly is the openldap for?

again i wasnt sure if this would be needed to help solve my problem. i did configure again without this

'./configure' '--with-mysql' '--without-sqlite' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib' '--with-gd' '--with-iconv-dir'

and got the following error

configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!

so i changed the config to

'./configure' '--with-mysql=/usr/local/mysql' '--without-sqlite' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib' '--with-gd' '--with-iconv-dir'

which configured no problem.

i then ran

make
make install

restarted apache

/usr/local/apache2/bin/apachectl restart

however when i then use the wiki the problem still remains on my thumbnail? any ideas.

thanks matt.
 
Old 02-21-2007, 08:49 AM   #13
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Mmmmm...You might make sure gd is enabled by going back to the info.php file you setup earlier. The other thing you might try it to change your '--with-gd' to:

Quote:
--with-gd=/path/to/gd
And then see if the thumbnails work.

OpenLDAP is an open source LDAP server. LDAP stands for Light Weight Directory Access Protocol. Basically it's another way to authenticate users, and also store user information such as name, address, email, etc. If your storing all your user information in the MySQL database then at this time you really don't need to enable it.
 
Old 02-28-2007, 10:00 AM   #14
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
hi i compile the gd using the defualts, i.e. ./configure, make, make install

i then use the following to configure php

'./configure' '--with-mysql=/usr/local/mysql' '--without-sqlite' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib' '--with-gd=/usr/local/' '--with-iconv-dir'

this compile ok however when i make php i get the error
/home/matt/php-5.2.0/ext/gd/gd.c:5030: undefined reference to `php_gd_gdImageSmooth'
ext/gd/.libs/gd.o: In function `zif_imageconvolution':
/home/matt/php-5.2.0/ext/gd/gd.c:5112: undefined reference to `php_gd_gdImageConvolution'
ext/gd/.libs/gd.o: In function `zif_imageantialias':
/home/matt/php-5.2.0/ext/gd/gd.c:5138: undefined reference to `php_gd_gdImageAntialias'
ext/gd/.libs/gd.o: In function `php_free_gd_image':
/home/matt/php-5.2.0/ext/gd/gd.c:1176: undefined reference to `php_gd_gdImageDestroy'
ext/gd/.libs/gd.o: In function `_php_image_bw_convert':
/home/matt/php-5.2.0/ext/gd/gd.c:4650: undefined reference to `php_gd_gdImageWBMPCtx'
collect2: ld returned 1 exit status

(i supplied a bit of the print out too) its seems to not find the gd library. any ideas?
 
Old 02-28-2007, 10:17 AM   #15
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Okay I think you've got the wrong directory for your "--with-gd=/usr/local". You'll need to specify the directory where the gd library files are. There should be an "include" directory when you installed gd.

Check somewhere under /usr/local/lib for
Quote:
libgd.so
file. There will probably be version numbers at the end of it. Where ever that file is put that directory in your --with-gd= argument:
Quote:
--with-gd=/usr/local/lib
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Turn off image thumbnail caching on KDE 3.5.2?? JamesNorris Linux - Software 2 04-03-2006 11:57 AM
sem has incomplete type error in building the filesystem image sudhirvemana Linux - Newbie 1 11-25-2004 02:45 PM
sem has incomplete type error in building the filesystem image sudhirvemana Linux - Software 0 11-25-2004 04:17 AM
what is the function library of the basic graphics library in rethat9.0? zerwolve Red Hat 0 04-29-2004 10:18 PM
Dynamically extracting a thumbnail from an interlaced image. Travis86 Programming 0 01-31-2004 11:36 PM

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

All times are GMT -5. The time now is 11:17 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