472,096 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Problem with sessions

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
4 22491
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
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
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
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.

Similar topics

13 posts views Thread by jing_li | last post: by
22 posts views Thread by Theo | last post: by
3 posts views Thread by Maxime Ducharme | last post: by
12 posts views Thread by D. Shane Fowlkes | last post: by
5 posts views Thread by Mikko Penkkimäki | last post: by
17 posts views Thread by jensen bredal | last post: by
6 posts views Thread by Daniel Walzenbach | last post: by
3 posts views Thread by Tomasz Nowak | last post: by
3 posts views Thread by AlonR | last post: by
reply views Thread by leo001 | last post: by

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.