Jump to content

wat does this error mean>>PHP Warning: session_start() [function.session-start]?


poqoz-87

Recommended Posts

i have tried using this php code example for session. the php code that i am using is this:

 

i get this code at this website: http://www.tizag.com/phpT/phpsessions.php

 

<?php

session_start();

$_SESSION['views'] = 1; // store session data

echo "Pageviews = ". $_SESSION['views']; //retrieve data

?>

 

the output supposedly should just has Pageviews = 1. but i receive this error.

the error that i get is this: PHP Warning: session_start() [function.session-start]: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:/ <the path name of the folder>) in Unknown on line 0.

 

what does this error means n how can i solve this error? 

It means that a valid session path must be specified in your PHP configuration file. See below about the session.save_path:

 

session.save_path defines the argument which is passed to the save handler. If you choose the default files handler, this is the path where the files are created. Defaults to /tmp. See also session_save_path().

 

Note: Prior to PHP 4.3.6, Windows users had to change this variable in order to use PHP's session functions. A valid path must be specified, e.g.: c:/temp.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.