473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

problem with session_start()

when I use the session_start() function at the top of my scripts I get
5 errors on the page
If anyone can help please do this has been a problem for a while and I
cannot do much more work on my site without fixing this and getting the
login system to work

Here are the errors:

At the TOP of the page I get the following three errors,

Warning: session_start(): open(\sessiondata\sess_***, O_RDWR) failed:
No such file or directory (2) in \header.php on line 2
Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at \header.php:2) in \header.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at \header.php:2) in \header.php on line 2

At the BOTTOM of the page I get two other errors,

Warning: Unknown(): open(\sessiondata\sess_***, O_RDWR) failed: No such
file or directory (2) 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 (\sessiondata)
in Unknown on line 0

Jul 17 '05 #1
5 2071
On 16 Apr 2005 08:16:15 -0700, "co********@gmail.com" <co********@gmail.com>
wrote:
when I use the session_start() function at the top of my scripts I get
5 errors on the page
If anyone can help please do this has been a problem for a while and I
cannot do much more work on my site without fixing this and getting the
login system to work

Here are the errors:

At the TOP of the page I get the following three errors,

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


That's the key - your session.save_path is wrong. All the errors stem from PHP
not being able to write session data to where you've specified.

What operating system are you on? If Unix-based, the slash is the wrong way
around. If Windows-based you haven't got a drive letter so it might be looking
on the wrong drive.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
I know the last error says to check the seesion.save_path variable, I
did and its set to the right spot so I'm not sure what the problem is

Jul 17 '05 #3
I'm on windows XP and I've checked the path its C:\PHP\sessiondata, I'm
going to double check it and make sure the folder exists now..

Jul 17 '05 #4
On 16 Apr 2005 08:23:38 -0700, "co********@gmail.com" <co********@gmail.com>
wrote:
I'm on windows XP and I've checked the path its C:\PHP\sessiondata, I'm
going to double check it and make sure the folder exists now..


That's not what PHP is seeing though; you might want to reverse the slashes to
c:/PHP/sessiondata, or add some quotes around it, or double up the \'s -
Window's use of \ for a directory separate clashes nastily with \ as an escape
character - but all the Windows system calls will accept Unix-style '/' as a
separator as well.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #5
Ok, the problem was that my c:\php\sessiondata folder just didn't
exist... i created it and it seems to be working, thanks for your help!

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sky2070 | last post by:
session_start(); $_SESSION++; print 'You have visited here '.$_SESSION.' times.'; returned: Warning: session_start() : open(/tmp\sess_c8bf2007256f6e15a938c0254adb21e4, O_RDWR) failed: No...
3
by: Sticks | last post by:
i have been having difficulty with session variables - i seem to be able to set them, but when i wish to have another page update them, they remain as they were. this makes them utterly useless to...
2
by: Paul | last post by:
Dear experts, I have a problem with session_start() and JavaScript. In IE6 (but not Mozilla) the first time the page below loads the JavaScript doesn't work (clicking on the graphic should write...
1
by: Ray Torres | last post by:
I get a warning and cannot start a session. I understand from reading through the documentation and other posts that session_start must occur in the php script before any HTML tags or output to...
9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
19
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache...
3
by: anis2007 | last post by:
Hi, following code run our server but this is not run client server:- index code is: PUT YOUR CODE BETWEEN code OR php TAGS!! It is absolutely unreadeable! <?php ob_start(); session_start();...
5
by: Garry Jones | last post by:
This is a excerpt from the code where I collect data with a form. <FORM action="index15dq.php" method="post" name="stegscf_pwd_edit" id="stegscf_pwd_edit"> I am setting three session variables...
2
by: jwhite68 | last post by:
The essence of my problem is this. 1. I login to my website with user/password. 2. I select any option, which effectively re-calls index2.php with some additional parameters, to control whats...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.