473,586 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_f207f20079 897ad6f830fc632 fa5e0c0,
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_f207f20079 897ad6f830fc632 fa5e0c0,
O_RDWR) failed: Permission denied (13)

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

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

- Ganesh
Jul 17 '05 #1
4 22668
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.goog le.com...
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_f207f20079 897ad6f830fc632 fa5e0c0,
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_f207f20079 897ad6f830fc632 fa5e0c0,
O_RDWR) failed: Permission denied (13)

PHP Warning: Unknown(): Failed to write session data (files). Please
verify that the current setting of session.save_pa th 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_f207f20079 897ad6f830fc632 fa5e0c0,
: 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_pa th is correct
(/var/lib/php/session)
----------------------------------------------------------------------------------

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

- Ganesh

Set session.save_pa th 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2140
by: Alex | last post by:
I'm running Apache 2.0.47, PHP 4.3.3 on RedHat 9.0 on a new server. I have a series of pages that let's say pages 1 -> 3 are non-ssl and 4-8 are SSL but the URL domain is different (shared SSL). The client clicks through them from one to another in order using forms and URLs with GET vars. The client starts a non-ssl session on pg. 1...
13
12032
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location on the server (in our own accounts on the same machine). When I am testing both versions of our program using the same browser (IE on Windows or...
22
2861
by: Theo | last post by:
Question for the group The authentication system for the site Im working on seems to function properly and all is good. A session keeps track of everything and a cookie is used to accept or deny access... sounds as it should be I hope. Then when all is done logging out destroys everything and the pages are no longer accessable. Good so far....
3
2460
by: Maxime Ducharme | last post by:
Hi group We have a problem with sessions in one of our sites. Sessions are used to store login info & some other infos (no objects are stored in sessions). We are using Windows 2000 Server (IIS 5.0) with ASP 3.0 (no .NET on this site). Sometime, data in session is emptied. I say "sometime"
12
2268
by: D. Shane Fowlkes | last post by:
This is a repost (pasted below). Since my original post, I've double checked the system clock and set all IIS Session Timeout values to 10 minutes. Still ...the problem occurs. I've also installed Deep Metrix Live Stats 6.2 XPS just to make sure nothing really strange was going on was going on. Still....the sessions only increment...or...
5
9374
by: Mikko Penkkimäki | last post by:
Hi Looks like I can not change Web page's timeout setting. In practise it's all the time 20 minutes - no matter what I do. I have this kind of setting in web.config: <sessionState mode="InProc" cookieless="true" timeout="1"
17
5189
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be running continuously and refreshing once an hour. I there set timeout= 61 in <sessionState section and on my page it says <meta http-equiv="refresh"...
6
3777
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory†exception. To get an idea what happens I traced some values using performance monitor and got the following values (for one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps...
3
1245
by: Tomasz Nowak | last post by:
Hello I have a problem with sessions - how to resolve this: "Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\usr\krasnal\www\an\edycja.php:8) in c:\usr\krasnal\www\an\edycja.php on line 11" Thx for all
3
1673
by: AlonR | last post by:
Hi, We're experiencing random user sessions losses on our web applications, and are researching for any useful information which may shed light on this problem. Environment: In our company, we're developing a web product based on ASP.NET 2.0, in conjunction with Oracle database over ADO.NET and external COM objects
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6610
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.