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

Problem with sessions

P: n/a
Hi all!

I'm new to PHP...

I wrote a php script for login page, which creates some session
variables after validating the user... But it's not working...

When i compile it... The compiler is giving me the following
Warnings...

----------------------------------------------------------------------------------
PHP Warning: session_start():
open(/var/lib/php/session/sess_f207f20079897ad6f830fc632fa5e0c0,
O_RDWR) failed: Permission denied (13)

PHP Warning: session_start(): Cannot send session cookie - headers
already sent by (output started at /home/gana/public_html/login.php:4)

PHP Warning: session_start(): Cannot send session cache limiter -
headers already sent

PHP Warning: Unknown():
open(/var/lib/php/session/sess_f207f20079897ad6f830fc632fa5e0c0,
O_RDWR) failed: Permission denied (13)

PHP Warning: Unknown(): Failed to write session data (files). Please
verify that the current setting of session.save_path is correct
(/var/lib/php/session)
----------------------------------------------------------------------------------

Please help me... Thanks in advance...

- Ganesh
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hello.
Make sure that you start the session before any HTML or headers as the error
states.
Eg.

<?php
session_start;
?>
<html><head> and so on......

Also if you are including other pages make sure there is only one session
start all together..

Brent Palmer.
"Ganesh" <ga******@gmail.com> wrote in message
news:e3*************************@posting.google.co m...
Hi all!

I'm new to PHP...

I wrote a php script for login page, which creates some session
variables after validating the user... But it's not working...

When i compile it... The compiler is giving me the following
Warnings...

----------------------------------------------------------------------------------
PHP Warning: session_start():
open(/var/lib/php/session/sess_f207f20079897ad6f830fc632fa5e0c0,
O_RDWR) failed: Permission denied (13)

PHP Warning: session_start(): Cannot send session cookie - headers
already sent by (output started at /home/gana/public_html/login.php:4)

PHP Warning: session_start(): Cannot send session cache limiter -
headers already sent

PHP Warning: Unknown():
open(/var/lib/php/session/sess_f207f20079897ad6f830fc632fa5e0c0,
O_RDWR) failed: Permission denied (13)

PHP Warning: Unknown(): Failed to write session data (files). Please
verify that the current setting of session.save_path is correct
(/var/lib/php/session)
----------------------------------------------------------------------------------

Please help me... Thanks in advance...

- Ganesh

Jul 17 '05 #2

P: n/a
Hey!... Now it's working all of a sudden...
may be there is some fault with the time settings some where...

any help please...

Jul 17 '05 #3

P: n/a
Ganesh (ga******@gmail.com) wrote:
: Hi all!

: I'm new to PHP...

: I wrote a php script for login page, which creates some session
: variables after validating the user... But it's not working...

: When i compile it... The compiler is giving me the following
: Warnings...

: ----------------------------------------------------------------------------------
: PHP Warning: session_start():
: open(/var/lib/php/session/sess_f207f20079897ad6f830fc632fa5e0c0,
: O_RDWR) failed: Permission denied (13)
"Permission denied"

/var/lib/php/session/...

That looks like a very likely explanation for why your script doesn't
work.


--

This space not for rent.
Jul 17 '05 #4

P: n/a
On Thu, 10 Mar 2005 20:58:11 -0800, Ganesh wrote:
PHP Warning: Unknown(): Failed to write session data (files). Please
verify that the current setting of session.save_path is correct
(/var/lib/php/session)
----------------------------------------------------------------------------------

Please help me... Thanks in advance...

- Ganesh

Set session.save_path to something writable like /usr/tmp or /tmp and
restart Apache. If PHP is installed as a module, then the directory you
select must be writable by user "nobody". Alternatively, you could do
"chmod 4777 /var/lib/php/session" and merrily continue PHP-ing.

--
A clean tie attracts the soup du jour.

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.