Solution to solve your /albums/edit from being deleted ... Solution to solve your /albums/edit from being deleted ...
 

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]

Main Menu

Solution to solve your /albums/edit from being deleted ...

Started by bryan, July 05, 2004, 03:38:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bryan

Hi,

I managed to get 'koder', also the system admin of my photo gallery to solve this problem for me. So just to share with you all ...

This simple script he added into 'upload.php' will actually automatically re-create the /albums/edit (if it's deleted) with the index.html inside if a user clicks 'Upload Files'.

Hope it helps you as it did for us.

Regards,
Bryan

Quote from: koder on July 05, 2004, 12:30:39 AM
Okay, seeing as you guys are having a shocker with this....

If you have no clue why it's getting deleted, why not just prevent the error for the time being?

Do the below, and it will make the directory if it doesn't exist, saving you the nightly mkdir :P


/* Search for spring_cleaning in upload.php, around line 403 */
function spring_cleaning($directory_path) {

    // Quickfix Start.
    if (!file_exists($directory_path)) {
               mkdir($directory_path);
               touch($directory_path.'/index.html');
   }
   // Quickfix End.  Do not modify anything else.

   /* This is for reference.  Do not modify the line below. */
    $directory_handle = opendir($directory_path);


omniscientdeveloper

#1
Actually, spring_cleaning has been updated. I doubt that the problem persists. If so, let me know. I'll have a look at it again.


-omni

[edit]

Hmm...I didn't update the stable version. It's in there now, so you shouldn't have to apply this patch. Try copying "upload.php" from the stable branch of CVS, and tell me if the problem persists. I don't have any problems.

[/edit]

Joachim Müller

it won't hurt to add the checking for the edit folder and create it if it's not there, so I suggest to incorporate Koder's fix even if there's no reason why the edit folder should vanish at all. There should be an additional chmod in the routine though...

GauGau

Tarique Sani

upload.php from Stable has a parse error  >:( >:( >:(

It is strongly recomended for all the devs that scripts be tested locally atleast once before commiting to CVS  :-\\
SANIsoft PHP applications for E Biz

omniscientdeveloper