forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: dleary on March 21, 2006, 09:03:43 pm

Title: 'Impossible to move file' fix
Post by: dleary on March 21, 2006, 09:03:43 pm
I have experienced an 'impossible to move file' bug, with both coppermine 1.3.1 and 1.4.4.
I use php 4.1.0 on windows.

It only occurs when uploading a file through the form, not for a URI.

The problem:
The relative path of the form "./albums/edit/mHTTP_temp_..." is not working properly for the later call of move_uploaded_file()

The fix:

Find the first location of '$path_to_image = ...' in upload.php
This is on line 1210 for cpg144

make it read:  '$path_to_image = dirname(__FILE__) . ...'

I have attached a unified diff, but it's only one line.