Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: The version of GD used on your server has no support forJPEG  (Read 9426 times)

0 Members and 1 Guest are viewing this topic.

phillsimpson

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
The version of GD used on your server has no support forJPEG
« on: September 26, 2003, 06:46:44 am »

I know this is a problem with GDLib/PHP and not necessarily Coppermine. But since this machine's only purpose in the world is coppermine I was hoping someone could help with my frustration.

For some reason I simply cannot convince jpeg support to work with PHP.

Basically it's a solaris 9 box, I've downloaded most supporting packages gdlib 2, zlib, png, freetype,mysql etc... from sunfreeware.com, I installed them all (/usr/local) and then grabbed the latest apache and PHP.

Info.php's highlights include:

PHP Version 4.3.3
System  SunOS solaris 5.9 Generic_112233-07 sun4u  
Build Date  Sep 26 2003 09:09:15  
Configure Command  './configure' '--with-mysql' '--with-gd' '--with-freetype' '--with-png' '--with-zlib' '--with-apache-dir=/usr/local/apache'  

apache
APACHE_INCLUDE  no value  
APACHE_TARGET  no value  
Apache Version  Apache/1.3.28  
Apache Release  10328100  
Apache API Version  19990320  
Hostname:Port  192.168.1.20:80  
User/Group  nobody(60001)/60001  
Max Requests  Per Child: 0 - Keep Alive: on - Max Per Connection: 100  
Timeouts  Connection: 300 - Keep-Alive: 15  
Server Root  /usr/local/apache  
Loaded Modules  mod_php4, mod_setenvif, mod_auth, mod_access, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core  

gd
GD Support  enabled  
GD Version  bundled (2.0.15 compatible)  
GIF Read Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
XBM Support  enabled  

mysql
MySQL Support enabled
Active Persistent Links  0  
Active Links  0  
Client API version  3.23.49  
MYSQL_MODULE_TYPE  builtin  
MYSQL_SOCKET  /tmp/mysql.sock  
MYSQL_INCLUDE  no value  
MYSQL_LIBS  no value  

I have apache and php extracted to /usr/local/src.

Can anyone give me the commands or basic process I need to redo this but with jpeg support in some form or another?

Any help is much appreciated

Phill
phill@tmanage.com
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
The version of GD used on your server has no support forJPEG
« Reply #1 on: September 26, 2003, 08:40:54 am »

Cool!  A solaris user!

Anyway, looks like your GD does not support JPEG.  If you want, be a little more adventurous and compile PHP with JPEG support (get jpeglib).

Let me know if you need some guide as this is my area *grin* - compiled and built all sources [mysql, apache, php blah] with no root!  Actually they are really quite easy, just getting the libs' a pain since Solaris usable library is really crap.
Logged

phillsimpson

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
RE: jpeg support in PHP
« Reply #2 on: September 26, 2003, 04:14:36 pm »

After I posted I did try a few more options. Whats concerning me is that the GD Version that it returns in info.php says bundled. I think it might be trying to use the GD version that's bundled with PHP.

I tried a ton of options (trial and error :) last night to see if I could do anything. I then installed GD and jpeglib manually (not using pkgadd) and tried the folowing combo's

--with-jpeg & --with-gd
--with-jpeg=/usr/local & --with-gd
--with-jpeg-dir=/usr/local & --with-gd-dir=/usr/local
--with-jpeg-dir=/usr/local/lib & --with-gd-dir=/usr/local/lib

Most of the time it compiles and I leave the rest of the variables as specified earlier. Then I recompile and make, make install, on apache 1.3.38 with the php module. Sometimes the GD section goes away, but mostly it just stays exactly the same as above.

I managed to spend 6 hours on this last night, I'm stumped.

If you could help me with the steps, I'm more than willing to reinstall it all if I can get it working.

Your help is much appreciated.

Thanks!

Phill
phill@tmanage.com
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
The version of GD used on your server has no support forJPEG
« Reply #3 on: September 26, 2003, 07:34:58 pm »

GD *is* bundled with PHP, binaries or not :)  For source, you'd just have to compile jpeg support in.  OK let's work with what you have from your phpinfo since pkgadd's default usually works and I assume you have super-user access.  

Make sure you have already downloaded, compiled and make libjpeg.  Then download the latest stable PHP source tarball from php.net. gunzip, untar and configure with the following:

Quote
./configure --with-mysql --with-gd --with-freetype --with-png --with-zlib --with-apache-dir=/usr/local/apache --with-jpeg-dir=/link/to/libjpeg


You can use "--with-jpeg" instead of "--with-jpeg-dir=/link/to/libjpeg" if you didn't compile and make libjpeg into the default place.  If it still doesn't work then try specify the path then.  See how that goes.
Logged

phillsimpson

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
re: GD in PHP
« Reply #4 on: September 27, 2003, 05:45:43 am »

:(

Well I gave it a shot:

# ./configure --with-mysql --with-gd --with-freetype --with-png --with-zlib --with-apache-dir=/usr/local/apache --with-jpeg-dir=/usr/local

now that apache dir is the binary not the source, is that the way you wanted?

I also tried ./configure --with-mysql --with-gd --with-freetype --with-png --with-zlib --with-apache-dir=/usr/local/apache --with-jpeg

after make, make install, didn't change anything, whats interesting is that the phpinfo shows the following:

Configure Command  './configure' '--with-mysql' '--with-gd' '--with-freetype' '--with-png' '--with-zlib' '--with-apache-dir=/usr/local/apache'  

notice it's missing any reference to jpeg....

To me that seems strange.

Anyway, I did reinstall jpeg with

./configure --enable-shared --enable-static

Which according to the install.doc puts it into /usr/local so --with-jpeg should work.

Maybe I should just start over, but it just seems like I'm very close.

Any other ideas? I'm stumped. But I'm more than willing to try other stuff. In fact I could always just give you access since there's nothing on this machine except for solaris and this stuff.

Let me know your ideas,

thanks again

phill
phill@tmanage.com
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
The version of GD used on your server has no support forJPEG
« Reply #5 on: September 27, 2003, 06:15:42 am »

Sorry - should've mentioned you need to point it to the source of Apache.  It's true for most compiles, although in this case libjpeg is a lib so you can point either to the source or the binary.

Anyway, are you sure there's a libjpeg folder in /usr/local/ ? Specifically, it requires libjpeg.a which should be at /usr/local/libjpeg/lib/libjpeg.a if you have specified /usr/local/

After make, make install for php, did you restart Apache and then check phpinfo?

Anyway I really have to dash out now.  I'll check again tonight Perth time.
Logged

phillsimpson

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
RE: compiling PHP support for jpeg
« Reply #6 on: September 27, 2003, 07:30:18 pm »

I should've guessed 'Mooney' was in Oz :)

I searched and found that my libjpeg.a is in /usr/local/lib so I did the following

cd /usr/src/php
cd /php-4.3.3
./configure --with-mysql --with-gd --with-freetype --with-png --with-zlib --with-apache-dir=../apache_1.3.38 --with-jpeg-dir=/usr/local/lib
make
make install

apachectl stop

cd ../apache_1.3.38
 ./configure \
"--with-layout=Apache" \
"--prefix=/usr/local/apache" \
"--activate-module=src/modules/php4/libphp4.a"
make
make install

apachectl start

Unfortunately, the phpinfo() is still showing the same info, now mention of jpeg in either the php configure options or the gd section.

It doesn't seem like much is changing, does it cache old configure options somewhere that overwrite the ones specified in the command line?

And yup, I'm refreshing the phpinfo page :)

Is there an instruction page somewhere for compiling PHP with jpeg in for dummies? :)

Again thanks for your help,

Phill
phill@tmanage.com
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
The version of GD used on your server has no support forJPEG
« Reply #7 on: September 28, 2003, 04:56:05 am »

Mooney? Wha- ?

Anyway, if you want to PM me with your server details I don't mind having a look at it.  Having said that, I don't normally do this as it's not really CPG related but I'll give it a go.

Btw, you didn't have to recompile Apache after PHP :)
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 18 queries.