Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I install (or check that I have) gd library

Participant ,
Feb 22, 2011 Feb 22, 2011

I read another post on this, but didn't understand how to check if I have GD Library. I want the library to work on an image script that needs GD library.

I'm on a Mac, and have MAMP 1.9.4 installed.

I'm reluctant to install the PHP module at http://www.entropy.ch/software/macosx/php/ because I don't want to screw anything up. (My original problem with MAMP was I installed extra stuff not knowing what it was...)

Thanks in advance for your patience (and simply worded response for a REAL novice.)

Jami

TOPICS
Server side applications
2.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Feb 22, 2011 Feb 22, 2011

Let´s first check if the GD library is enabled on your local server:

1. create a new *blank* PHP file, put the line

<?php phpinfo(); ?>

..in here, and store this file (example: info.php) inside the MAMP "htdocs" folder

2. open "info.php" with your browser (should be "http://localhost/info.php" I assume)

3. you should now see a page which reveals your current PHP configuration settings including compilation options and enabled extensions. I´m attaching a screenshot which indicates what you should get

...
Translate
Guide ,
Feb 22, 2011 Feb 22, 2011

Let´s first check if the GD library is enabled on your local server:

1. create a new *blank* PHP file, put the line

<?php phpinfo(); ?>

..in here, and store this file (example: info.php) inside the MAMP "htdocs" folder

2. open "info.php" with your browser (should be "http://localhost/info.php" I assume)

3. you should now see a page which reveals your current PHP configuration settings including compilation options and enabled extensions. I´m attaching a screenshot which indicates what you should get to see on this page in case the GD library is enabled.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 22, 2011 Feb 22, 2011

Thanks. Yes -- it says

GD Support    enabled
GD Version    bundled (2.0.34 compatible)

Under Configure Command I didn't find quite the same thing your screenshot showed.

I put the two that referenced "gd" in orange

  './configure' '--with-mysql=/Applications/MAMP/Library' '--with-apxs2=/Applications/MAMP/Library/bin/apxs' '--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library' '--with-png-dir=/Applications/MAMP/Library' '--with-zlib' '--with-freetype-dir=/Applications/MAMP/Library' '--prefix=/Applications/MAMP/bin/php5.3' '--exec-prefix=/Applications/MAMP/bin/php5.3' '--sysconfdir=/Applications/MAMP/conf/php5.3' '--with-soap' '--with-config-file-path=/Applications/MAMP/conf/php5.3' '--enable-track-vars' '--enable-bcmath' '--enable-ftp' '--enable-gd-native-ttf' '--with-bz2=/usr' '--with-ldap' '--with-mysqli=/Applications/MAMP/Library/bin/mysql_config' '--with-sqlite' '--with-ttf' '--with-t1lib=/Applications/MAMP/Library' '--enable-mbstring=all' '--with-curl=/Applications/MAMP/Library' '--enable-dbx' '--enable-sockets' '--enable-bcmath' '--with-imap=shared,/Applications/MAMP/Library/lib/imap-2007e' '--enable-soap' '--with-kerberos' '--enable-calendar' '--with-pgsql=shared,/Applications/MAMP/Library/pg' '--enable-dbase' '--enable-exif' '--with-libxml-dir=/Applications/MAMP/Library' '--with-gettext=shared,/Applications/MAMP/Library' '--with-xsl=/Applications/MAMP/Library' '--with-pdo-mysql=shared,/Applications/MAMP/Library' '--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg' '--with-mcrypt=shared,/Applications/MAMP/Library' '--with-openssl' '--enable-zip'

?

Thanks -- Jami

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 22, 2011 Feb 22, 2011

Under Configure Command I didn't find quite the same thing your screenshot showed.

This doesn´t matter, because I´m running something else (XAMPP) on a Windows OS, and PHP configurations do vary pretty much.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 22, 2011 Feb 22, 2011

So it sounds like its running, yes?

That means I can move forward...

Thanks for your quick responses and help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 22, 2011 Feb 22, 2011
LATEST

So it sounds like its running, yes?

You said it yourself: GD is enabled. Get ready for action 😉

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines