395,421 Members | 2,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 395,421 IT Pros & Developers. It's quick & easy.

session_start() problem

sky2070
P: n/a
session_start();
$_SESSION['visits']++;
print 'You have visited here '.$_SESSION['visits'].' times.';

returned:

Warning: session_start() [function.session-start]:
open(/tmp\sess_c8bf2007256f6e15a938c0254adb21e4, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\htdocs\session.php on line 3

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

Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at C:\Program
Files\Apache Group\Apache2\htdocs\session.php:3) in C:\Program
Files\Apache Group\Apache2\htdocs\session.php on line 3
You have visited here 1 times.
Warning: Unknown(): open(/tmp\sess_c8bf2007256f6e15a938c0254adb21e4,
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_path 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
Share this Question
Share on Google+
2 Replies


jack
P: n/a
sky2070 wrote:
session_start();
$_SESSION['visits']++;
print 'You have visited here '.$_SESSION['visits'].' times.';

returned:

Warning: session_start() [function.session-start]:
open(/tmp\sess_c8bf2007256f6e15a938c0254adb21e4, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\htdocs\session.php 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.

--
--- --- --- --- --- --- ---
jack@croatiabiz.com
Jul 16 '05 #2

skate
P: n/a
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" <jack@croatiabiz.com> wrote in message
news:begfb9$7vbg$1@as201.hinet.hr...
sky2070 wrote:
session_start();
$_SESSION['visits']++;
print 'You have visited here '.$_SESSION['visits'].' times.';

returned:

Warning: session_start() [function.session-start]:
open(/tmp\sess_c8bf2007256f6e15a938c0254adb21e4, O_RDWR) failed: No
such file or directory (2) in C:\Program Files\Apache
Group\Apache2\htdocs\session.php 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.

--
--- --- --- --- --- --- ---
jack@croatiabiz.com

Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.