From:             khalidanwar123 at yahoo dot com
Operating system: win98
PHP version:      4.3.2
PHP Bug Type:     Session related
Bug description:  session not working !

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


-- 
Edit bug report at http://bugs.php.net/?id=26717&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26717&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26717&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26717&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26717&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26717&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26717&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26717&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26717&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26717&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26717&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26717&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26717&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26717&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26717&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26717&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26717&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26717&r=float

Reply via email to