Page 1 of 1

Bug: Admin Log can't be viewed, when database is Postgres

Posted: Mon Aug 29, 2005 2:07 pm
by martin42
Problem: "Admin Log" never shows any info!

PHP LOG:
    PHP Fatal error:  Call to a member function on a non-object in /usr/local/www/www.example.com/admin/adminlog.php on line 94

POSTGRES LOG:
    ERROR:  LIMIT #,# syntax is not supported
    HINT:  Use separate LIMIT and OFFSET clauses.

Looking in adminlog.php backwards from line 94, I'm guessing the SQL code that caused this was:

    $query = "SELECT * from ".cms_db_prefix()."adminlog ORDER BY timestamp DESC limit $from, $limit";
    $result = $db->Execute($query);

I'm out of my depth here! Is it possible to adjust adminlog.php to avoid using "limit" in this way?

Thanks!

- Martin

Re: Bug: Admin Log can't be viewed, when database is Postgres

Posted: Mon Aug 29, 2005 3:51 pm
by Ted
Yeah, there should be an adodb abstraction to handle this instead of directly in the sql.  I'll put it on my list.

Re: Bug: Admin Log can't be viewed, when database is Postgres

Posted: Mon Aug 29, 2005 4:50 pm
by martin42
Thanks!

Re: Bug: Admin Log can't be viewed, when database is Postgres

Posted: Wed Aug 31, 2005 1:47 am
by Ted
This is fixed in svn....  I think.  It's using the abstraction from ADODB, so I'm assuming that it'll work properly in postgres.  I don't have it installed currently to double check, though.

Re: Bug: Admin Log can't be viewed, when database is Postgres

Posted: Wed Aug 31, 2005 5:23 am
by martin42
Great. I'll install Subversion tonight and test it.  Can I just take adminlog.php in isolation?  I don't really want to run the whole dev release now that my site is populated ;-)

Re: Bug: Admin Log can't be viewed, when database is Postgres

Posted: Wed Aug 31, 2005 10:38 am
by Ted
Sure.  http://svn.cmsmadesimple.org/cms/trunk/ ... minlog.php will be the latest version.

FIXED!! Admin Log can't be viewed, when database is Postgres

Posted: Wed Aug 31, 2005 11:10 am
by martin42
Ah, so I don't even need to install a Subversion client - great.

I've just tested that.  It works perfectly!  Very good level of admin logging there.

Now CMSMS is working perfectly with Postgres AFAICT :-)


Many thanks! 

Re: Bug: Admin Log can't be viewed, when database is Postgres

Posted: Wed Aug 31, 2005 12:06 pm
by Ted
Excellent!  Thanks for the heads up on that bug.  There is still some non-adodb sql coe floating around that I'll never find without people testing it.

Thanks again!