473,398 Members | 2,404 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,398 software developers and data experts.

Help with session_ID()

When I run this:

<?PHP
session_start();
echo session_id();
?>

It give me the right ouput but it also gives me a huge error message:

Warning: session_start():
open(/tmp\sess_c6782a171d1c85b13e9b9d3ff4c4a88a, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\htdocs\10.1.php on line 2

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at C:\Program Files\Apache
Group\Apache2\htdocs\10.1.php:2) in C:\Program Files\Apache
Group\Apache2\htdocs\10.1.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at C:\Program Files\Apache
Group\Apache2\htdocs\10.1.php:2) in C:\Program Files\Apache
Group\Apache2\htdocs\10.1.php on line 2
c6782a171d1c85b13e9b9d3ff4c4a88a
Warning: Unknown(): open(/tmp\sess_c6782a171d1c85b13e9b9d3ff4c4a88a,
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 (/tmp) in
Unknown on line 0

What am I doing wrong?

Jul 17 '05 #1
2 2826
*** ja****@gmail.com wrote/escribió (7 Jan 2005 09:18:51 -0800):
Warning: session_start():
open(/tmp\sess_c6782a171d1c85b13e9b9d3ff4c4a88a, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\htdocs\10.1.php on line 2


You must specify the system temporary directory if it isn't /tmp (and it
certainly isn't, because you are using Windows). Open php.ini and change
all appearances of /tmp for an existing directory such as c:\windows\temp
or whatever.
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Jul 17 '05 #2
i also can suggset the follwoing

first check the php.ini file as what Alvaro G Vicario wrote you may
do:

session.save_path = "C:/php/sessiondata"

secondly if you alredy have problems do the follwoing

in the first of your page use ob_start() method , and in the end of
your script use flush() method your script may be like this :

<?PHP
ob_start();
session_start();
echo session_id();
flush();
?>

actulley this way is more usfule if you use cookise , sessions or
header methods ni your scripts, becuase all these method didn't
processed correctlly if you printing or display any data befor using
them.

Jul 17 '05 #3

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

Similar topics

6
by: Annie | last post by:
I have a script to check if a session exists, if not then I log the user's info from $_Server variables into a database (ip address, time, etc.). The problem is that the test: ...
4
by: jaf893 | last post by:
I have the following script: <?PHP session_start(); echo session_id(); ?> But it gives a different session_ID() everytime the page is reloaded. Is there any way to keep the same...
1
by: Lepa | last post by:
I'm trying to run this query and I think I know where the problem is: ------------ in select (SUM(C.Score * C.Weight) / SUM(C.Weight * C.MaxScore)*100) AS SC ...... HAVING ((SUM(C.Score *...
1
by: Evan | last post by:
Hi guys, I have a database table (documents) with a structure that looks like this: docID docName keyWords 1 testTitle01.doc dog,cat,bob 2 testTitle02.doc ...
2
by: Alex Boborikin | last post by:
I create a table in MS access: CREATE TABLE TABLE1 (_ID COUNTER PRIMARY KEY, SESSION_ID INTEGER REFERENCES SESSIONS (SESSION_ID), FIELD1 INTEGER, FIELD2 INTEGER, ); session_id is linked to...
9
by: b007uk | last post by:
Hi! Really need help, dont know whats wrong :( I am trying to show images using php script, it works fine, pictures are shown, but if i right click on it and choose "save picture as" it offers me...
3
by: CjB | last post by:
Hello, I am trying to do the following in one of my pages. session_id($_GET); session_start(); I am running php5, however as soon as I call session_start the script hangs and nothing happens....
25
by: crescent_au | last post by:
Hi all, I've written a login/logout code. It does what it's supposed to do but the problem is when I logout and press browser's back button (in Firefox), I get to the last login page. In IE,...
2
Atli
by: Atli | last post by:
Hi. I've been using php 5.1.x for a while now and have a whole bunch of php code wirtten that works fine using that. I just updated to 5.2 and now none of the sessions I use work. I've found...
2
by: rcamarda | last post by:
Hello, I need to alter fields in all my tables of a given database, and I would to do this via a t-sql script. Example, I want to change all fields called SESSION_ID to char(6). The field is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.