Hi,

I use postgresql 7.1.3 and 7.2, just change that function like below, it
will be ok.

function da_sql_fetch_array($result,$config)
{
/*      $row =
@pg_fetch_array($result,$config[tmp_pg_array_num][$result]++,PGSQL_ASSOC);
        if (!$row)
                $config[tmp_pg_array_num][$result] = 0;
        return $row;*/
        return @pg_fetch_array($result);
}

and for that time2strclock, change to below

        if ($time){
                if ($time < 10)
                        $time = "0" . $time;
        }
        else
                $time = "00";
        $str["sec"] = "$time";

not just comment those two lines.

Ju Bin

----- Original Message -----
From: "Timophey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 9:20 PM
Subject: dialup_admin bug(s)(fixes)


> Hello all.
>
> I have a problem with dialup_admin: I just can't get it working correctly
> with databses. :)
> PostgreSQL, PHP 4.1.2
> I have created all databases and granted all permissions. But I still
can't
> get it working.
>
> I hope the problem is in  ~/dialup_admin/lib/sql/drivers/pg/functions.php3
> file.
> there is a link to $config variable "tmp_pg_array_num" in the function
> "da_sql_fetch_array
>
> function da_sql_fetch_array($result,$config)
> {
>         $row =
> @pg_fetch_array($result,$config[tmp_pg_array_num][$result]++,PGSQL_ASSOC);
>         if (!$row)
>                 $config[tmp_pg_array_num][$result] = 0;
>         return $row;
> }
>
> in the default "admin.conf"  file there are no such variable.
> What value of "tmp_pg_array_num" should I put in the amdin.conf file?
>
> I have rewritten this function, but in this case I should rewrite almost
all
> dialup_admin. I would not rather do that.
> What would you advise me?
>
> Also there is a small bug in ~/dialup_admin/lib/functions.php3, in
function
> "time2strclock":
> in "Online Users" page, seconds of connection duration are not shown if
> second's amount is more than 9
> I propose to comment out last 2 lines of  least "if" - condition.
>
> function time2strclock($time)
> {
> <skipped>
>
>         if ($time)
>                 if ($time < 10)
>                         $time = "0" . $time;
>         #else
>         #       $time = "00";
>         $str["sec"] = "$time";
>         $ret = "$str[hour]:$str[min]:$str[sec]";
>
>         return $ret;
> }
>
>
> Thanx in advance,
>                             Timophey.
>
>
>
>
>


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to