Hi,
I did not manage to install piwigo with any of the three "supported" database backends.
1. sqlite: After configuration, I ended up with
Warning: SQLite3::query(): Unable to prepare statement: 1, wrong number of arguments to function UNIX_TIMESTAMP() in /var/www/piwigo/include/dblayer/functions_sqlite.inc.php on line 129 DELETE FROM piwigo_sessions WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(expiration) > 3600 ; wrong number of arguments to function UNIX_TIMESTAMP()
2. PostgreSQL: Installation went fine, but either I did not understand the interface *at all* or it was just not possible to set any permissions or add images.
3. MySQL: My database lives on a different host, i.e. I entered the hostname in the corresponding field. However, piwigo ignores this setting and tries to connect to a local MySQL host via a unix socket, which obviously won't work.
I'm wondering which database backend people are using here... However, I'm using gallery3 now, that worked (better); just wanted to report the issues.
Tobias
Hello,
For the sqlite3 db problem you can do this modification in the file (piwigo/include/dblayer/functions_sqlite.inc.php):
Change this function :
function pwg_db_date_to_ts($date)
{
return 'UNIX_TIMESTAMP('.$date.')';
}
By this one :
function pwg_db_date_to_ts($date)
{
// updated by Fox074
//return 'UNIX_TIMESTAMP('.$date.')';
return "strftime('%s',".$date.')';
}
The function UNIX_TIMESTAMP does not existe in Sqlite3 replace it by strftime.
Fox074 wrote:
Hello,
For the sqlite3 db problem you can do this modification in the file (piwigo/include/dblayer/functions_sqlite.inc.php):
Change this function :
function pwg_db_date_to_ts($date)
{
return 'UNIX_TIMESTAMP('.$date.')';
}
By this one :
function pwg_db_date_to_ts($date)
{
// updated by Fox074
//return 'UNIX_TIMESTAMP('.$date.')';
return "strftime('%s',".$date.')';
}
The function UNIX_TIMESTAMP does not existe in Sqlite3 replace it by strftime.
thx can you report in the bugtracker http://piwigo.org/bugs/
Offline
I've created an entry on the bug tracker :
http://piwigo.org/bugs/view.php?id=2383
This is my first report so i hope i done it correctly.
If not please don't burn me and learn me how to do ;o)