Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache-2.0.47 and php-4.3.3 and linux (Fedora Core 1) and /tmp

Status
Not open for further replies.

scoon

Programmer
Apr 2, 2002
32
0
0
US
Hey there,

Has anyone seen this problem before:

Code:
Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 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
 
no i don't need to. I use session_start(); at the beginning of every script. Thank you but any other ideas?
 
when you ask for my run env do you mean my OS: fedora == LINUX.

I use the $_SESSION variable to keep a "STATE" among the pages. I can write to the /tmp dir early on but when i go to update it ie: $_SESSION['aNewEntry'] = "some new value";

I get those errors.

Any suggs would be greatly appreciated.
 
Hey there,

Thank you for your response. I am at work now and will not get to that later this eve. If I may ask, what are you expecting to be printed out? I can do a var_dump($_SESSION) and what is already stored is displayed but when I try and append $_SESSION as previously stated, I get the
Code:
 Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 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
errors.
 
The error is saying that the session id contains invalid characters. I'm curious as to what the session id actually is -- but I have no expectation as to what the id will be.

And check session.auto_start, too. That "on line 0" thing is still bothering me.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
thank you for your response, I doubt that session.auto_start is the culprit and I will look when I get home, I do remember just doing a var_dump($_SESSION) looking for a funny session id but I did not see one. I will try that when I get home and post the output. Thanks again, and of course, any other suggs are welcome.
 
Thanks for pointing that out. I guess I really didn't think about the fact that $_SESSION is a super global and I was using that as a more convenience. I will check out session_id() later today and post the results. So has this ever happened to you before ?
 
I am under the impression that session_start() will automatically create session id's for me so that unless i really one to make my own, i don't have to use session_id(). Is this true ?
 
Correct. But session_id(), if invoked with not inputs, will return the current session id -- and PHP is complaining about the session id itself.

PHP uses the actual session id value as part of the filename it uses to store the session information. If the sessionid is 1234567890ABCDEFG, then PHP will fetch and store session variables in a file named sess_1234567890ABCDEFG. PHP is complaining about the session id, as it contains characters that cannot be used in a legal filename.

Going back to your question of whether I've seen this error before, I can also say I've never been involved with installing PHP on Fedora.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
thank you,

I will say that i can stat the session file in /tmp and it has the appropriate perms of read, write, and execute. I don't think the environment is that big of a deal here. Fedora is just one of the umpteen linux distros. Even a bsd would be close. Windows on the other hand would prolly find a way to give some other grief. What do you develop on, Windows or Linux ?
 
Do you use a browser that lets you examine cookie values in a meaningful way? It occurred to me that since a session id is reused by the browser, maybe there is just some gobbledygook in your cookies.

Have you tried clearing your cookies?

Want the best answers? Ask the best questions: TANSTAAFL!!
 
that is a good idea. sometimes i wrap my head around this stuff so much i forget to try the obvious. I use galeon so i will check my cookies. I just use fedora for my server. fedora is basically rh 9.5. all though i am using it for a server that i ssh into. for my desktop i use Gentoo (shameless plug).....
 
sleipnir214, turns out clearing the cookies did it. thank you for your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top