Announcement

#1 2011-07-21 01:20:47

g-hennux
Guest

piwigo installation

Hi,

I did not manage to install piwigo with any of the three "supported" database backends.

1. sqlite: After configuration, I ended up with

Code:

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

 

#2 2011-07-21 18:18:15

Fox074
Guest

Re: piwigo installation

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.

 

#3 2011-07-21 18:45:39

flop25
Piwigo Team
2006-07-06
7037

Re: piwigo installation

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/


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2011-07-22 11:10:38

Fox074
Guest

Re: piwigo installation

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)

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact