Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
02-15-2007, 10:24 AM
|
#1
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Rep:
|
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.
|
|
|
02-15-2007, 11:19 AM
|
#2
|
Member
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168
Rep:
|
Do you have gd enabled in PHP? If not you can probably install it with your distros package manager.
|
|
|
02-15-2007, 11:53 AM
|
#3
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Original Poster
Rep:
|
not sure how would i check whether or not i've got gd enabled in PHP?
matt
|
|
|
02-15-2007, 11:59 AM
|
#4
|
Member
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168
Rep:
|
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.
|
|
|
02-16-2007, 05:51 AM
|
#5
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Original Poster
Rep:
|
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
|
|
|
02-16-2007, 09:01 AM
|
#6
|
Member
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168
Rep:
|
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:
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.
|
|
|
02-19-2007, 05:52 AM
|
#7
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Original Poster
Rep:
|
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.
|
|
|
02-19-2007, 09:52 AM
|
#8
|
Member
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168
Rep:
|
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.
|
|
|
02-20-2007, 04:46 AM
|
#9
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Original Poster
Rep:
|
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
|
|
|
02-20-2007, 07:02 AM
|
#10
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Original Poster
Rep:
|
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?
|
|
|
02-20-2007, 08:29 AM
|
#11
|
Member
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168
Rep:
|
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.
|
|
|
02-21-2007, 04:32 AM
|
#12
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Original Poster
Rep:
|
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.
|
|
|
02-21-2007, 08:49 AM
|
#13
|
Member
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168
Rep:
|
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:
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.
|
|
|
02-28-2007, 10:00 AM
|
#14
|
LQ Newbie
Registered: Dec 2006
Posts: 17
Original Poster
Rep:
|
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?
|
|
|
02-28-2007, 10:17 AM
|
#15
|
Member
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168
Rep:
|
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 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:
|
|
|
All times are GMT -5. The time now is 11:17 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|