Hi everyone,
I’m working on getting a new website setup, we used a template we purchased from ThemeForest. I can’t get the slider images on the homepage working, and I think it has to do with GDLibrary not being enabled or installed.
We are on Amazon Web Services, which is new for me… and I’m certainly no PHP expert anyway so any help is appreciated:
What I’ve done so far:
I looked in the php.ini file and the only configuration option I see is the below: This looks like simply toggling error reporting; not actually enabling it.
[gd]
; Tell the jpeg decode to libjpeg warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
;gd.jpeg_ignore_warning = 0
According to this site , I should be seeing an extension option like this:
;extension=php_gd2.dll
But I don’t…
I put up a phpinfo() file and GDLibrary clearly isn’t on there. You can see it at
50.19.119.0/phpinfo.php
Any ideas on how I get this configured? I thought gdlibrary was a default component of php5.2.6
Any help or ideas is appreciated. I’m still very unfamiliar with AWS so it’s a learnign experience for me here
PHP: Installation - Manual
You’re going to have to rebuild the php. What Linux platform are you working on (Debian, Centos,Fedora etc?)
Shaydez:
PHP: Installation - Manual
You’re going to have to rebuild the php. What Linux platform are you working on (Debian, Centos,Fedora etc?)
I believe it’s redhat… this is from phpinfo
'./configure' '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json'
Thanks for the info so far. Going to see what I can figure out.
I found this thread on AWS:
https://forums.aws.amazon.com/thread.jspa?threadID=20029
Tried running the command they show there
yum -y install php-gd
And got this result:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* updates-newkey: kdeforge.unl.edu
* fedora: kdeforge.unl.edu
* updates: kdeforge.unl.edu
updates-newkey | 2.3 kB 00:00
fedora | 2.1 kB 00:00
updates | 2.6 kB 00:00
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php-gd.i386 0:5.2.6-2.fc8 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-gd i386 5.2.6-2.fc8 updates-newkey 112 k
Transaction Summary
================================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 112 k
Downloading Packages:
php-gd-5.2.6-2.fc8.i386.rpm | 112 kB 00:00
============================== Entering rpm code ===============================
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-gd 1/1
=============================== Leaving rpm code ===============================
Installed:
php-gd.i386 0:5.2.6-2.fc8
Complete!
But it still doesn’t appear to work. Grrr.
BTW I dont believe there is any sensitive info in that string of data but someone please let me know if I did leave anything in I should remove!
Argh I had to restart httpd. Now it’s working and GD is showing up in PHPInfo. My pics still aren’t working but at least i’m past the GD hurdle!
Do I just add this in to PHPinfo manually?
;extension=php_gd2.dll
The directory only has a file called gd.so in the /usr/lib/php/modules folder
;extension=php_gd2.dll
dll’s are for Windows, so on a Linux platform you should indeed be looking for a .so file.
However, if phpinfo() is showing GD, that means it’s already loaded, and you won’t need to add it to your php.ini file.
Edit>>
oops, just noticed this thread is already 2 days old. Hope you already fixed it in the meantime
Immerse:
;extension=php_gd2.dll
dll’s are for Windows, so on a Linux platform you should indeed be looking for a .so file.
However, if phpinfo() is showing GD, that means it’s already loaded, and you won’t need to add it to your php.ini file.
Edit>>
oops, just noticed this thread is already 2 days old. Hope you already fixed it in the meantime
I did, thanks for the help! It is showing up in PHP Info. It stil wasn’t working for me, then I realized I had to restart the Apache server. Duh!
Thanks for the help.