Pale Posted July 21, 2008 Share Posted July 21, 2008 Hi all, I've run some simple websites on my host for over a year now. All of the sudden, all of my logins have stopped working. I've narrowed this down to a session issue and wrote this test script... http://mikegamin.com/temp/sessionTest.php The source code running that test script is echoed out on the page as well so you can all see it. Basically all it's supposed to do is set and unset a session variable alternating on every refresh. The session variable never truly gets set though. Could someone take a look at this and confirm my suspicion that my host is to blame. FYI, this server is running PHP 4, but I don't think that should matter as sessions have been around forever. Thanks in advance for the help. BTW, I've been looking for a good PHP forum and this is my first post here, so I look forward to getting help and helping out as many people as I can in the future. Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/ Share on other sites More sharing options...
cooldude832 Posted July 21, 2008 Share Posted July 21, 2008 Looks to be working fine. You aren't setting any sessions so of course it will be blank. Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595582 Share on other sites More sharing options...
Pale Posted July 21, 2008 Author Share Posted July 21, 2008 I thought I'd attach the file in case anyone wanted to throw it up on their server to make sure it runs correctly... [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595583 Share on other sites More sharing options...
Pale Posted July 21, 2008 Author Share Posted July 21, 2008 Looks to be working fine. You aren't setting any sessions so of course it will be blank. I'm confused by this. So you do believe I am doing something wrong here? Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595585 Share on other sites More sharing options...
cooldude832 Posted July 21, 2008 Share Posted July 21, 2008 try <?php session_start(); print_r($_SESSION); $_SESSION['Test'] = "This is a session"; print_r($_SESSION); ?> Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595588 Share on other sites More sharing options...
Pale Posted July 21, 2008 Author Share Posted July 21, 2008 http://mikegamin.com/temp/sessionTest2.php That's your code. Notice that the second print always has something because the session variable was just set, but the first print is never filled, even after a refresh. Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595593 Share on other sites More sharing options...
cooldude832 Posted July 21, 2008 Share Posted July 21, 2008 It should be check your phpinfo(); and see what it says under sessions stuff Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595595 Share on other sites More sharing options...
Pale Posted July 21, 2008 Author Share Posted July 21, 2008 http://mikegamin.com/temp/phpinfo.php Everything looks right to me.. am I missing something? Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595597 Share on other sites More sharing options...
d3cl4n Posted July 21, 2008 Share Posted July 21, 2008 If all of your scripts were previously working and you haven't edited them it may have been something your host has changed/updates yes. I suggest you email then and ask them what updates they've undertaken recently. Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595600 Share on other sites More sharing options...
Pale Posted July 21, 2008 Author Share Posted July 21, 2008 Yeah, I've already sent them like five emails.... I switched my script over to php5... http://mikegamin.com/temp/sessionTest.php5 And I get several write errors which seems to definitely point to a problem they are having... http://mikegamin.com/temp/sessionTest.php5 Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595603 Share on other sites More sharing options...
Pale Posted July 21, 2008 Author Share Posted July 21, 2008 Well I managed to temporarily fix this problem by creating a php.ini file to override the default one in all appropriate directories that points session.save_path to a directory i have control over. Hurray i guess. They better fix it properly soon. Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595828 Share on other sites More sharing options...
revraz Posted July 21, 2008 Share Posted July 21, 2008 Yep, I was going to suggest you look at the php.ini file for the save path. Link to comment https://forums.phpfreaks.com/topic/115850-php-sessions-this-is-my-hosts-problem-right/#findComment-595868 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.