Thanks for the reply, and I apologize for being a top poster, just a habit.
I would do that, and it is a good idea, just not practical since I usually upload or publish the scripts I have on here to a server or to other people.
Steve .... My laptop is my development server but my production work is on a public server. I apologize for not giving you a complete description of what I do ... I set my "session.save_path" on the public server by creating a TMP directory in my Public_html folder. I've created an IF THEN ELSE that recognizes whether the code is being executed on my laptop or at the public server. The entire include() file is as follows:
<?php if ($_SERVER['SERVER_NAME'] == "localhost") { session_save_path('c:\Program Files\Apache Group\Apache2\htdocs\tmp');
} else { session_save_path('/...xxxxx..../public_html/tmp');
} ?>
Works great ... and the old session files in the public_html/tmp directory get cleaned out automatically.
Still might not be practical for you for other reasons but I thought I should give you a more complete answer ...... Jerry
What I have here will not work on their servers if I do this. I could just comment that line out, granted, but it doesn't seem practical for my situation. Thanks for the suggestion though!
Thanks, Stephen Craton
-----Original Message-----
From: Jerry Kita [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 7:03 PM
To: php-general@lists.php.net
Subject: [PHP] Re: Apache 2.0 and Sessions
Stephen Craton wrote:
I just updated to Apache 2.0 and have gotten PHP all with it. However, I just loaded up a script that worked fine on my old Apache 1.3 install but
is
now causing my errors. Here's the error:
Warning: session_start(): open(C:\WINDOWS\TEMP\\sess_8c53cb2382f75076c51ed4b3edece36b, O_RDWR)
failed:
No such file or directory (2) in D:\htdocs\payments\index.php on line 8
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\htdocs\payments\index.php:8) in D:\htdocs\payments\index.php on line 8
I don't see why it's happening, especially since I went into php.ini (I'm
on
Windows XP) and changed session.save_patch to this:
session.save_path = "C:/PHP/sessiondata"
Can anyone give me some input here? I think I see the problem, the whole double back slash in the file location, but I don't see how to fix that.
Thanks,
Stephen Craton
Stephen,
Not sure I can see your error either but here's a thought that might be useful. I run Apache 2.0 on my laptop with PHP 4.3.4. Sessions work fine for me. For various reasons I chose to set my "session.save_path" at the beginning of every script and it works fine. Here's the line of code I use:
session_save_path('c:\Program Files\Apache Group\Apache2\htdocs\tmp');
Again .... it doesn't answer the question you're asking but it might be an approach that's easy for you to implement. I do it via an include().
-- Jerry Kita
http://www.salkehatchiehuntersville.com
email: [EMAIL PROTECTED]
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php