RE: [PHP] Re: Apache 2.0 and Sessions
I didn't need to search, turns out there wasn't a folder C:\WINODWS\TEMP so I just made one and it's all fixed now. Only thing I don't understand is why it didn't change the save path when I asked it to. Oh well. Thanks for all the help people! Thanks, Stephen Craton http://www.melchior.us -Original Message- From: Jason Barnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 7:14 AM To: php-general@lists.php.net Subject: Re: [PHP] Re: Apache 2.0 and Sessions Warning: session_start(): open(C:\WINDOWS\TEMP\\sess_8c53cb2382f75076c51ed4b3edece36b, O_RDWR) Search the archives... seriously... guaranteed you will find the answer to this. -- Teach a person to fish... Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html PHP Manual: http://www.php.net/manual/en/index.php php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2 -- 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
Re: [PHP] Re: Apache 2.0 and Sessions
Warning: session_start(): open(C:\WINDOWS\TEMP\\sess_8c53cb2382f75076c51ed4b3edece36b, O_RDWR) Search the archives... seriously... guaranteed you will find the answer to this. -- Teach a person to fish... Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html PHP Manual: http://www.php.net/manual/en/index.php php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] BEGINNERS READ THIS MAIL!!! was: Re: [PHP] Re: Apache 2.0 and Sessions
Dear Beginners, Jason Barnett has a couple links in his sig that every beginner should read for their benefit as well as ours(mine ;-): Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html PHP Manual: http://www.php.net/manual/en/index.php php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2 (nice one Jason!) Jason Barnett wrote: Warning: session_start(): open(C:\WINDOWS\TEMP\\sess_8c53cb2382f75076c51ed4b3edece36b, O_RDWR) Search the archives... seriously... guaranteed you will find the answer to this. always a good idea to search the archives, not always easy but if you do and mention that when you end up posting a question (because you can't find an answer or still don't get it) you will probably get a tad more respect and that increases the chances of a useful reply! happy coding! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Apache 2.0 and Sessions
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. 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Apache 2.0 and Sessions
Stephen Craton wrote: 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('/...x/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
Re: [PHP] Re: Apache 2.0
Add the following to the bottom of your httpd.conf FilesMatch \.php$ SetOutputFilter PHP SetInputFilter PHP /FilesMatch No luck. error_log: [Wed Sep 04 15:01:44 2002] [notice] Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g PHP/4.3.0-dev configured -- resuming normal operations access_log: 10.1.65.81 - - [04/Sep/2002:15:01:51 +0100] GET /home/lhecking/test.php HTTP/1.1 304 0 Do I need to do something special to generally enable such filters? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Apache 2.0
No luck. error_log: [Wed Sep 04 15:01:44 2002] [notice] Apache/2.0.40 (Unix) mod_ssl/2.0.40 OpenSSL/0.9.6g PHP/4.3.0-dev configured -- resuming normal operations access_log: 10.1.65.81 - - [04/Sep/2002:15:01:51 +0100] GET /home/lhecking/test.php HTTP/1.1 304 0 Found the problem: following the PHP INSTALL document, I put php.ini into $prefix/lib. But I was using the --with-config-file-path configure option to search for it in apache's conf directory (I'm using the same meta- configure script for php across all servers - why I set the conf file path up like this in the first place, I can't remember). Sorry for bothering everyone :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php