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: Solution to solve your /albums/edit from being deleted ...  (Read 3912 times)

0 Members and 1 Guest are viewing this topic.

bryan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 53
    • http://www.bryanchung.per.sg
Solution to solve your /albums/edit from being deleted ...
« on: July 05, 2004, 03:38:36 am »

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

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

Code: [Select]
/* 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

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: Solution to solve your /albums/edit from being deleted ...
« Reply #1 on: July 05, 2004, 03:41:48 am »

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]
« Last Edit: July 05, 2004, 03:57:25 am by omniscientdeveloper »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Solution to solve your /albums/edit from being deleted ...
« Reply #2 on: July 05, 2004, 08:26:15 am »

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
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Solution to solve your /albums/edit from being deleted ...
« Reply #3 on: July 05, 2004, 09:07:27 am »

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  :-\\
Logged
SANIsoft PHP applications for E Biz

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Re: Solution to solve your /albums/edit from being deleted ...
« Reply #4 on: July 05, 2004, 11:56:03 am »

  :o :\'(

Sorry. It's fixed now.

XX


-omni
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 15 queries.