473,320 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

clarification needed about libgd and imagejpg()

Hello,

I had no success in making libgd working with
PHP (I run a linux system). It seems that my
libgd cannot handle jpg files.

When I run on my webserver the script

<?php
var_dump(gd_info());
?>

I get this output:

array(11) {
["GD Version"]= string(27) "bundled (2.0.34
compatible)"
["FreeType Support"]= bool(false)
["T1Lib Support"]= bool(false)
["GIF Read Support"]= bool(true)
["GIF Create Support"]= bool(true)
["JPG Support"]= bool(false)
["PNG Support"]= bool(true)
["WBMP Support"]= bool(true)
["XPM Support"]= bool(false)
["XBM Support"]= bool(true)
["JIS-mapped Japanese Font Support"]= bool(false) }

from wich is quite clear that I cannot handle jpg files;
but why? Do I need an extra library?

If I run some scripts, I get the error
"Call to undefined function imagejpeg() in ..."

Thankyou in advance.

Best regards,
Giovanni Gherdovich
Mar 19 '08 #1
4 1511
Giovanni Gherdovich a écrit :
from wich is quite clear that I cannot handle jpg files;
but why? Do I need an extra library?
libjpeg.
http://www.ijg.org/

Apache configuration --with-jpeg-dir=****

Regards,
--
Guillaume
Mar 19 '08 #2
Thankyou Guillame for the reply.
libjpeg.
http://www.ijg.org/
Mmmh.. I already had libjpeg in my system.

I tried to locate my libjpeg files and I got

/usr/lib/libjpeg.a
/usr/lib/libjpeg.la
/usr/lib/libjpeg.so
/usr/lib/libjpeg.so.62
/usr/lib/libjpeg.so.62.0.0

so I recompiled PHP adding --with-jpeg-dir=/usr/lib

and the output from configure was

[...]
checking for GD support... yes
checking for the location of libjpeg... /usr/lib
checking for the location of libpng... no
[...]

(before it was "checking for the location of libjpeg... no")

But I still don't have jpeg support with GD...
(the output from gd_info() is the same as above,
and it doesn't find imagejpg())

It's strange that PHP doesn't find libpng while
configuring, but from gd_info() it seems I have
png support.
Apache configuration --with-jpeg-dir=****
Do you mean that I must recompile Apache,
instead of PHP?

Here
http://marc.info/?l=php-install&m=99976860421801&w=2
I've read that also the gd library itself must be
compiled with jpeg support...

I don't have the whole picture very clear.
Any hint?

Regards,
GGhh
Mar 19 '08 #3
Giovanni Gherdovich a écrit :
>Apache configuration --with-jpeg-dir=****

Do you mean that I must recompile Apache,
instead of PHP?
My bad, I was thinking PHP ^^

Still I have no other clue regarding the problem... It perfectly worked
for me. Plus I should say that I'm not compiling PHP every day :p

Regards,
--
Guillaume
Mar 19 '08 #4
On Wed, 19 Mar 2008 18:39:16 +0100, Guillaume <gg*****@gmail.comwrote:
Giovanni Gherdovich a écrit :
>>Apache configuration --with-jpeg-dir=****
Do you mean that I must recompile Apache,
instead of PHP?
My bad, I was thinking PHP ^^

Still I have no other clue regarding the problem... It perfectly worked
for me. Plus I should say that I'm not compiling PHP every day :p
I'd say this:
"When buliding the jpeg-v6b library (prior to building PHP) you must use
the --enable-shared option in the configure step. If you do not, you will
receive an error saying libjpeg.(a|so) not found when you get to the
configure step of building PHP."

The wonders of installation instructions: <http://nl2.php.net/gd>
--
Rik Wasmus
Mar 19 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Sai Kit Tong | last post by:
In the article, the description for "Modiy DLL That Contains Consumers That Use Managed Code and DLL Exports or Managed Entry Points" suggests the creation of the class ManagedWrapper. If I...
3
by: Jon Booth | last post by:
I have just started programming .NET having come from ASP. We used to create a connection and store it in a session.This meant for each user logging into the site there was only one connection ...
3
by: Lerp | last post by:
Hi all, I have a developer that likes to work using all code behind forms no matter the size of the page, whereas I don't usually use this format. Today when I went to remove a field from one...
4
by: vivekian | last post by:
Hi, Have this following hierarchy which am implementing for a networking program. The base class 'ASocket' is the base class from which 'AListener' and 'ATalker' inherit . None of the functions...
3
by: Rik | last post by:
Hello, first of all, my provider sucks, newsserver is down for the #nth time now, offcourse when I have an urgent question.... So this will be me first time using Google Groups, forgive me if...
0
by: HermannJens | last post by:
Im trying to install the GD::Graph module from cpan but it always asks me for the location of "libgd". How do i install this libgd? It seems to be very difficult to do. Im really desperate...
8
by: shotokan99 | last post by:
i have this situation. i have a query string: http://www.myquerystring.com?x=xxxxx what this url does is it will return or start downloading a .png file. what i wanted to do is trap this png...
2
by: Defacta | last post by:
Hi, Is it possible to change the DPI of an JPG image by using the libGD ? I would prefer using it than imagemagick... Thanks, Vincent.
51
by: fjm | last post by:
Hey everyone. I'm back in search of a better understanding of OOP. I feel like these past couple of months have paid off for me because I am at a point where I am really beginning to understand how...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.