I am getting what must be an all too familar error for many of you, when I try to upload an image to Coppermine.
ERROR:
QuotePHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed
Current system
PHP 4.3.10
Apache/2.0.48
Things I have done
- I have checked and rechecked all my permissions. It is 777 on all folders, anyone and their grandma has permissions to write to those folders.
- I had 4.3.9 Installed with GD enabled and it didn't work so I tried upgrading to 4.3.10 to see if that would fix the problem.
On the phpinfo page it says:
Quotegd
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
The PHP configure statement:
'./configure' '--with-mysql=/usr/local/mysql/' '--with-mssql' '--with-openssl' '--with-apxs2=/usr/local/apache/bin/apxs' '--enable-force-cgi-redirect' '--disable-ipv6' '--enable-static' '--disable-rpath' '--with-mysql' '--prefix=/usr' '--with-config-file-path=/usr/lib/php' '--with-zlib' '--with-gd'
any ideas? The Zend site is either down or blocked. I can't find more information about the Zend Optimizer. I wasn't aware that this was required for coppermine. I don't know how to check to see what version I have. Having an earlier version of Zend Optimizer would cause for the php not installed error I am getting?
This is because your server does not have jpg support enabled. Without this, coppermine simply will not work with GD.
Ask your host to enable jpg support with GD.
Basically you need --with-jpeg in your configure command.
QuoteAsk your host to enable jpg support with GD.
What you mean me? :)
QuoteBasically you need --with-jpeg in your configure command.
Ok sweet I will try that!
Hmm . ok I added the --with-jpeg statement to my configure command and it is still giving me that same error.
I thought LibJPEG was a default package. I think I downloaded it and installed it just in case before. I was looking at the ./configure --help and it said the only option that was similar to yours
Quote--with-jpeg-dir[=DIR] GD: Set the path to libjpeg install prefix.
but I figured I would try it without the "-dir" at the end to see if that worked, but it didn't so I guess now I have to go figure out where I installed libjpeg :P
Ok I reinstalled libjpeg ... it adds the files to several directories. Which one should I point to in my PHP configure statement, I have no idea..
I found some stuff on Usenet in comp.lang.php...
QuoteI have been trying to GD working on HPUX for about, oh 2 months now,
and have come across something that was interesting.
I have this configuration:
HPUX 11
Bundled Apache 2.0/PHP 4.3.4
Basically, the reason GD is so hard to get to work, is that it has
hard coded dependencies on libraries.
I was having so many isues getting GD to work. Basically GD would
complain that it couldn't find certain libraries, even though they are
installed on the system.
OK, TIP #1, Run the PHP interpreter from the command line, this is a
great way to debug:
EG:
/opt/hpws/apache/php/bin/php -c php.ini test.php
This way, you will get to see all errors that are sent to STDERR.
I have no idea why some errors don't go into Apache log..!
On HPUX, the ldd command lists dependencies that a ibrary has:
Now, checkout this against GD:
autoprod@viha030:/opt/phpapps> ldd
/opt/hpws/apache/php/lib/php/extensions/gd.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libjpeg.sl => /usr/local/lib/libjpeg.sl
/usr/local/lib/libz.sl => /usr/local/lib/libz.sl
/usr/local/lib/libpng.sl.2 => /usr/local/lib/libpng.sl.2
/usr/local/lib/libXpm.sl => /usr/local/lib/libXpm.sl
/usr/local/lib/libfreetype.sl.9 =>
/usr/local/lib/libfreetype.sl.9
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libt1.sl.4 => /usr/local/lib/libt1.sl.4
THIS IS THE CAUSE OF SO MANY PROBLEMS!!
GD is staticly linked against libraries in /usr/local/lib !!
When I even had libraries installed in /usr/local/lib/X11 it wouldn't
find them, even with the SHLIB_PATH set (HPUX notation).
This is just plain anoying and stupid, there must be a better way.
I hope that this information can help someone from tearing their three
remaining hairs out of their head..
I can be contacted at: RAT_01 at optusnet dot com dot au
Change RAT to PAT to send email.
Patrick.
Quote
D. Alvarado Aug 15 2004, 5:08 pm show options
Newsgroups: comp.lang.php
From: laredotorn...@gmail.com (D. Alvarado) - Find messages by this author
Date: 15 Aug 2004 17:08:29 -0700
Local: Sun, Aug 15 2004 5:08 pm
Subject: Installing GD
Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse
Hello,
I am trying to install the GD package. I am runinng PHP 4 for
Apache 1.3.31 on Linux Fedora Core 2. This is the command I run ...
[root@localhost php-4.3.8]# ./configure --with-mysql --enable-calendar
--with-apxs=/usr/local//apache/bin/apxs --with-mcrypt=/usr/local/lib
--enable-track-vars --with-gd --with-jpeg-dir=/usr/lib
--with-zlib-dir=/usr/lib --with-png --with-png-dir=/usr/lib
and this is how it all comes crashing down ...
checking for DOM EXSLT support... no
checking whether to enable EXIF (metadata from images) support... no
checking for FrontBase SQL92 (fbsql) support... no
checking for FDF support... no
checking whether to enable the bundled filePro support... no
checking for FriBidi support... no
checking whether to enable FTP support... no
checking for GD support... yes
checking for the location of libjpeg... /usr/lib
checking for the location of libpng... /usr/lib
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
configure: error: png.h not found.
I cannot find "png.h" anywhere on my system. What do I need to
install to get it?
Thanks for any help, - Dave
Here is GD 2.0 on RH 7.2
QuoteGD with PHP
All 3 messages in topic - view as tree
Rob Gudgeon Mar 13 2003, 3:55 am show options
Newsgroups: comp.lang.php
From: "Rob Gudgeon" <robin.NOSPAMgudg...@btREMOVEME.com> - Find messages by this author
Date: Thu, 13 Mar 2003 11:55:14 -0000
Local: Thurs, Mar 13 2003 3:55 am
Subject: GD with PHP
Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse
Hi All
I'm having no luck with installing PHP with the GD library on RedHat Linux
7.2 and have run out of options to try.
Below are all the steps I've followed to attempt the installation, if anyone
can spot any potential problems with any of this it would be gratefully
received
tar zxvf freetype-2.0.9.tar.gz
mv freetype-2.0.9 freetype2
cd freetype2
./configure
make
make install
tar zxvf zlib-1.1.4.tar.gz
mv zlib-1.1.4 zlib
cd zlib
./configure
make
make install
tar zxvf libpng-1.2.5.tar.gz
mv libpng-1.2.5 libpng
cd libpng
cp -p scripts/makefile.linux ./Makefile
make
make install
tar zxvf gd-2.0.11.tar.gz
mv gd-2.0.11 gd
cd gd
./configure
make
make install
tar zxvf php-4.3.1.tar.gz
cd php-4.3.1
I then attempted 3 different configures:
(1)
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-ftp --with-gd=/u
sr/local/gd --with-freetype-dir=/usr/local/freetype2 --with-png-dir=/usr/loc
al/libpng --with-zlib=/usr/local/zlib
[configure error: Cannot find libz]
(2)
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-ftp --with-gd=/u
sr/local/gd --with-freetype-dir=/usr/local/freetype2 --with-png-dir=/usr/loc
al/libpng --with-zlib=/usr/local
[configure: error: Unable to find libgd.(a|so) anywhere under /usr/local/gd]
(3)
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-ftp --with-gd=/u
sr/local --with-freetype-dir=/usr/local/freetype2 --with-png-dir=/usr/local/
libpng --with-zlib=/usr/local
[no configure errors]
make
make install
Installing PHP CLI binary: /usr/local/bin/
Installing PHP SAPI module
[activating module `php4' in /usr/local/apache/conf/httpd.conf]
cp libs/libphp4.so /usr/local/apache/libexec/libphp4.so
chmod 755 /usr/local/apache/libexec/libphp4.so
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak
cp /usr/local/apache/conf/httpd.conf.new /usr/local/apache/conf/httpd.conf
rm /usr/local/apache/conf/httpd.conf.new
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non
-zts-20020429/
Installing PEAR environment: /usr/local/lib/php/
/usr/local/php-4.3.1/sapi/cli/php: error while loading shared libraries:
unexpected reloc type 0x03
make[1]: *** [install-pear-installer] Error 127
make: *** [install-pear] Error 2
many thanks
Rob
Maybe my configure is messed up.
QuoteBuilding PHP 4.3.3 with GD 2.0.11
Only 1 message in topic
Slavik Nov 20 2003, 5:09 pm show options
Newsgroups: comp.lang.php
From: "Slavik" <l337sla...@covad.net> - Find messages by this author
Date: Thu, 20 Nov 2003 20:01:09 -0500
Local: Thurs, Nov 20 2003 5:01 pm
Subject: Building PHP 4.3.3 with GD 2.0.11
Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse
All libraries were installed (precompiled)
This is FreeBSD 5.1
installed zlib, installed jpeg and png libraries (in default directories)
GD 2.0.11 source is in /usr/gd-2.0.11 (compiled and installed flawlesly)
I configured PHP with the following:
./configure --with-gd=/usr/gd-2.0.11 --with-freetype-dir=/usr --enable-g
d-native-ttf --enable-gd-imgstrttf --with-jpeg-dir=/usr --enable-png-
dir=/usr --
with-zlib --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs
When configure came to reading jpeg header, it gave me an error about
libjpeg.a
I need GD, because I want to use coppermine (picture gallery) on my
"future" web site.
Contents of config.log file (from here to end of message):
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
hmmm
Here is an output of all the options for PHP ./configure for 4.3.10
http://us4.php.net/manual/en/configure.php
I checked my ./configure output with a blank path (--with-gd) so it should use the included GD modules.. and it said this
[1mConfiguring Zend[m
checking bison version... 1.35 (ok)
Does this mean I am using Zend Optimizer version 1.35 ?
Ok I installed Zend Optimizer. 2.5.7 .. the newest one. And I am still getting the error in Coppermine. It relocated my php.ini file to the Zend folder.
Ok Now I am trying ImageMagick...
I have installed Image Magick 5.5.7.
I think it installed correctly. I am rerunning the configure to dump to text file and I will go over it. Now I have changed the config file of coppermine to the ImageMagick directory on the server.
It let's me upload it, but doesn't display any imagery. It displays a blank box on the upload.php page where my image should be.
I hit continue. and it says ..
"The previous file could not be placed.
You have successfully placed all the files."
And no images show up in my Gallery. So now I am having ImageMagick problems also.
There is one image in the ../albums/edit folder and also the ../albums/userpics/10001 folder... But this image is not being displayed.
Maybe it is because Inmagic won't install..........
It is giving me these errors.
Quote/usr/X11R6/lib/libdps.so: undefined reference to `XtMalloc'
/usr/X11R6/lib/libdps.so: undefined reference to `XtSetEventDispatcher'
Did you install PHP manually or with an autoinstaller bundled type thing?
compliing from source
Is it possible that PHP installs correctly with the bundled GD packages, but coppermine doesn't know where to find these default GD libraries?
Try doing a locate for libjpeg.so and use the directory where it is found for your command. Mine is --with-jpeg-dir=/usr/lib.
Quote from: Nibbler on February 08, 2005, 05:20:36 PM
Try doing a locate for libjpeg.so and use the directory where it is found for your command. Mine is --with-jpeg-dir=/usr/lib.
Here is what it said when I configured it.
Quotechecking for GD support... yes
checking for the location of libjpeg... /usr/lib
checking for the location of libpng... no
checking for the location of libXpm... no
With this configure command.
'./configure' '--with-mysql=/usr/local/mysql/' '--with-mssql' '--with-openssl' '--with-apxs2=/usr/local/apache/bin/apxs' '--enable-force-cgi-redirect' '--disable-ipv6' '--enable-static' '--disable-rpath' '--with-mysql' '--prefix=/usr' '--with-config-file-path=/usr/lib/php' '--with-zlib' '--with-gd' '--with-jpeg-dir=/usr/lib'
It's working!
Glad you got it sorted, and thanks for letting us know, so we can close the thread.
all because of the darn --with-jpeg-dir=/usr/lib configure command.