Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

[urgent] php session suddenly doesn't work

Posted on 2011-02-11
11
Medium Priority
?
454 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 84

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 84

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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

609 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