473,545 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session_start() problem

session_start() ;
$_SESSION['visits']++;
print 'You have visited here '.$_SESSION['visits'].' times.';

returned:

Warning: session_start() [function.sessio n-start]:
open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\h tdocs\session.p hp on line 3

Warning: session_start() [function.sessio n-start]: Cannot send session
cookie - headers already sent by (output started at C:\Program
Files\Apache Group\Apache2\h tdocs\session.p hp:3) in C:\Program
Files\Apache Group\Apache2\h tdocs\session.p hp on line 3

Warning: session_start() [function.sessio n-start]: Cannot send session
cache limiter - headers already sent (output started at C:\Program
Files\Apache Group\Apache2\h tdocs\session.p hp:3) in C:\Program
Files\Apache Group\Apache2\h tdocs\session.p hp on line 3
You have visited here 1 times.
Warning: Unknown(): open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please
verify that the current setting of session.save_pa th is correct (/tmp)
in Unknown on line 0
i have /tmp folder inside my htdocs directory so why it is still
saying that the /tmp is unknown?
Jul 16 '05 #1
2 21695
sky2070 wrote:
session_start() ;
$_SESSION['visits']++;
print 'You have visited here '.$_SESSION['visits'].' times.';

returned:

Warning: session_start() [function.sessio n-start]:
open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\h tdocs\session.p hp on line 3

i have /tmp folder inside my htdocs directory so why it is still
saying that the /tmp is unknown?


Not in htdocs. Php looks for 'tmp' folder in root, in your case - in 'c:\'.
You can change it in php.ini.

--
--- --- --- --- --- --- ---
ja**@croatiabiz .com
Jul 16 '05 #2
remember also that with windows you should only use the \ when navigating
directories. so it should be \tmp

it may also be looking for your /tmp folder in the php install folder. i
believe that's where mine sticks all it's tmp stuff...

"jack" <ja**@croatiabi z.com> wrote in message
news:be******** ***@as201.hinet .hr...
sky2070 wrote:
session_start() ;
$_SESSION['visits']++;
print 'You have visited here '.$_SESSION['visits'].' times.';

returned:

Warning: session_start() [function.sessio n-start]:
open(/tmp\sess_c8bf20 07256f6e15a938c 0254adb21e4, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\h tdocs\session.p hp on line 3

i have /tmp folder inside my htdocs directory so why it is still
saying that the /tmp is unknown?
Not in htdocs. Php looks for 'tmp' folder in root, in your case - in

'c:\'. You can change it in php.ini.

--
--- --- --- --- --- --- ---
ja**@croatiabiz .com

Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2892
by: Florence HENRY | last post by:
Hello, I've searched about my problem on google before posting, but I didn't find anything relevant... I have a problem with session_start. Here is my code : <html> <head> <?php session_start();
19
11131
by: Chris Allen | last post by:
Hi I'm new to PHP and I'm trying to create a Login Form. Once the user has logged in then he shouldn't have to log in again. The trouble is I'm getting a new session ID between every page and so it doesn't recognise the user. I've used Session_Start() which I thought was meant to maintain the session variables between pages but it doesn't...
4
3287
by: K. Choi | last post by:
I had installed php 4.3.7 on my system and test some php code. But there is a serious problem. On my system(using apache2) the code, <?php session_start(); ?> gets some warning, Warning: session_start(): read returned less bytes than requested in
5
2078
by: cowofchaos | last post by:
when I use the session_start() function at the top of my scripts I get 5 errors on the page If anyone can help please do this has been a problem for a while and I cannot do much more work on my site without fixing this and getting the login system to work Here are the errors: At the TOP of the page I get the following three errors,
3
2203
by: Trogdor | last post by:
I set up a server on an AMD 650 machine running gentoo linux. I installed Apachie 2, MySQL 4.1 and PHP 4.3.11 I use another computer on my local net (192.168.0.x) to access the server as a client. MySQL works perfectly. I have created and queried databases with no problem. Apachie 2 appears to work with no problem. I can call up web...
5
2166
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1. Create a new C# ASP.NET web application named "demo" and modify Session_Start in Global.asax.cs as follows: protected void Session_Start(Object...
0
1243
by: Jason Lehman | last post by:
When testing on my local machine, the session_start fires fine. I try storing a value to my database, creating a timestamped text file, and writing a line of text to a general log file. All of these work. When I transfer my site to my webhost, all of these no longer function within the session_start. All of these functions work correctly...
19
7908
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache limiter - headers already sent in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php on line 14
4
5924
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world, however and am really struggling with managing sessions in PHP, based on my experiences with managing sessions in ASP. 99.9% of the feedback I have...
2
4321
by: jwhite68 | last post by:
The essence of my problem is this. 1. I login to my website with user/password. 2. I select any option, which effectively re-calls index2.php with some additional parameters, to control whats displayed next. Immediately at this point, it logs out the user. It is logging out the user because after checking $_SESSION == '1' - it finds that...
0
7473
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7408
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
7815
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...
1
7433
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5976
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
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1891
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
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
712
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.