Jump to content

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


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.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.