473,406 Members | 2,217 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,406 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 22638
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
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)....
13
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...
22
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...
3
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...
12
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...
5
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...
17
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...
6
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...
3
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...
3
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.