No Support > Announcements

Coppermine and PHP 4.4.1 - imagejpeg workaround

(1/3) > >>

kegobeer:
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: ---imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
--- End code ---

and replace with


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

If you are using GD1, look a few lines above and make a similar change.

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

thanks :)

Nibbler:
It's under include.  ::)

dizydizzy:
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.  ;)

Poom:
This won't work for me :(

Navigation

[0] Message Index

[#] Next page

Go to full version