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: Coppermine and PHP4.4.1  (Read 4584 times)

0 Members and 1 Guest are viewing this topic.

topagency

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Coppermine and PHP4.4.1
« on: November 02, 2005, 05:12:23 pm »

hello
i have the same problem on my copermine
the company that my site is host in upgrade to php 4.4.1
i talked with them and the problem is with this version 4.4.1
they set it back to 4.4.0 and everything was ok
so i just want you to know the problem is in php 4.4.1
copermine cpg 1.3 have a bug* with this ver. of php.
the bug* is in the file upload.php.

*not sure its a bug maybe a missmatch between versions.

hope you will fix it sonn

thanks in advanced

gilad

www.topagency.co.il/copermine
Logged

josini

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Coppermine and PHP4.4.1
« Reply #1 on: November 02, 2005, 05:50:38 pm »

I have the same problem after server-upgrade to PHP4.4.1.

I'm not able to upload anything - have tried all described in "Troubleshooting".

Link: http://www.nissanklubben.dk/foto

Test-user: Coppermine
Test-pw: fun4free

The file-upload is OK and I can see it on the server in the /edit folder with name: mHTTP_temp_0f73ca9b.JPG and file-privileges -rw-rw-rw- but when I click continue I get the following:
Warning: imagejpeg(): Unable to access ./albums/edit/preview_4e203626.JPG in /net/users/a26/475/nissanklubbendk/www/foto/include/picmgmt.inc.php on line 209

Warning: imagejpeg(): Invalid filename './albums/edit/preview_4e203626.JPG' in /net/users/a26/475/nissanklubbendk/www/foto/include/picmgmt.inc.php on line 209

Warning: chmod(): Unable to access ./albums/edit/preview_4e203626.JPG in /net/users/a26/475/nissanklubbendk/www/foto/include/picmgmt.inc.php on line 215

Warning: chmod(): No such file or directory in /net/users/a26/475/nissanklubbendk/www/foto/include/picmgmt.inc.php on line 215

Warning: getimagesize(): Unable to access ./albums/edit/preview_4e203626.JPG in /net/users/a26/475/nissanklubbendk/www/foto/include/picmgmt.inc.php on line 217

Warning: getimagesize(./albums/edit/preview_4e203626.JPG): failed to open stream: Permission denied in /net/users/a26/475/nissanklubbendk/www/foto/include/picmgmt.inc.php on line 217


Output from log:
USER:
------------------
Array
(
    [ID] => 655fab58d9b461365af6471842e438bd
    [am] => 1
    [liv] => Array
        (
           
  • => 2546

        )

)

==========================
USER DATA:
------------------
Array
(
   
  • => 1074

    [user_id] => 1074
    [1] => Coppermine
    [user_name] => Coppermine
    [2] => 3
    [mgroup] => 3
    [3] => 3
    [group_id] => 3
    [4] => Medlem
    [group_name] => Medlem
    [5] => 2048
    [group_quota] => 2048
    [6] => 0
    [has_admin_access] =>
    [7] => 1
    [can_rate_pictures] => 1
    [8] => 1
    [can_send_ecards] => 1
    [9] => 1
    [can_post_comments] => 1
    [10] => 1
    [can_upload_pictures] => 1
    [11] => 1
    [can_create_albums] => 1
    [12] => 0
    [pub_upl_need_approval] => 0
    [13] => 0
    [priv_upl_need_approval] => 0
    [14] => 3
    [upload_form_config] => 3
    [15] => 0
    [custom_user_upload] => 0
    [16] => 5
    [num_file_upload] => 5
    [17] => 3
    [num_URI_upload] => 3
    [groups] => Array
        (
           
  • => 3

        )

    [can_see_all_albums] =>
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content FROM cpg11d_filetypes;

    [1] => SELECT id as user_id, name as user_name, mgroup FROM `nissanklubbendk`.nkmembers WHERE id='1074' AND  member_login_key='***'
    [2] => SELECT * FROM cpg11d_usergroups WHERE group_id = '3'
    [3] => DELETE FROM cpg11d_banned WHERE expiry < 1130949860
    [4] => SELECT * FROM cpg11d_banned WHERE ip_addr='193.163.255.100' OR ip_addr='172.28.37.157' OR user_id=1074
    [5] => SELECT aid FROM cpg11d_albums WHERE visibility != '0' AND visibility !='11074' AND visibility NOT IN (3)
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
    [unique_ID] => ff1b228c
    [control] => phase_2
)

==========================
Page generated in 0.722 seconds - 6 queries in 0.004 seconds - Album set :
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 PHP4.4.1
« Reply #2 on: November 02, 2005, 07:09:54 pm »

Do you have the same issue when doing a batch add?

This sounds suspiciously like an ownership issue.  Look in the edit directory and see who owns the image (not what the permissions are.)
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

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 PHP4.4.1
« Reply #3 on: November 02, 2005, 07:21:23 pm »

Is your server running PHP in safe mode?  There is a bug report at bugs.php.net about safe_mode and imagejpeg() in 4.4.1.

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

To test this, 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']);

See if that fixes the problem.
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

josini

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Coppermine and PHP4.4.1
« Reply #4 on: November 02, 2005, 10:23:26 pm »

Is your server running PHP in safe mode?  There is a bug report at bugs.php.net about safe_mode and imagejpeg() in 4.4.1.

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

To test this, 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']);

See if that fixes the problem.
Fantastic....!!! That minor code-fix fixed problems with upload. And YES - my server runs in safemode!

Thx.
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 PHP4.4.1
« Reply #5 on: November 02, 2005, 11:57:39 pm »

Glad that your issue is resolved.  I posted a sticky topic about 4.4.1 and imagejpeg().

http://forum.coppermine-gallery.net/index.php?topic=23342.0
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
Pages: [1]   Go Up
 

Page created in 0.055 seconds with 15 queries.