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: [Solved]: New user, created albums, but can't modify them  (Read 3930 times)

0 Members and 1 Guest are viewing this topic.

lucasorion

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
[Solved]: New user, created albums, but can't modify them
« on: February 28, 2008, 06:12:16 am »

I setup some albums recently, and decided I wanted to rename one, and delete another. When I try to do this, I get "Internal PHP Processing Error (#99911 - q:11) in /usr/home/orionneb/public_html/albums/delete.php"
Can someone help? I did find one mention of it being a problem possibly caused by the host's spam blocking settings misinterpreting the script, but I was able to modify my albums a couple days ago, when I renamed and deleted a few. Though I did that before they had files in them, if that makes any difference.

Thanks
« Last Edit: February 29, 2008, 05:31:46 pm by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: New user, created albums, but can't modify them
« Reply #1 on: February 28, 2008, 08:16:50 am »

Post a link to your gallery for a start.
Logged

lucasorion

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Logged

Nibbler

  • Guest
Re: New user, created albums, but can't modify them
« Reply #3 on: February 28, 2008, 01:55:40 pm »

Probably the spam blocker you mention. The code uses an @ symbol, so it might think 123@456 is an email address. This kicked in when you created more than 10 albums. You could try changing the code to use a different symbol or switch to a more sensible webhost.
Logged

lucasorion

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: New user, created albums, but can't modify them
« Reply #4 on: February 28, 2008, 09:31:37 pm »

so if I search the code of a particular php page (looks like delete.php) and replace that character with another one, I can expect it to still work?
I just signed on with this host, and don't want to switch already if this turns out to be the only hiccup.
Logged

Nibbler

  • Guest
Re: New user, created albums, but can't modify them
« Reply #5 on: February 28, 2008, 09:38:25 pm »

You can't blindly change the code, that will break it. The parts to change are here:

delete.php

Code: [Select]
function parse_orig_sort_order($value)
{
    if (!preg_match("/(\d+)@(\d+)/", $value, $matches))
        return false;

    return array('aid' => (int)$matches[1],
        'pos' => (int)$matches[2],
        );
}

Code: [Select]
               function parse_pic_orig_sort_order($value)
               {
                       if (!preg_match("/(\d+)@(\d+)/", $value, $matches))
                               return false;

                       return array(
                               'aid'   => (int)$matches[1],
                               'pos'   => (int)$matches[2],
                       );
               }

albmgr.php

Code: [Select]
if (count ($rowset) > 0) foreach ($rowset as $album) {
    $sort_order .= $album['aid'] . '@' . ($i++) . ',';
}

picmgr.php

Code: [Select]
   if (count ($rowset) > 0) foreach ($rowset as $picture){
      $sort_order .= $picture['pid'].'@'.($i++).',';
   }

Try changing each @ to maybe a colon.

You'll need to change them any time you update Coppermine.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: New user, created albums, but can't modify them
« Reply #6 on: February 29, 2008, 07:47:31 am »

Better ask your host to disable this silly feature.
Logged

lucasorion

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: New user, created albums, but can't modify them
« Reply #7 on: February 29, 2008, 12:45:39 pm »

thanks for the help, it worked
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 15 queries.