[UPHPU] MySQL PHP 5 Session-Based Hit Counter

Jacob Wright jacwright at gmail.com
Mon Jan 22 08:45:43 MST 2007


>
> Go to MSCIS.org, and you'll see the hit counter in my header. The MySQL
> connections all work fine, but the session-based incrementation does not
> work - the hit counter increments every page refresh. I included
> var_dump($_SESSION); at the bottom of the page so you can see it until I
> find the problem.
>

> Probably the biggest clue:  It works for my default hostname:
>

>  http://bstout.securesites.net
>

> It does not work for:
>

>  http://flfn.org
>
 http://mscis.org
>

Hey Brandon,

I'm not getting any cookies set on any of your pages (i.e.
http://bstout.securesites.net isn't working for me either). The headers
being sent to my browser are setting the cookie path to /tmp which says if
I'm at http://mscis.org/tmp then the cookie will be valid. Make sure your
cookie path is set to a plain ol' slash (/).

Set-Cookie: PHPSESSID=8oduagb1i4s0lu4r2olkrnkc97; path=/tmp

Hope this solves it!

Jacob


-- 
Jacob Wright
Within Code LLC


More information about the UPHPU mailing list