Session Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ghazianibros
Forum Newbie
Posts: 2
Joined: Tue Mar 16, 2004 6:51 pm
Location: Dallas, TX

Session Problem

Post by ghazianibros »

trying to start session by:

session_start();

it gives an error:
Warning: session_register(): open(C:\PHP\sessiondata\sess_7791be009f5dadb2e2b49c7232f58632, O_RDWR) failed: No such file or directory (2) in C:\Apache\Apache2\htdocs

i don't know what going on.....

Please helP :(

ghazianibros :roll: :oops:
Goowe
Forum Commoner
Posts: 94
Joined: Mon Mar 15, 2004 9:51 am
Location: Southeast Alaska

Post by Goowe »

It doesn't look like your error is on the line where you have session_start();

Your error is on the part where you're registering the session? Do you have a part like that?

http://us4.php.net/manual/en/function.s ... gister.php

Proper syntax...

session_register('name');
$_SESSION['name'] = 'value';
ghazianibros
Forum Newbie
Posts: 2
Joined: Tue Mar 16, 2004 6:51 pm
Location: Dallas, TX

Again Session Problem

Post by ghazianibros »

my actual coding is

session_start();

session_register('count');
$_SESSION['count'] = 1;


below are the errors receieved:

Warning: session_start(): open(C:\PHP\sessiondata\sess_f9a6561f210c905cd3f2e90f5a581abd, O_RDWR) failed: No such file or directory (2) in C:\Apache\Apache2\htdocs\imran\addToCart.php on line 11

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Apache\Apache2\htdocs\imran\addToCart.php:10) in C:\Apache\Apache2\htdocs\imran\addToCart.php on line 11

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Apache\Apache2\htdocs\imran\addToCart.php:10) in C:\Apache\Apache2\htdocs\imran\addToCart.php on line 11
This is Session Link Welcome 0.
You are 0 years old! Movie Id 1
Warning: Unknown(): open(C:\PHP\sessiondata\sess_f9a6561f210c905cd3f2e90f5a581abd, 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 (C:\PHP\sessiondata) in Unknown on line 0

Please help??? :cry:

thanx
TheBentinel.com
Forum Contributor
Posts: 282
Joined: Wed Mar 10, 2004 1:52 pm
Location: Columbus, Ohio

Re: Again Session Problem

Post by TheBentinel.com »

ghazianibros wrote:Warning: session_start(): open(C:\PHP\sessiondata\sess_f9a6561f210c905cd3f2e90f5a581abd, O_RDWR) failed: No such file or directory (2) in C:\Apache\Apache2\htdocs\imran\addToCart.php on line 11
Do you have a folder on your system called C:\PHP\sessiondata ?

If not, create the folder and try it again.

If so, sorry I wasn't any help! :-)
Post Reply