I've read Nelson's message and have added the following lines: ini_set('session.save_path','ccb_sessions'); ini_set('session.use_trans_sid','off'); ini_set('session.gc_maxlifetime', '3600');
And still get the same page not found error. James -----Original Message----- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Saturday, October 11, 2003 3:46 PM To: 'Lowell Allen'; 'PHP' Subject: RE: [PHP] Sessions Hi, I checked the session settings with phpinfo(); I get the following values: session_save_path = /tmp session.use_cookies = On session.use_trans_sid = 1 I've created a folder on the same level as all the pages called "ccb_sessions" and have CHMOD it to 777. I have added the following snippet above session_start: <?php session_save_path("/ccb_sessions");?> When navigating to my test page I get the following error: Warning: open(/ccb_sessions/sess_bbbfa69631155d4097e0b0012c857c4a, O_RDWR) failed: No such file or directory (2) in /home/.paco/campuscb/campuscorkboard.com/MemberAccountDetails.php on line 2 Checking with my FTP client that file is there and has CHMOD values of 777. I've done a Google search for "No such file or directory", found a bunch of stuff for Python, nothing for PHP. I then closed the browser, FTP'd to the ccb_sessions folder, deleted the sess_bbbfa69631155d4097e0b0012c857c4a file and changed the session_save_path to session_save_page("ccb_session");. When going to the test page, it appears to loop several times, then gives me a "The page cannot be displayed" message. The server is (from phpinfo())Linux gaia 2.2.20, Server API is Apache. Other ideas? Thanks, James -----Original Message----- From: Lowell Allen [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 6:23 PM To: PHP Subject: Re: [PHP] Sessions > I'm trying to track down some issues with my site, and am trying to > decide if it's a session variable issue. On a random basis, it appears > that session vars are being dumped, deleted, or unset, as the site > will break. Queries based on session vars don't work, session vars not > being displayed, etc. This seems to happen most often after a page has > been idle for a couple of minutes and a refresh is done on the page. > > This is on a hosted site. I have checked the configuration settings > with phpinfo(); and session support is enabled. > > On all pages where I use $_SESSION[<varname>], I have <?php > session_start();?>. This has been double checked. > > 1) Do session vars timeout, or can they be set to timeout after a > certain length of time? > 2) Is there anything other than session_start(); that needs to be done > when using session vars? > 3) What other things can I check for? Most things are explained well by the online manual, and you should read and re-read the session documentation. That said, I'll also say that the documentation on sessions is not as informative as I'd like it to be, and I still get reports of sessions expiring before they should. Look at the output from echo phpinfo() and check these session configuration options: session.cookie_lifetime -- should be 0, lasts until quitting the browser session.use_cookies -- should be on session.use_trans_sid -- should be on Some things aren't explained very well, like what does "session.gc_maxlifetime" mean? The maximum time before garbage collection to remove session data that hasn't been used? But to minimize the chance of garbage collection on a shared server wrecking your sessions, you can specify a directory for saving session data. Create a directory (on the same level as your directory of publicly-viewable files if you can) and before the 'session_start();' line, do 'session_save_path("../my_sessions_dir");'. Also be aware that circumstances on the client side can mess with session cookies and cause the session to be lost, like using Internet Explorer with Entourage in Mac OS X. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php