View Full Version : sessions
09-12-2005, 02:02 PM
sorry ive searched through google but my friends php host somewhat wont use sessions or wont send or set the cookie on the client
the script works fine on my computer and my host and another friends host but this host wont set the session
can i somehow enable this or something?
09-12-2005, 02:34 PM
The first thing to do is probably to find out exactly what support the server does offer for sessions, it may be that you just need to change a setting, either through php.ini or using a .htaccess file, but first I'd do a phpinfo() on the server and look for the section headed "session" and see what support is there.
09-12-2005, 02:35 PM
Maybe you should speak to the host an ensure they have session handling set up correctly. Also, check a basic setcookie() (eg:
setcookie('cookiename', 'value', time()+300);
to see if any cookies are being set. Are you on a paid host?
09-12-2005, 04:32 PM
Just making sure: "common pitfall no.1" in the manual:
Cookies will not become visible until the next loading of a page that the cookie should be visible for. To test if a cookie was successfully set, check for the cookie on a next loading page before the cookie expires. Expire time is set via the expire parameter. A nice way to debug the existence of cookies is by simply calling print_r($_COOKIE);.
Though reloading that page should actually do the trick.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.