PHPee.com PHP development forum
Cookie error

 
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger bug reports
View previous topic :: View next topic  
Author Message
teezee



Joined: 05 Feb 2004
Posts: 1
Location: Utrecht, the Netherlands

PostPosted: Thu Feb 05, 2004 6:14 pm    Post subject: Cookie error Reply with quote
If you have your stats on the same server as your website, and you use a username and password in cookie-system you'll get tons of javascript errors. Why?

I think i figured it out (a bit) but haven't been able to fix it completely:

My site runs on it's normal webroot: http://www.domain.com/ but my phpee stats run on http://www.domain.com/tools/stats/

In my website I also use username and password, users can choose to store it in session or in cookie. These vars are named username and password. When pressing login, the following pages give an error because instead of the pphlogger.js the phpee login screen is loaded, saying your username and password are wrong! I tried to fix it by giving all setcookie tags from phpee the setcookie path "/tools/stats/" but that didn't work.
Anyone ideas?
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 1102
Location: London, UK

PostPosted: Thu Feb 05, 2004 11:30 pm    Post subject: Reply with quote
Try the following:

Open login.php
On lines 53 and 54 you'll see the following two lines
PHP:
setcookie("username", $username);
setcookie("password", $password);

Change with the following:
PHP:
setcookie("username", $username, 3600, '/tools/stats/', 'www.domain.com');
setcookie("password", $password, 3600, '/tools/stats/', 'www.domain.com');


You'll obviously need to tweak parts of that.
Give it a try and let me know what happens.

David
_________________
-----
PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger bug reports All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB
Theme design based on Team 101 Designs, modified by Philip Iezzi