473,854 Members | 1,845 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 22699
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
2151
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 using www.mydomain.com. When they get to pg. 3, a hyperlink with an SSL URL and session ID as a GET...
13
12056
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 Konqueror on Linux) the session variables will mix up and only the latest selection or options will...
22
2897
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. But two things come to mind: one is preventing multiple logins of the user/password. The...
3
2485
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
2299
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 should I say my counter in my asax file.... and never goes down. If it matters, this machine is...
5
9386
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
5222
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" content="3600">. I also set timeout=120 in the <forms section of web.config to make sure
6
3814
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 v1.1.4322(_LM_W3SVC_1_Root_ATV2004)\Compilations
3
1254
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
1684
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
11023
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10672
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10362
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7909
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7076
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5738
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5936
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4550
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
3
3181
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.