Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2010-07-02 14:11:33

Gijs
Guest

more postgresql errors, renders administration impossible

This is related to

http://piwigo.org/forum/viewtopic.php?pid=114517
and these bugs are being worked on here:

http://piwigo.org/bugs/view.php?id=1754
and
http://piwigo.org/bugs/view.php?id=1755

For those developers, but more as a warning to other users:

installing the LocalFiles Editor plugin

(by patching
/plugins/LocalFilesEditor/maintain.inc.php )

is easy, but this will not really help you any. The local config file will not work, for instance increasing the max file upload does exactly nothing.

BUT

Deinstalling the plugin results in an error, and if you then log out, it looks like you will be locked out of the Administration.. oops

here is what I get:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses. in (path) include/dblayer/functions_pgsql.inc.php on line 122
select count(*) from piwigo_users where mail_address is not null group by upper(mail_address) having count(*) > 1 limit 0,1 ;
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.

#2 2010-07-02 14:32:57

Gijs
Guest

Re: more postgresql errors, renders administration impossible

Combing through postgresql-8.3-main.log

I find:

ERROR:  syntax error at or near "LIMIT" at character 58
STATEMENT:  DELETE FROM piwigo_config WHERE param='LocalFilesEditor' LIMIT 1;

and

STATEMENT: 
        SELECT id AS id,username AS username
        FROM piwigo_users
          ORDER BY CONVERT(username,CHAR)
        ;

and

ERROR:  duplicate key value violates unique constraint "piwigo_config_pkey"
STATEMENT: 
        INSERT INTO piwigo_config (param,value,comment)
        VALUES ('LocalFilesEditor' , 'off' , 'LocalFiles Editor plugin parameters');

#3 2010-07-02 15:12:00

Gijs
Guest

Re: more postgresql errors, renders administration impossible

Gijs wrote:

[...]

Deinstalling the plugin results in an error, and if you then log out, it looks like you will be locked out of the Administration.. oops

here is a way to get around this bug, at least, it seems to work on a Debian system

as root do:

su postgres

cd

psql  YOURDBNAME

DELETE FROM piwigo_config WHERE param='LocalFilesEditor';

\q

after which you can install & activate the LocalFiles plugin again....

#4 2010-07-02 17:08:50

Gijs
Guest

Re: more postgresql errors, renders administration impossible

So, I am currently stuck on this error:


Warning: pg_query() [function.pg-query]: Query failed: ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses. in
(path) /include/dblayer/functions_pgsql.inc.php on line 122
select count(*) from piwigo_users where mail_address is not null group by upper(mail_address) having count(*) > 1 limit 0,1 ;
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.

This pops up whenever I click on administration

I just uploaded 200 pics, as webmaster/admin I can see theme. However, the pending page is empty and as a gues these 200 pics are not visible.

I like it that the user rights work, but it would be nice if I understood how to get this error out of the way :-)

#5 2010-07-02 17:18:32

Gijs
Guest

Re: more postgresql errors, renders administration impossible

Some typo's in include/functions_user.inc.php

line number 56
set count (*)    // should be
SET COUNT(*)

and

line number  57
from '.USERS_TABLE.'  // should be
FROM '.USERS_TABLE.'

and  line number 58
where upper('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\')   // should be
WHERE UPPER('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\')

and line 59, I think the 'and' should be 'AND'...

#6 2010-07-03 14:08:35

nicolas
Former Piwigo Team
Registered: 2004-12-30
Posts: 1137
Website

Re: more postgresql errors, renders administration impossible

Gijs wrote:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses. in
(path) /include/dblayer/functions_pgsql.inc.php on line 122
select count(*) from piwigo_users where mail_address is not null group by upper(mail_address) having count(*) > 1 limit 0,1 ;
ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.

In plugins/c13y_upgrade/initialize.inc.php, line 50, remplace "limit 0,1" by "limit 1". PostgreSQLsyntax for limit clause must use OFFSET keyword.

Offline

Board footer

Powered by FluxBB

twitter facebook google+ newsletter Donate Piwigo.org © 2002-2014 · Contact