Home | Login

Gil's Blog

Opinions of a Frenchman in Florida.

  • Contact
  • Follow Me

    Follow gilg on Twitter
  • Recent Posts

    • Gil’s P90X Day 30.
    • Gil’s P90X, Day 14.
    • P90X First Few Days and Impressions.
    • Building a Hornet Gyroplane
    • Tori Tanto Review.
  • Categories

    • Aviation (7)
    • Computing (9)
    • HOWTO (11)
    • Humor (1)
    • Martial Arts (20)
    • Other (1)
    • Personal (20)
    • Personal Safety (19)
    • Philosophy (4)
    • Politics (7)
    • Reviews (11)
    • Science (2)
    • Short Stories (5)
    • Society (9)
    • Technology (1)
    • Videos (10)
  • Translator

    English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroatian flagDanish flagFinnish flagHindi flagPolish flagRomanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flagAlbanian flagEstonian flagGalician flagMaltese flagThai flagTurkish flagHungarian flag
  • Gallery

    padler.jpg Bradenton.jpg ruby.jpg filipina.jpg
  • Blogroll

    • Facebook
    • LinkedIn
    • Twitter
    • Youtube
  • Subscribe

    Your email:

     

FreeBSD, JPEG not working in GD.

Posted by gil on November 9, 2009

I have installed GD a few times before, and never cam across this problem, maybe I was just lucky. I installed ImageMagick, GD and JPEG on the machine, a FreeBSD 7.1-RC2 server running Apache 1.3.41 and PHP 5.2.11.

  • /usr/ports/graphics/gd
  • /usr/ports/graphics/ImageMagick
  • /usr/ports/graphics/jpeg

That was easy, just “make install clean” and you’re in business..

Then, I proceeded to recompile PHP:

./configure –with-mysql –with-apxs=/usr/local/sbin/apxs –with-pcre-regex –enable-mbstring=en –with-zlib –with-gd –with-jpeg

Ah, problem.. “–with-jpeg” is not recognized. I don’t care about PNG support, since it is included in GD by default. After a bit of research, I find out that I need to add the path to the jpeg library:

./configure –with-mysql –with-apxs=/usr/local/sbin/apxs –with-pcre-regex –enable-mbstring=en –with-zlib –with-gd –with-jpeg-dir=/usr/lib

Now the output of phpinfo() shows my option, but scrolling down to the GD info box, I don’t see JPEG enabled there, crap! So, I try a few locations for the jpeg library, /usr, /usr/local, /usr/local/lib.. Same result. It should be /usr/lib.. Am I forgetting something? Well, yes, the problem has to be related to the path..

Then it hits me! I didn’t do a “make clean” before reconfiguring.. I try that, bingo! Jpeg enabled!

Good luck with your installation :-)



  • Share/Bookmark

Related posts

  • MySQL Optimization on FreeBSD. (0)

Filed under: Computing

Leave a Reply

«First Lessons Learned in Forging Knives. Backing Up Your Computer. »

Copyright © 2008 Gil's Blog | XHTML 1.1 | CSS 2.1 | Design by Fernbap | WordPress Theme by DesertWolf