[Solved]: New user, created albums, but can't modify them [Solved]: New user, created albums, but can't modify them
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: New user, created albums, but can't modify them

Started by lucasorion, February 28, 2008, 06:12:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lucasorion

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

Joachim Müller



Nibbler

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.

lucasorion

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.

Nibbler

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

delete.php


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],
        );
}



               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


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


picmgr.php


   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.

Joachim Müller

Better ask your host to disable this silly feature.

lucasorion