1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Install GDLibrary

Discussion in 'Site & Server Administration' started by WebDivx, Nov 19, 2006.

  1. #1
    I just recently got a virtual provate server with php5 and it does not have GDLibrary. Can somebody walk me through the steps of how to set it up? I have SSH access. Thanks!
     
    WebDivx, Nov 19, 2006 IP
  2. saadahmed007

    saadahmed007 Admínistratör

    Messages:
    5,272
    Likes Received:
    869
    Best Answers:
    0
    Trophy Points:
    380
    #2
    Hi,
    Which OS you are running on your VPS? :)
    Saad
     
    saadahmed007, Nov 19, 2006 IP
  3. WebDivx

    WebDivx Peon

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i am running fedora linux
     
    WebDivx, Nov 19, 2006 IP
  4. saadahmed007

    saadahmed007 Admínistratör

    Messages:
    5,272
    Likes Received:
    869
    Best Answers:
    0
    Trophy Points:
    380
    #4
    Hi,
    You can install by using this command in ssh
    yum install gd-devel :) Also after that To turn it on, simply uncomment the line "extension=php_gd2.dll" in php.ini and restart the apache. Change:
    #extension=php_gd2.dll
    To:
    extension=php_gd2.dll
    Saad
     
    saadahmed007, Nov 19, 2006 IP
  5. WebDivx

    WebDivx Peon

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hey saad i dont see that line in my php.ini
     
    WebDivx, Nov 19, 2006 IP
  6. saadahmed007

    saadahmed007 Admínistratör

    Messages:
    5,272
    Likes Received:
    869
    Best Answers:
    0
    Trophy Points:
    380
    #6
    Are you sure you are editing right php.ini file?
    Saad
     
    saadahmed007, Nov 19, 2006 IP
  7. WebDivx

    WebDivx Peon

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yeah... and it is also saying "bash: yum: command not found" when i type in: yum install gd-devel in my ssh client. I also tried that when i saw it on GD's web site, however it did not work for me.

    i am trying to install GD Library... is there any specfic folder I should put this in. I have this in a normal folder.
     
    WebDivx, Nov 19, 2006 IP
  8. IntelliGuy

    IntelliGuy Banned

    Messages:
    42
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hey Saad, .dlls only work on Windows system, not linux :) There is no php_gd2.dll on Linux systems.

    If yum is not working, you will need to install or configure yum first (www.fedorafaq.org/#installsoftware). You can install gd manually by downloading the source (google it) and compiling it. After this, you would have to recompile php with --with-gd[=path/to/gd] configure option (with other options with which php was compiled bofore). Its better to ask your host to do it for you if you do not know how to compile and install packages on linux.
     
    IntelliGuy, Nov 20, 2006 IP
  9. saadahmed007

    saadahmed007 Admínistratör

    Messages:
    5,272
    Likes Received:
    869
    Best Answers:
    0
    Trophy Points:
    380
    #9
    Ah..I am still learning linux :).I guess it's .sh maby .iso for linux.Well I also suggest you to contact your host also do you have whm/cpanel?If yes then login to whm and install new module and select GD library :)
    Saad
     
    saadahmed007, Nov 20, 2006 IP
  10. IntelliGuy

    IntelliGuy Banned

    Messages:
    42
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #10
    It is neither .sh nor .iso. Its is (***.so) when it is built as a shared module, and no separate file if built statically into php.

    Keep learning :)
     
    IntelliGuy, Nov 20, 2006 IP
  11. WebDivx

    WebDivx Peon

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    lol... i asked my host several times... and they are the least helpful people ever. they wont even give me instructions on how to do it... they just refer me to the GD Library site which is not really helpful. GD is a pretty good tool, but their web site sucks - at least for somebody like me.

    Anyways, I eventually was able to compile GD library on my own, however I don't see it in my php.ini and neither does the program I am using (4images) recognize it. I have PHP 5, but I don't understand your "--with-gd[=path/to/gd]" instructions.

    Also, I saw several error messages as GD Library was installing. Here are the error messages after each step I took. I have put it in the next post since I probably wont have enough space.
     
    WebDivx, Nov 20, 2006 IP
  12. WebDivx

    WebDivx Peon

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Here are the Errors I got after each step when trying to install GD Library. I got a lot of "Nothing to be dones" (I did not show most of then below):

    Step 1: ./configure
    configure: WARNING: libpng is required - see http://www.libpng.org/pub/png/
    checking for freetype-config... no
    checking for FT_Init_FreeType in -lfreetype... no
    configure: WARNING: not found - disabling freetype support

    Step 2: make
    make[2]: Entering directory `my directory path was here/gd/test'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `my directory path was here/gd/test'
    make[2]: *** [gdparttopng] Error 1
    make[2]: Leaving directory `my directory path was here/gd/'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `my directory path was here/gd/'
    make: *** [all] Error 2

    Step 3: make check (was optional but i did it anyways)
    make[1]: Entering directory `my directory path was here/gd/config'
    make[1]: Nothing to be done for `check'.
    make[1]: Leaving directory `my directory path was here/gd/config'
    Making check in test
    make[1]: Entering directory `my directory path was here/gd/test'
    make[1]: Nothing to be done for `check'.
    make[1]: Leaving directory `my directory path was here/gd/test'
    make[1]: Entering directory `my directory path was here/gd/gd'
    /bin/sh ./libtool --mode=link gcc -g -O2 -o gdparttopng gdparttopng.o ./libgd.la -lm
    gcc -g -O2 -o .libs/gdparttopng gdparttopng.o ./.libs/libgd.so -lm -Wl,--rpath -Wl,/usr/local/lib
    gdparttopng.o(.text+0xaa): In function `main':
    my directory path was here/gd/gdparttopng.c:42: undefined reference to `gdImageCreateFromGd2Part'
    collect2: ld returned 1 exit status
    make[1]: *** [gdparttopng] Error 1
    make[1]: Leaving directory `my directory path was here/gd/'
    make: *** [check-recursive] Error 1

    Step 4: make install
    pretty much got the same stuff as part 3
     
    WebDivx, Nov 20, 2006 IP
  13. IntelliGuy

    IntelliGuy Banned

    Messages:
    42
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #13
    GD library is included in php 4.3+ and php 5. You just need to enable it while compiling php with libpng, libjpeg and freetype 2. GD is not a graphics library itself. It needs libpng, libjpeg, and freetype 2 to create png, jpeg, gif images. Visit this page radekhulan.cz/?itemid=576 for instructions on compiling php 5 with GD support. libpng, libjpeg, freetype 2 need to be installed first. --with-gd configure option is for enabling GD support in php. Type [./configure --help] for more configure options in php source directory.
     
    IntelliGuy, Nov 21, 2006 IP
  14. WebDivx

    WebDivx Peon

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    thanks for your help, this time i installed libpng, libjpeg, ans freetype2, and then finished it off with gd and everything seemed to have installed properly, however! i go to my 4images gallery script to make thumbnails and it still says

    "GD library error.
    Check module settings."

    Everything is installed on my server and yet i am still getting that stupid error. I looked at the phpinfo for my dedicated server and a shared hosting account which I have and compared them both. The shared had the gd block (click here to see it) and the dedicated does not.

    I also compared the first block on both the dedicated and shared side by side, and the shared says "with-gd'" and the dedicated says "without-gd'". here is what I mean:
    [​IMG]

    I hope this helps you help me. i really needed. Your help is so much appriciated!
     
    WebDivx, Nov 21, 2006 IP
  15. IntelliGuy

    IntelliGuy Banned

    Messages:
    42
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Sorry, for the late reply. Can you please post the exact configure command issued before make? Or better post/pm phpinfo pages on both of your servers. Did you get any errors during configure/make? Did you added correct paths to installed png, jpeg, freetype libraries?
     
    IntelliGuy, Nov 28, 2006 IP
  16. D'Godown

    D'Godown Well-Known Member

    Messages:
    1,093
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    140
    #16
    Hey use easyapache command option 5, it will do everything in moments, This way :

    /scripts/easyapache

    Then choose option 5 when it aska, It will do GD and cURL both work.
     
    D'Godown, Dec 3, 2006 IP