Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-11-2007, 12:19 AM Session Error
Novice Talker

Posts: 9
Trades: 0
i am using php 4.0.5

cODE

<?php
session_start();
// store session data
$_SESSION['views']=1;
?><html>
<body><?php
//retrieve session data
echo "Pageviews=". $_SESSION['views'];
?></body>
</html>

Output

Warning: open(/tmp\sess_eaa74e5e06e1d681f9ca9e701ca6b550, O_RDWR) failed: m (2) in C:\apache\htdocs\training\session.php on line 2
Pageviews=1
Warning: open(/tmp\sess_eaa74e5e06e1d681f9ca9e701ca6b550, O_RDWR) failed: m (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0


aNYONE cAN hELP mE sOLVE tHE pROBLEM
INSPIRE is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-11-2007, 01:48 AM Re: Session Error
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
The /tmp dir hasn't got sufficient permissions for 'everybody' or 'IUSR_[computername]' to read/write session files.

Who knows which user account appache uses on a windows platform? (IIS/Win or Apache/Linux here).
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.

Last edited by metho; 09-11-2007 at 01:51 AM.. Reason: wtf? anonymous user for apache on win...
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 09-11-2007, 02:31 AM Re: Session Error
Novice Talker

Posts: 9
Trades: 0
Quote:
Originally Posted by INSPIRE View Post
i am using php 4.0.5

cODE

<?php
session_start();
// store session data
$_SESSION['views']=1;
?><html>
<body><?php
//retrieve session data
echo "Pageviews=". $_SESSION['views'];
?></body>
</html>

Output

Warning: open(/tmp\sess_eaa74e5e06e1d681f9ca9e701ca6b550, O_RDWR) failed: m (2) in C:\apache\htdocs\training\session.php on line 2
Pageviews=1
Warning: open(/tmp\sess_eaa74e5e06e1d681f9ca9e701ca6b550, O_RDWR) failed: m (2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0


aNYONE cAN hELP mE sOLVE tHE pROBLEM

I am using win-Xp Pro with apache 1.3
INSPIRE is offline
Reply With Quote
View Public Profile
 
Old 09-11-2007, 03:08 AM Re: Session Error
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
Where ever php is installed, say C:\PHP, create a folder called 'sessiondata' in C:\PHP.

Right click the "C:\PHP\sessiondata" folder, click on the security tab and add 'everyone' with full control permissions.

Open your php.ini file and change the following directive:

session.save_path = C:\PHP\sessiondata

If you php directory path has any spaces in it, the path needs to go into quotes and the backslashes escaped.

While you're at it, rinse and repeat for your temp upload folder. Create the folder C:\PHP\uploadtemp and change the directive in php.ini :

upload_tmp_dir = C:\PHP\uploadtemp

... and apply full control permissions to 'everyone'.

This will be the folder that temp files are stored by the server when forms include file inputs.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 09-12-2007, 11:03 PM Re: Session Error
Novice Talker

Posts: 9
Trades: 0
Thank a lot for helping solve the problem
INSPIRE is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Session Error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22302 seconds with 12 queries