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: Notice: Undefined index: 1 in /path/mainfile.php on line 202  (Read 15959 times)

0 Members and 1 Guest are viewing this topic.

tkx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Notice: Undefined index: 1 in /path/mainfile.php on line 202
« on: November 08, 2003, 09:08:40 am »

I get this error whenever I run coppermine.... I checked the reference, and the part in the code is highlighted in red... Any1 else have this problem, or else know how to fix it without impacting the rest of the site (bearing in mind that it is the mainfile.php).  Powered by Coppermine Photo Gallery v1.1  Version for phpnuke by Surf v1.1D

Quote
function is_admin($admin) {
    global $prefix, $db;
    if(!is_array($admin)) {
        $admin = base64_decode($admin);
        $admin = explode(":", $admin);
        $aid = "$admin[0]";
        $pwd = "$admin[1]";
    } else {
        $aid = "$admin[0]";
        $pwd = "$admin[1]";
    }
    if ($aid != "" AND $pwd != "") {
        $sql = "SELECT pwd FROM ".$prefix."_authors WHERE aid='$aid'";
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        $pass = $row['pwd'];
        if($pass == $pwd && $pass != "") {
            return 1;
        }
    }
    return 0;
}
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
Notice: Undefined index: 1 in /path/mainfile.php on line 202
« Reply #1 on: November 08, 2003, 09:50:29 am »

Did you add additional modules to your phpNuke installation ?
Also which version of phpNuke ?
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

sengsara

  • Translator
  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
    • http://batamweb.net
Notice: Undefined index: 1 in /path/mainfile.php on line 202
« Reply #2 on: November 10, 2003, 02:29:19 am »

You need to answer this question:
Quote
Did you add additional modules to your phpNuke installation ?
Also which version of phpNuke ?

After that try this
Code: [Select]
$pwd = "$admin['1']";
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fbatamweb.net%2F4leechers%2Fsengsaraatgmail.gif&hash=5023c7ba1bc4142435e406735fee30bc611c5a03)

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
Notice: Undefined index: 1 in /path/mainfile.php on line 202
« Reply #3 on: November 10, 2003, 04:24:09 am »

Quote from: "sengsara"

After that try this
Code: [Select]
$pwd = "$admin['1']";


$pwd = "{$admin['1']}"; cos array values need to be between brackets  :wink:
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 18 queries.