Solved

[urgent] php session suddenly doesn't work

Posted on 2011-02-11
11
448 Views
Last Modified: 2012-05-11
All of the sudden all of my session doesn't work properly. I even copy and paste the sample on the following page:
http://php.net/manual/en/function.session-start.php

when i go to next page, the session variable are empty. print_r($_SESSION) displays nothing. Help me!

0
Comment
Question by:edyonline
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34875862
Is session_start() at the top of every page?
0
 

Author Comment

by:edyonline
ID: 34875872
yes, nothing changed, is this server side issue?
0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 34875906
Was there any change / update at the web host ?
PHP upgrade ? Do you use cookies with sessions ?
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34875917
It has to be because the only thing browsers have to do with the session is possibly storing a cookie with the session id.  And yes, Something has changed or it would be working still.  Make sure there is nothing, not even white space, before the first "<?php" tag.
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 34877159
1. What does your code look like?

2. What happens when you:
echo session_id();
...after session_start()?

3. Have you tried the full steps to reproduce the problem on different browsers or on different networks?

4. If it happens with all browser / all networks, then the problem is definitely on the server, in which case I would first check for any disk space issues, then I would look at my php.ini file to find out where the session files are stored and would double-check to make sure there are no permissions problems there (a file should be created for each new session).
0
 

Author Comment

by:edyonline
ID: 34877232
it's not resolved yet but i think i'm getting close to find the root cause.. everytime I reboot the server, the session works just fine... but after a while the session problem come  back again... maybe something to do with memory or space issue?
0
 

Author Comment

by:edyonline
ID: 34877239
to add more information, I checked the  save_path in php.ini and all files inside that folders have 0 bytes  file. But as i said previously, after reboot immediately everything is good for a while. How do I fix it? what should I look next?
0
 

Author Comment

by:edyonline
ID: 34877300
It's resolved now. The problem was the space issue. 100% on the mounted hd. Freed up some huge files and everything works perfect
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 34877447
I suggested checking for disk space issues.
0
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 500 total points
ID: 34879285
Sorry, that should have been an objection. My comment was that the resolution was a disk space issue, which I first suggested to check, so the objection is to the self-resolution.
0
 

Author Comment

by:edyonline
ID: 34879333
sorry i didn't really read your suggestion carefully because i was in panic mode yesterday. Had I read your suggestion first, I didn't have to go through it my self
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL limit and not so limited 13 59
How difficult would it be build a cookie scanner in PHP? 21 55
JSON decode 5 42
How to display get_the_terms within a function 3 38
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question