|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-20 06:22 UTC] mfischer@php.net
[2002-06-20 06:57 UTC] ian dot cluderay at blueyonder dot co dot uk
[2002-06-20 06:59 UTC] ian dot cluderay at blueyonder dot co dot uk
[2002-06-20 07:02 UTC] sander@php.net
[2002-06-20 07:08 UTC] ian dot cluderay at blueyonder dot co dot uk
[2002-06-20 07:24 UTC] ian dot cluderay at blueyonder dot co dot uk
[2002-06-20 07:41 UTC] mfischer@php.net
[2002-06-20 08:05 UTC] ian dot cluderay at blueyonder dot co dot uk
[2002-06-21 10:55 UTC] ian dot cluderay at blueyonder dot co dot uk
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 12:00:02 2026 UTC |
Simple PHP code (from a WROX book)gives error when trying to use sessions. Warning: open(/tmp\sess_3d0b06a40edc759e3bbc38603d5ca596, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\PAGE_COUNT.php on line 2 I've edited my c:\winnt\php.ini file so the session.save_path is "c:\php\sessions" but it still thinks its /tmp No reference to /tmp anywhere that I can see, I've rebooted many times to no avail. PHP code is <?php session_register("view1count"); session_register("view2count"); session_register("view3count"); session_register("view4count"); ?> <?php if (!$view1count) $view1count=0; if (!$view2count) $view2count=0; if (!$view3count) $view3count=0; if (!$view4count) $view4count=0; if (!$whichpage) $whichpage=0; echo "<html><head><title>Web Page Hit Counter</title></head><body>"; if ($whichpage) { echo "<B>You are currently on page $whichpage.</B><BR><BR>\n"; $GLOBALS["view${whichpage}count"]++; } for ($i = 1; $i <= 4; $i++) { if ($whichpage == $i) { echo "<B><A HREF=\"$PHP_SELF?".SID."&whichpage=$i\">Page $i</A></B>"; } else { echo "<A 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>"; ?> and my session section from c:\winnt\php.ini is [Session] ; Handler used to store/retrieve data. session.save_handler = files ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. session.save_path = "c:\php\sessions" ; Whether to use cookies. session.use_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID ; Initialize session on request startup. session.auto_start = 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 ; The path for which the cookie is valid. session.cookie_path = / ; The domain for which the cookie is valid. session.cookie_domain = ; Handler used to serialize data. php is the standard serializer of PHP. session.serialize_handler = php ; Percentual probability that the 'garbage collection' process is started ; on every session initialization. session.gc_probability = 1 ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440 ; Check HTTP Referer to invalidate externally stored URLs containing ids. ; HTTP_REFERER has to contain this substring for the session to be ; considered as valid. session.referer_check = ; How many bytes to read from the file. session.entropy_length = 0 ; Specified here to create the session id. session.entropy_file = ;session.entropy_length = 16 ;session.entropy_file = /dev/urandom ; Set to {nocache,private,public} to determine HTTP caching aspects. session.cache_limiter = nocache ; Document expires after n minutes. session.cache_expire = 180 ; use transient sid support if enabled by compiling with --enable-trans-sid. session.use_trans_sid = 1 url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"