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!
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
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.
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.
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
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
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.
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
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.
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: I hope this helps you help me. i really needed. Your help is so much appriciated!
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?
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.