Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Session error!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Session error!

Postby foot123 » Thu Feb 20, 2003 10:34 am

This is my script:

if($row==0) //if no db return

{
echo"Theres not a user with this name...";
}
else
{
if ($pass!=$fetch[0]) //if $pass <> db pass....
{
echo"Wrong pass...";
}
else // if all Ok...
{
session_start();
}
}

OK...When i run... Disaster!!!

Warning: session_start() [function.session-start]: open(/tmp\sess_e2c9fa410edeba3a0c29054395668806, O_RDWR) failed: No such file or directory (2) in d:\wwwroot\web2\valida_senha.php on line 28

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at d:\wwwroot\web2\valida_senha.php:28) in d:\wwwroot\web2\valida_senha.php on line 28

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at d:\wwwroot\web2\valida_senha.php:28) in d:\wwwroot\web2\valida_senha.php on line 28

Warning: Unknown(): open(/tmp\sess_e2c9fa410edeba3a0c29054395668806, 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


please, what´s wrong????
ps:- I use php 4.3.0
foot123
New php-forum User
New php-forum User
 
Posts: 14
Joined: Wed Nov 06, 2002 4:39 pm

Postby azteck » Thu Feb 20, 2003 11:46 am

Hi
the problem is here:
Warning: session_start() [function.session-start]: open(/tmp\sess_e2c9fa410edeba3a0c29054395668806, O_RDWR) failed: No such file or directory (2) in d:\wwwroot\web2\valida_senha.php on line 28

The location of session files must be \tmp\sess_e2c9fa410edeba3a0c29054395668806 not /tmp\sess_e2c9fa410edeba3a0c29054395668806.
I think there is an error in php configuration file, the one that tells where sessions are kept.
Mine looks like that
session.save_path= C:\PHP\sessiondata

Hope I am right.
rest of errors appear because there was an message sent before the session starts.
azteck
New php-forum User
New php-forum User
 
Posts: 12
Joined: Sun Dec 15, 2002 3:54 pm

thx

Postby foot123 » Fri Feb 21, 2003 11:02 am

I do it and works, Thanx!! :idea:
foot123
New php-forum User
New php-forum User
 
Posts: 14
Joined: Wed Nov 06, 2002 4:39 pm

Postby azteck » Sun Feb 23, 2003 2:42 pm

You're welcome.Any other problems? :)
azteck
New php-forum User
New php-forum User
 
Posts: 12
Joined: Sun Dec 15, 2002 3:54 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.