php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26717 session not working !
Submitted: 2003-12-25 09:52 UTC Modified: 2003-12-25 11:04 UTC
From: khalidanwar123 at yahoo dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.2 OS: win98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: khalidanwar123 at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-12-25 09:52 UTC] khalidanwar123 at yahoo dot com
Description:
------------
hi i'm new with php , help me to fix this bug , what changes should i do in the php.ini file ?

Reproduce code:
---------------
///Running this ///

?php
session_register("view1count");
session_register("view2count");
session_register("view3count");
session_register("view4count");
?>

<?php
// page_count.php
if(!$view1count) $view1count = 0;
if(!$view2count) $view2count = 0;
if(!$view3count) $view3count = 0;
if(!$view4count) $view4count = 0;

echo"<html><head><title>Web page hit counter </title></head><body>";
if($whichpage) {
  echo"<b> You are currently on $whichpage </b><br><br>\n";
}

for($i=1; $i<=4; $i++){
  if($whichpage == $i) {
    echo "<b><href =\"$PHP_SELF?".SID."$whichpage=$i\">Page $i</a></b>";
   } else {
     echo "<href =\"$PHP_SELF?".SID."$whichpage=$i\">Page $i</a>";
   }
echo ",which you have chosen".$GLOBALS["view$(i)count"]."times<br>\n";
}
echo"\n\n<br><br>\n\n";
echo"</body></html>";

?>


Expected result:
----------------
expected result is simillar what i'm getting right now, but without hyperlinks .

Actual result:
--------------
///Getting this///
instead of expected result.....
please help!!!

Warning: session_register(): open(/tmp\sess_09d5e4dfe90737f3a2a6a7af04830cce, O_RDWR) failed: No such file or directory (2) in c:\phpweb\practice\page_count.php on line 2

Warning: session_register(): Cannot send session cookie - headers already sent by (output started at c:\phpweb\practice\page_count.php:2) in c:\phpweb\practice\page_count.php on line 2

Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at c:\phpweb\practice\page_count.php:2) in c:\phpweb\practice\page_count.php on line 2
Page 1,which you have chosentimes
Page 2,which you have chosentimes
Page 3,which you have chosentimes
Page 4,which you have chosentimes



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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-25 11:04 UTC] eru@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 22:01:33 2025 UTC