Piwigo.org

You are not logged in. (Register / Login)

Announcement

#16 2005-01-15 12:30:34

Guims
Member
Location: Bruxelles
Registered: 2004-07-31
Posts: 49

Re: [1.4.0 RC1] log problem

z0rglub wrote:


Byt the way, which distribution are you using ? Sarge ? Ubuntu warty ? SID ?

sorry I don't know this... :-(

Last edited by Guims (2005-01-15 12:33:42)

Offline

#17 2005-01-15 12:43:33

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: [1.4.0 RC1] log problem

and the result of the query ?


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#18 2005-01-16 09:17:44

Guims
Member
Location: Bruxelles
Registered: 2004-07-31
Posts: 49

Re: [1.4.0 RC1] log problem

z0rglub wrote:

and the result of the query ?

On identification page :

Code:

[1] 

SELECT param,value
 FROM phpwebgallery_config
;
(this query time : 0.001 s)
(total SQL time  : 0.001 s)

[2] 

SELECT user_id,expiration,NOW() AS now
  FROM phpwebgallery_sessions
  WHERE id = '5qoP05okN4'
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[3] 

SELECT u.*, uf.*
  FROM phpwebgallery_users AS u LEFT JOIN phpwebgallery_user_forbidden AS uf
    ON id = user_id
  WHERE u.id = 2
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

and after identification :

Code:

[1] 

SELECT param,value
 FROM phpwebgallery_config
;
(this query time : 0.000 s)
(total SQL time  : 0.000 s)

[2] 

SELECT user_id,expiration,NOW() AS now
  FROM phpwebgallery_sessions
  WHERE id = '5qoP05okN4'
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[3] 

SELECT u.*, uf.*
  FROM phpwebgallery_users AS u LEFT JOIN phpwebgallery_user_forbidden AS uf
    ON id = user_id
  WHERE u.id = 2
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[4] 

SELECT id, password
  FROM phpwebgallery_users
  WHERE username = 'Guillaume'
;
(this query time : 0.001 s)
(total SQL time  : 0.002 s)

[5] 

SELECT id
  FROM phpwebgallery_sessions
  WHERE id = 'WxNKoxVMkx'
;
(this query time : 0.001 s)
(total SQL time  : 0.002 s)

[6] 

INSERT INTO phpwebgallery_sessions
  (id,user_id,expiration)
  VALUES
  ('WxNKoxVMkx',1,
   ADDDATE(NOW(), INTERVAL 3600 SECOND))
;
(this query time : 0.011 s)
(total SQL time  : 0.013 s)


Warning: Cannot modify header information - headers already sent by 
(output started at /home/www/guims.freeownhost.com/Galerie/include/functions.inc.php:516) 
in /home/www/guims.freeownhost.com/Galerie/include/functions_session.inc.php
 on line 99

and when I'm on category.php :

Code:

[1] 

SELECT param,value
 FROM phpwebgallery_config
;
(this query time : 0.000 s)
(total SQL time  : 0.000 s)

[2] 

SELECT user_id,expiration,NOW() AS now
  FROM phpwebgallery_sessions
  WHERE id = '5qoP05okN4'
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[3] 

SELECT u.*, uf.*
  FROM phpwebgallery_users AS u LEFT JOIN phpwebgallery_user_forbidden AS uf
    ON id = user_id
  WHERE u.id = 2
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[4] 
SELECT SUM(nb_images) AS total FROM phpwebgallery_categories;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[5] 

SELECT name,id,date_last,nb_images,global_rank
  FROM phpwebgallery_categories
  WHERE 1 = 1
    AND (id_uppercat is NULL)
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[6] 

SELECT id, name, date_last
  FROM phpwebgallery_categories
  WHERE id_uppercat is NULL
  ORDER BY rank
;
(this query time : 0.000 s)
(total SQL time  : 0.001 s)

[7] 

SELECT path, tn_ext
  FROM phpwebgallery_categories AS c INNER JOIN phpwebgallery_images AS i
    ON i.id = c.representative_picture_id
  WHERE uppercats REGEXP '(^|,)1(,|$)'
  ORDER BY RAND()
  LIMIT 0,1
;
(this query time : 0.000 s)
(total SQL time  : 0.002 s)

[8] 
insert into phpwebgallery_history (date,login,IP,file,category,picture) values (NOW(), 'visiteur','81.165.158.247','category','Accueil','');
(this query time : 0.000 s)
(total SQL time  : 0.002 s)

in the adress bar it's "...Galerie/category.php?id=WxNKoxVMkx"

Offline

#19 2005-01-16 09:36:14

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: [1.4.0 RC1] log problem

No, I wanted you to execute this query :

Code:

SELECT NOW(), ADDDATE(NOW(), INTERVAL 3600 SECOND) AS 1_hour_future;

This will tell us if the function adddate works correctly on your MySQL version


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#20 2005-01-16 09:50:27

Guims
Member
Location: Bruxelles
Registered: 2004-07-31
Posts: 49

Re: [1.4.0 RC1] log problem

sorry...

Code:

 NOW( )                 1_hour_future
2005-01-16 02:45:23   2005-01-16 03:45:23

I think it works because with IE everything's fine !

Last edited by Guims (2005-01-16 09:51:59)

Offline

#21 2005-01-16 10:23:24

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: [1.4.0 RC1] log problem

Where are you in the world now ? your time is not correct if you're in Bruxelles (but that's not the problem...)


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#22 2005-01-16 10:29:39

Guims
Member
Location: Bruxelles
Registered: 2004-07-31
Posts: 49

Re: [1.4.0 RC1] log problem

z0rglub wrote:

Where are you in the world now ? your time is not correct if you're in Bruxelles (but that's not the problem...)

It's a free server inthe usa...
I'm in Brussels by the way...

Offline

#23 2005-01-16 10:52:03

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: [1.4.0 RC1] log problem

the behaviour you're describing is very strange :-/

1. it works in Microsoft Internet Explorer and not in Mozilla FireFox : this can only be a problem of cookie in my opinion. BUT PhpWebGallery can deal with browser with cookies disabled.

2. your local time is very different from your server time : the expiration time of the locally created cookie is always in the past. I explain : by default, cookies expires only 1 hour after creation, the starting time is defined on the server and the cookie is set on the client, you see the problem I suppose...

3. the PhpWebGallery queries you showed tell me the session in inserted correctly in the database but on the next page (after redirection) it tells me that the session does not exist in the table :-/ I'm a bit disappointed. Where did this line disappeared ?

Make the foolowing tests :

1. in include/user.inc.php, line 55, after

Code:

.
  if (mysql_num_rows($result) > 0)
  {
    $row = mysql_fetch_array($result);
    if (strnatcmp($row['expiration'], $row['now']) < 0)
    {
      // deletion of the session from the database, because it is
      // out-of-date
      $delete_query = '
DELETE FROM '.SESSIONS_TABLE.'
  WHERE id = \''.$page['session_id'].'\'
;';
      pwg_query($delete_query);
    }
    else
    {
      $user['id'] = $row['user_id'];
      $user['is_the_guest'] = false;
    }
  }

insert

Code:

  else
  {
    die('Session '.$page['session_id'].' does not exist');
  }

delete your cookie and try to connect once more

2. delete the small piece of code added previously and during connection, check the box "auto login"  (or "Connexion auto" en français)


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#24 2005-01-16 22:23:50

Guims
Member
Location: Bruxelles
Registered: 2004-07-31
Posts: 49

Re: [1.4.0 RC1] log problem

Now I have this...

Code:

Warning: mysql_connect(): 
Too many connections in /home/www/guims.freeownhost.com/Galerie/include/common.inc.php 
on line 129 Could not connect to database server

Offline

#25 2005-01-16 22:49:43

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: [1.4.0 RC1] log problem

this is another problem, no relation with the previous one :-)


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#26 2005-01-16 23:11:23

Guims
Member
Location: Bruxelles
Registered: 2004-07-31
Posts: 49

Re: [1.4.0 RC1] log problem

sh... :-(

Offline

#27 2005-01-16 23:53:56

Sephi
Former Piwigo Team
Location: Suisse
Registered: 2004-11-28
Posts: 430
Website

Re: [1.4.0 RC1] log problem

Check in your MySQL configuration file the following parameter :
max_connections

Offline

#28 2005-01-17 09:44:22

Guims
Member
Location: Bruxelles
Registered: 2004-07-31
Posts: 49

Re: [1.4.0 RC1] log problem

Sephi wrote:

Check in your MySQL configuration file the following parameter :
max_connections

hum... I don't know where I have to check this...
sorry !

Offline

#29 2005-01-17 11:37:28

Sephi
Former Piwigo Team
Location: Suisse
Registered: 2004-11-28
Posts: 430
Website

Re: [1.4.0 RC1] log problem

So you'll have to read some documentation about MySQL... Maybe it's in /etc/someName, where someName is something like MySQL... But I'm not sure, it's just a supposition...

Offline

#30 2005-01-17 12:34:35

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11717
Website

Re: [1.4.0 RC1] log problem

Guims uses a remote server, I'm not sure he can reach this information


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013