By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,167 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

session_start

underscore
P: 30
am new in php when i include the session_start() in my php code i encounter this problem.. can u help me.


Warning: session_start(): open(/tmp\sess_0f7ca1f5efc3045f1e829214ed1eb086, O_RDWR) failed: No such file or directory (2) in D:\MyPage\login.php on line 2

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at D:\MyPage\login.php:2) in D:\MyPage\login.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\MyPage\login.php:2) in D:\MyPage\login.php on line 2
Jul 25 '07 #1
Share this Question
Share on Google+
8 Replies


dafodil
100+
P: 392
am new in php when i include the session_start() in my php code i encounter this problem.. can u help me.


Warning: session_start(): open(/tmp\sess_0f7ca1f5efc3045f1e829214ed1eb086, O_RDWR) failed: No such file or directory (2) in D:\MyPage\login.php on line 2

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at D:\MyPage\login.php:2) in D:\MyPage\login.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\MyPage\login.php:2) in D:\MyPage\login.php on line 2
Do you have an include at the beginning?
Let me see your code...
Jul 25 '07 #2

underscore
P: 30
i got only a sample in PHP books and i tried it in my computer if would be work.
i have also test some sample in PHP books but d same problem in sesion_start(). dr s no include before the session_start().
Jul 26 '07 #3

nathj
Expert 100+
P: 938
i got only a sample in PHP books and i tried it in my computer if would be work.
i have also test some sample in PHP books but d same problem in sesion_start(). dr s no include before the session_start().
Could you post up the code you are using? Don't forget the 'code' tags.

nathj
Jul 26 '07 #4

kovik
Expert 100+
P: 1,044
The second and third errors imply that you have made output to the screen on line two, but that is caused by the first error's output, so when you fix the first error, you should be fine.

The first error, however, isn't so obvious. Is this a local installation? It looks to me as though PHP does not have full permission to the directory that it is attempting to save sessions in.
Jul 26 '07 #5

underscore
P: 30
The second and third errors imply that you have made output to the screen on line two, but that is caused by the first error's output, so when you fix the first error, you should be fine.

The first error, however, isn't so obvious. Is this a local installation? It looks to me as though PHP does not have full permission to the directory that it is attempting to save sessions in.
yes it is local installation. i thnk ur right that the php does not have full permission to the directory. so what shold i do?
Jul 28 '07 #6

kovik
Expert 100+
P: 1,044
Is your server set up on Windows?
Jul 28 '07 #7

underscore
P: 30
yes i am using windows xp
Jul 31 '07 #8

kovik
Expert 100+
P: 1,044
yes i am using windows xp
Look into your php.ini and you should find a directive called session.save_path (or something of that nature) and it will likely be commented out. Uncomment it and give it an absolute path to some folder (any should work) and see if it works.
Jul 31 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.