Topic: Unable to read/write sessions (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30430" title="Pages that link to Topic: Unable to read/write sessions (Page 1 of 1)" rel="nofollow" >Topic: Unable to read/write sessions <span class="small">(Page 1 of 1)</span>\

 
Lord_Fukutoku
Maniac (V) Inmate

From: San Antonio
Insane since: Jul 2002

posted posted 07-20-2008 18:04

At one point, I'd like to think I was at least literate when it came to PHP, however troubleshooting a problem this morning, I'm realizing I'm woefully ignorant after not seeing anything in PHP for over 3 years


I'm using a tool called TaskFreak for some TODO list tracking. Up till now, it's been working great. I got on this morning and there were some PHP errors showing up out of the blue:

code:
Warning: session_start() [function.session-start]: open(/tmp/sess_26592e0f89fbadb6b2c6a495d19f8a5d, O_RDWR) failed: 
Input/output error (5) in /path_to_file/_common.php on line 39

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at 
/path_to_file/_common.php:39) in /path_to_file/_common.php on line 39

Warning: Cannot modify header information - headers already sent by (output started at /path_to_file/_common.php:39) in 
/path_to_file/_common.php on line 41


(Page content displayed here)

code:
Warning: Unknown(): open(/tmp/sess_26592e0f89fbadb6b2c6a495d19f8a5d, O_RDWR) failed: Input/output error (5) in 
Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct 
(/tmp) in Unknown on line 0



I was able to get the top set of errors to go away by moving the session_start() call above the includes in _common.php (apparently one of them started writing some character or another to the page before session_start was called).

The bottom set of errors are still there though. I've been using the default php.ini file on the host so far.
('session.save_path = /tmp' seems to be where I'm having issues)
I uploaded my own .ini file to my directory (with session.save_path set to tmp a folder in my web space, maybe not the best idea in the long run but I'm just trying whatever I can for right now (yes? no? maybe?)), and phpinfo shows the value updated, however when I run TaskFreak again, I still have bottom set of errors, and it still says the save_path variable is set to /tmp, and not the value I have in my php.ini.

Does anything have to restart on the server for it to recognize my php.ini file? I'm assuming that since phpinfo shows the right value, the TaskFreak scripts should be able to see the right value too, no?
Am I even looking in the right place to fix this?
What are the odds that something changed on the server to make /tmp un-accessable?

Many thanks to anyone that can shed some light on this for me,
LF

--

Any sufficiently advanced bug is indistinguishable from a feature.

(Edited by Lord_Fukutoku on 07-20-2008 18:06)

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 07-20-2008 18:16

Well, the error message clearly says that /path_to_file/_common.php sent some content to the client on the line 39. It may just be a \n , between two <? ... ?><? ... ?> , but that's enough.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 07-20-2008 19:55

but the real trouble seems to be with your server, which can't store files in /tmp anymore -is your disk full?

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 07-20-2008 19:58

that'll teach to read PHP questions in diagonal.

(Edited by poi on 07-20-2008 20:47)

Lord_Fukutoku
Maniac (V) Inmate

From: San Antonio
Insane since: Jul 2002

posted posted 07-22-2008 02:50

I just got ahold of tech support and walked someone who wasn't exactly fluent in English how to get the error. She was convinced that it was a scripting error, but 'humored' me by checking permissions and the contents of /tmp. /tmp was set to 777 and the session file (or one of them in the folder at least) was 600 (which seems right to me... owner (which is my website account) has read/write for the individual file. Am I understanding that right?).
Then she said she would go check some other settings and try to restore my account permissions and that it would take about a half hour to propagate.
Before she let me go, I told her I also wasn't able to see my usage stats through my admin page, I could just see 0 MB of 0MB used. She said she saw that too but didn't even pretend to try and do anything about it, just said to call back in a half hour....

5 minutes later my site works and all is well again (or at least on that domain)

Kind of annoying though that even as she hung up she was saying it was a scripting problem on my side...


Thanks TP and poi

--

Any sufficiently advanced bug is indistinguishable from a feature.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu