Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Coppermine and PHP 4.4.1 - imagejpeg workaround  (Read 43164 times)

0 Members and 1 Guest are viewing this topic.

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Coppermine and PHP 4.4.1 - imagejpeg workaround
« on: November 02, 2005, 11:56:47 pm »

If your server is running PHP 4.4.1 and is also running in safe mode, you may have issues with uploading jpeg images.  You may receive this type of error message:

Unable to create thumbnail or reduced size image.
imagejpeg(): unable to access

There is a bug report at bugs.php.net about safe_mode and imagejpeg() in 4.4.1.

http://bugs.php.net/?id=35060

This workaround will fix the issue, until a fix from PHP is released.  Open up picmgmt.inc.php, find (around line 209)

Code: [Select]
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
and replace with

Code: [Select]
$fh=fopen($dest_file,'w');
fclose($fh);
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);

If you are using GD1, look a few lines above and make a similar change.
« Last Edit: December 04, 2005, 11:51:53 pm by kegobeer »
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

JDuc

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 20
    • TAMUMC
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #1 on: November 28, 2005, 11:38:17 pm »

where should picmgmt.inc.php be located?  what folder?

thanks :)
Logged

Nibbler

  • Guest
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #2 on: November 28, 2005, 11:40:13 pm »

It's under include::)
Logged

dizydizzy

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #3 on: December 01, 2005, 09:44:46 pm »

After 3 days of searching this forum I finally found the answer here in this thread...thnx to Kegobeer I finally got CPM to work.

Big  :-* to you.  ;)
Logged

Poom

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #4 on: December 04, 2005, 06:45:20 pm »

This won't work for me :(
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #5 on: December 04, 2005, 11:08:13 pm »

Quote from: Poom
This won't work for me

Because you did not apply the fix correctly, as stated in your related thread.

This thread is now locked.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #6 on: February 24, 2006, 05:32:23 pm »

@dev team: should this go into the maintenance release?
Logged

Nibbler

  • Guest
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #7 on: February 24, 2006, 05:44:40 pm »

Will do.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #8 on: February 26, 2006, 06:54:47 pm »

The code in this fix has gone into cpg1.4.4 - users running any previous versions may have to apply the fix, users who run cpg1.4.4 (or better) won't have to.

[edit GauGau 2006-03-01]
The fix didn't go into cpg1.4.4, sorry folks - see postings below
[/edit]
« Last Edit: March 01, 2006, 07:56:06 pm by GauGau »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #9 on: March 01, 2006, 07:07:21 pm »

I don't see it in the 1.4.4 release.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #10 on: March 01, 2006, 07:55:03 pm »

dang, something went wrong:  the last-minute commit didn't make it into the package. Oh well, sorry then: I edited my above posting accordingly.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Coppermine and PHP 4.4.1 - imagejpeg workaround
« Reply #11 on: May 18, 2006, 06:12:51 am »

The fix has gone into stable and devel branch today. This means that the fix will go into cpg1.4.6. All users who run an older version together with PHP4.4.1 will have to apply the fix manually (or even better upgrade to cpg1.4.6 once it got released).
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 21 queries.