Piwigo.org

You are not logged in. (Register / Login)

Announcement

Post a reply

Write your message and submit

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Sephi
2005-01-17 19:59:37

Oh sorry I didn't see that... :\

plg
2005-01-17 12:34:35

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

Sephi
2005-01-17 11:37:28

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...

Guims
2005-01-17 09:44:22

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 !

Sephi
2005-01-16 23:53:56

Check in your MySQL configuration file the following parameter :
max_connections

Guims
2005-01-16 23:11:23

sh... :-(

plg
2005-01-16 22:49:43

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

Guims
2005-01-16 22:23:50

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
plg
2005-01-16 10:52:03

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)

Guims
2005-01-16 10:29:39

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...

plg
2005-01-16 10:23:24

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

Guims
2005-01-16 09:50:27

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 !

plg
2005-01-16 09:36:14

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

Guims
2005-01-16 09:17:44

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"

plg
2005-01-15 12:43:33

and the result of the query ?

Board footer

Powered by FluxBB

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