EnglishOh sorry I didn't see that... :\
Guims uses a remote server, I'm not sure he can reach this information
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...
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 !
Check in your MySQL configuration file the following parameter :
max_connections
sh... :-(
this is another problem, no relation with the previous one :-)
Now I have this...
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
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
.
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
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)
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...
Where are you in the world now ? your time is not correct if you're in Bruxelles (but that's not the problem...)
sorry...
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 !
No, I wanted you to execute this query :
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
z0rglub wrote:
and the result of the query ?
On identification page :
[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 :
[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 99and when I'm on category.php :
[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"
and the result of the query ?