Re: [PHP] session_start(), memcache taking too much resources
On 3 Nov 2011, at 20:22, Ing. Branislav Geržo wrote: I am running high loaded website and I did some profiling, because webservers got high load. PHP Version 5.3.8, running FreeBSD 8.2-STABLE, on lighttpd 1.4.29, running php-fpm on 3 servers xdebug is showing, that calling line session_start() is taking too much time, which I am really surprised. So I think, something is wrong with session handler. Please check screenshot: http://oi42.tinypic.com/24czlu8.jpg session.save_handler memcache session.save_path tcp://web1:11211?persistent=1weight=1timeout=2retry_interval=5, tcp://web2:11211?persistent=1weight=1timeout=2retry_interval=5 I am using pecl memcache 3.0.6 Sounds to me like an issue connecting to memcached, possibly DNS-related. How is the lookup of web1/web2 being performed? Have you tried the lookup on the server? Alternatively try connecting to the memcached servers using netcat or telnet - does that exhibit the same delay? -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() may take 5 seconds :(
session1.php: ?php session_start(); $_SESSION['s1']='sth'; header(location: session2.php?.SID); ? session2.php: ?php session_start(); if(isset($_SESSION['s1'])) echo $_SESSION['s1']; else die(No session!); ?
Re: [PHP] session_start() may take 5 seconds :(
On Thu, Mar 31, 2011 at 8:10 AM, Negin Nickparsa nickpa...@gmail.com wrote: session1.php: ?php session_start(); $_SESSION['s1']='sth'; header(location: session2.php?.SID); ? session2.php: ?php session_start(); if(isset($_SESSION['s1'])) echo $_SESSION['s1']; else die(No session!); ? ok, that executes with success and fast.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
At 3:50 PM +0100 1/13/08, Jochem Maas wrote: to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost never the case), it is not required. e.g. - 8 info.php ?php phpinfo(); - 8 info.php It may be a religious argument, but I always close my scripts and I know where the white space is. Also, most of my code is used by other languages (i.e., html, js) so a closing bracket is always required -- unless it's the last function in a file, but I haven't checked to see if that works in all cases. So, I just always close it correctly. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
Terry Calie schreef: ... To illustrate my php goes like this: index.php = ?php code code require index2.php code ? index2.php ?php code code code ? whitespace character ... to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost never the case), it is not required. e.g. - 8 info.php ?php phpinfo(); - 8 info.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
Jochem Maas wrote: ? whitespace character ... to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost never the case), it is not required. e.g. - 8 info.php ?php phpinfo(); - 8 info.php I didn't know that. Does the underlying engine in PHP provide the otherwise missing tag? Does the described problem only happen with FF on Mac or does it affect other browsers on other OSes? Ulex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
Europus schreef: Jochem Maas wrote: ? whitespace character ... to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost never the case), it is not required. e.g. - 8 info.php ?php phpinfo(); - 8 info.php I didn't know that. Does the underlying engine in PHP provide the otherwise missing tag? the tag is not missing as such - the tag denotes the end of string that php parses - it's quite logical to assume that the end of a file means the same thing (especially when you consider that any file you include/require must specify '?php' to 'awaken' the php parser) Does the described problem only happen with FF on Mac or does it affect other browsers on other OSes? I have never seen this problem effect just one browser on on platform - afaic it's a general problem that effects all browsers - you can't send out HTTP headers after HTTP content ... now it maybe that some browsers these days see fit to ignore white space before the headers (or maybe just ignore a \n) but I doubt it ... honestly I can't see how php would even send the headers after the \n had been output ... either you error logging level is too low, your not reading the error log or you have error suppression on the header() function (.e.g @header()). all of these would give you the incorrect notion that the header function was working, all of these are bad practice. you also mentioned you changed the code when trying to test it on another machine - don't do that, test one thing at a time. anyway problem solved, preventative knowledge aquired, onto the next hurdle :-) Ulex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
Jochem Maas wrote: you also mentioned you changed the code when trying to test it on another machine - don't do that, test one thing at a time. I'm not the original poster, that wasn't me. anyway problem solved, preventative knowledge aquired, onto the next hurdle :-) I'm having some trouble with a for() loop and echoing array results to screen to see if I'm getting the data I'm after, I may post about it later. Ulex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
Europus schreef: Jochem Maas wrote: you also mentioned you changed the code when trying to test it on another machine - don't do that, test one thing at a time. I'm not the original poster, that wasn't me. anyway problem solved, preventative knowledge aquired, onto the next hurdle :-) I'm having some trouble with a for() loop and echoing array results to screen to see if I'm getting the data I'm after, I may post about it later. use var_dump() rather than echo. Ulex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
Hey... thanks for the replies. I installed the headers feature that Richard suggested and found that no headers were output. I started to transfer my php to another site to see if the problem replicated and I wasn't able to recreate the problem. It turns out that I require a file before the session_start that had one stupid character of whitespace at the end of it. When I transferred the php to recreate the problem, I replaced the require call with the actual code - eliminating the whitespace at the end of the file, so the problem didn't replicate. It took me a long time to figure out that was the problem. What a killer! To illustrate my php goes like this: index.php = ?php code code require index2.php code ? index2.php ?php code code code ? whitespace character The whitespace character is actually just an extra newline \n at the end of the file. So that gets output to the browser before the headers and apparently doesn't lock up any browsers except FireFox on a Mac. Thanks for the help. Just your courtesy in responses got me thinking in a new direction. Terry Richard Lynch wrote: Install Live HTTP Headers and see what headers are being sent. Then search for those headers and FireFox Mac issues online. On Fri, January 11, 2008 10:34 am, Terry Calie wrote: Sorry if this is the wrong place to ask this question... if so please help me figure out where to ask it. I've asked on FireFox forums and was told it was a PHP problem and to ask the developers of PHP. I have a PHP website that freezes in Firefox on a Mac. Every other browser/operating system combination I have tested is fine. I've narrowed down the problem to having to do with session_start, which is the session tracking mechanism for php. When I comment out session_start, the site works (but of course my site now becomes state-less). Again, the problem is ONLY on FireFox on a Mac. It works fine on FireFox on a PC. Any ideas as to what could be causing the problem with FireFox on Mac and not on PC? (Safari on Mac works fine) Thanks, Terry -- 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] session_start problems with FireFox on Mac
Terry Calie wrote: Hey... thanks for the replies. I installed the headers feature that Richard suggested and found that no headers were output. I started to transfer my php to another site to see if the problem replicated and I wasn't able to recreate the problem. It turns out that I require a file before the session_start that had one stupid character of whitespace at the end of it. When I transferred the php to recreate the problem, I replaced the require call with the actual code - eliminating the whitespace at the end of the file, so the problem didn't replicate. It took me a long time to figure out that was the problem. What a killer! You may use ob_clean() just before the header() to get rid of the extra whitespaces. -- Regards, Anup Shukla -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
On Jan 11, 2008 11:53 AM, Jason Pruim [EMAIL PROTECTED] wrote: With a problem like that, code and a web page are very helpful to track it down. I'm willing to take a look at what I can with my Mac firefox, and see what I can sort out :) I just need more info.. On Jan 11, 2008, at 11:34 AM, Terry Calie wrote: Sorry if this is the wrong place to ask this question... if so please help me figure out where to ask it. I've asked on FireFox forums and was told it was a PHP problem and to ask the developers of PHP. I have a PHP website that freezes in Firefox on a Mac. Every other browser/operating system combination I have tested is fine. I've narrowed down the problem to having to do with session_start, which is the session tracking mechanism for php. When I comment out session_start, the site works (but of course my site now becomes state-less). Again, the problem is ONLY on FireFox on a Mac. It works fine on FireFox on a PC. Any ideas as to what could be causing the problem with FireFox on Mac and not on PC? (Safari on Mac works fine) Terry, I had seen your posts before (I'm a Mozilla developer as well), but I didn't see mention of a version. What Mac FF version are you using, and what plugins do you have installed? Try disabling all plugins, restarting Firefox, and seeing if it will work for you then. -- /Dan Daniel P. Brown Senior Unix Geek and #1 Rated Year's Coolest Guy By Self Since Nineteen-Seventy-[mumble]. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
With a problem like that, code and a web page are very helpful to track it down. I'm willing to take a look at what I can with my Mac firefox, and see what I can sort out :) I just need more info.. On Jan 11, 2008, at 11:34 AM, Terry Calie wrote: Sorry if this is the wrong place to ask this question... if so please help me figure out where to ask it. I've asked on FireFox forums and was told it was a PHP problem and to ask the developers of PHP. I have a PHP website that freezes in Firefox on a Mac. Every other browser/operating system combination I have tested is fine. I've narrowed down the problem to having to do with session_start, which is the session tracking mechanism for php. When I comment out session_start, the site works (but of course my site now becomes state-less). Again, the problem is ONLY on FireFox on a Mac. It works fine on FireFox on a PC. Any ideas as to what could be causing the problem with FireFox on Mac and not on PC? (Safari on Mac works fine) Thanks, Terry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start problems with FireFox on Mac
Install Live HTTP Headers and see what headers are being sent. Then search for those headers and FireFox Mac issues online. On Fri, January 11, 2008 10:34 am, Terry Calie wrote: Sorry if this is the wrong place to ask this question... if so please help me figure out where to ask it. I've asked on FireFox forums and was told it was a PHP problem and to ask the developers of PHP. I have a PHP website that freezes in Firefox on a Mac. Every other browser/operating system combination I have tested is fine. I've narrowed down the problem to having to do with session_start, which is the session tracking mechanism for php. When I comment out session_start, the site works (but of course my site now becomes state-less). Again, the problem is ONLY on FireFox on a Mac. It works fine on FireFox on a PC. Any ideas as to what could be causing the problem with FireFox on Mac and not on PC? (Safari on Mac works fine) Thanks, Terry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start is slow occasionally
al jo wrote: Hi i have a site that is relatively high loaded (~20 reloads/sec) and i am trying to optimize it. So i have started timing sections of the php scripts to find out which is the slowest so i optimize it first. I write the times to a database( timings are done on the live server). So now when a user reloads the page (timings are set on only one of the pages) i write to the database how long it took and how long different sections take. That way i noticed thar occasionally that page takes extremely long to generate (there are occasions of 300sec), but generally it takes between 0.05 and 0.2 sec to generate. I started moving the sections to determine where the problem lies and it turned out that these three lines take that long from time to time: ini_set(session.gc_maxlifetime, 2400); session_name('x'); session_start(); I measured each of them and seems that session_start is the problem(had a few ~11 sec loads, but not something this big yet, of which ~10.5 is taking session_start) Does anyone know what is going on? Sessions are stored in /tmp/sessions/ which is 100MB ram drive and at the moment when this occurs it was ~68% used with ~12000 files in it. My suggestion is check the php source for what session_start does. Maybe it scans the directory to make sure it's going to generate a unique id and even though it's on a ram drive it's taking a while because of the number of files already there. That's just a completely wild guess though ;) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start(): Cannot send session cache limiter...
On Fri, 20 Jul 2007 16:39:51 -0500 (CDT), Richard Lynch wrote: Did you save it as UTF-8 with that byte-order-mark (BOM) thingie? Does UTF-8 even HAVE a BOM? http://www.unicode.org/Public/UNIDATA/Index.txt: byte order markFEFF U+FEFF is ef bb bf in UTF-8. /Nisse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start(): Cannot send session cache limiter...
From: Richard Lynch [EMAIL PROTECTED] To: Vanessa Vega [EMAIL PROTECTED] Date: Fri, 20 Jul 2007 16:39:51 -0500 (CDT) Subject: Re: [PHP] session_start(): Cannot send session cache limiter... On Fri, July 20, 2007 3:17 am, Paul Scott wrote: On Fri, 2007-07-20 at 16:01 +0800, Vanessa Vega wrote: I already put session_start() on topmost part of the file..but i saved the file as utf-8..and that seems to be the problem..can anyone share their knowledge on this? Set your error_reporting to at least E_ALL and check that there are no problems there first. That should give you more of a clue as to what is happening. Did you save it as UTF-8 with that byte-order-mark (BOM) thingie? Does UTF-8 even HAVE a BOM? I believe a BOM has messed others up in the past. Perhaps Google for your problem before posting will find an answer quicker... :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? I believe on Windows with word for example it inserts a byte order mark incorrectly. \ufeff. is what it comes out if I run the native2ascii program.This isn't technically correct behaviour and it shouldn't occur. Regards, Wesley Acheson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start(): Cannot send session cache limiter...
On Fri, 2007-07-20 at 16:01 +0800, Vanessa Vega wrote: I already put session_start() on topmost part of the file..but i saved the file as utf-8..and that seems to be the problem..can anyone share their knowledge on this? Set your error_reporting to at least E_ALL and check that there are no problems there first. That should give you more of a clue as to what is happening. --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start(): Cannot send session cache limiter...
On Fri, July 20, 2007 3:17 am, Paul Scott wrote: On Fri, 2007-07-20 at 16:01 +0800, Vanessa Vega wrote: I already put session_start() on topmost part of the file..but i saved the file as utf-8..and that seems to be the problem..can anyone share their knowledge on this? Set your error_reporting to at least E_ALL and check that there are no problems there first. That should give you more of a clue as to what is happening. Did you save it as UTF-8 with that byte-order-mark (BOM) thingie? Does UTF-8 even HAVE a BOM? I believe a BOM has messed others up in the past. Perhaps Google for your problem before posting will find an answer quicker... :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_Start() error
Hi, just put session_start() (first line) the first thing in your php file and this should solve the problem. Regards, Rabih On 3/5/07, Helder Lopes [EMAIL PROTECTED] wrote: *hi people, Hi have this error in the session cookie, how to solve this??? Warning*: session_start() [function.session-starthttp://localhost/function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\PHP\xampp\htdocs\index.php:10) in *D:\PHP\xampp\htdocs\verifica.php* on line *3*
Re: [PHP] Session_Start() error
Also make sure you don't have empty lines before the ?php or ? tags Helder Lopes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] *hi people, Hi have this error in the session cookie, how to solve this??? Warning*: session_start() [function.session-starthttp://localhost/function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\PHP\xampp\htdocs\index.php:10) in *D:\PHP\xampp\htdocs\verifica.php* on line *3* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_Start() error
Helder Lopes wrote: *hi people, Hi have this error in the session cookie, how to solve this??? did you read the error message? did you look up the lines specified in the error message? did you read the manual pages related to sessions and session functions? headers have already been sent because output has already been sent, you can't send headers after output has been sent out - so don't do that. Warning*: session_start() [function.session-starthttp://localhost/function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\PHP\xampp\htdocs\index.php:10) in *D:\PHP\xampp\htdocs\verifica.php* on line *3* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() and fopen
On 9/13/06, Fabri [EMAIL PROTECTED] wrote: Hello, would you please help me on this issue that is making me crazy? I'll try I start a session with session_start() and I need to write a file, the file is written twice! If I remove session_start the code works obviously fine. This has never happened to me, ever. I used the date as name of file so I can see the problem, otherwise the file is overwritten. What exactly are you trying to do? session_start(); $nome = date(Ymd-His); $path = $nome . .xml; $fh = fopen($path, 'w'); if ($fh) { fwrite($fh, 'ciao'); fclose($fh); echo $path; } for full reporting you might want to do something when the condition of if($fh) is false does someone have an answer? I'm not sure what else to tell you. Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() and fopen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fabri wrote: Hello, would you please help me on this issue that is making me crazy? I start a session with session_start() and I need to write a file, the file is written twice! If I remove session_start the code works obviously fine. I used the date as name of file so I can see the problem, otherwise the file is overwritten. session_start(); $nome = date(Ymd-His); $path = $nome . .xml; $fh = fopen($path, 'w'); if ($fh) { fwrite($fh, 'ciao'); fclose($fh); echo $path; } does someone have an answer? Yes, I believe you need to elaborate more on your objectives for the code and what exactly you mean by the file being written twice. From the code snippet above, it seems as though you are just going to overwrite a file and destroy it's contents, not write to it twice. This isn't being called from any sort of loop, is it? - -- Christopher Weldon, ZCE President CEO Cerberus Interactive, Inc. [EMAIL PROTECTED] 979.739.5874 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFCGnIZxvk7JEXkbERAj4OAKCVUc3lLkx7JcbwYavK/Qc/DYKtEQCfbU9w EevaaQyHxc87B7qFwZxS0E4= =BbS2 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start/session_write_close creates multiple sessioncookieheaders. How to fix this.
Chris wrote: Mathijs wrote: Chris wrote: Mathijs wrote: Hello again, I Use session_write_close() so the page loads quicker because i use session on multiple place. This because session has protection for race conditions. Now it works very well and i don't have any problems at all. I only see that there are multiple session cookie headers set. I Personally think that one is enough :P. How can i make it so that it just sets just one and not set this header every time i call session_start or session_write_close. Because i don't know when the cookie is set. I think this will be an either/or situation. Either it only sends one session cookie header and you don't use session_write_close all over the place.. or, it sends multiple cookies and you do use session_write_close all over the place. The internals of php would set this behaviour, not something you can change without changing the C code. Hmmm... I find it kinda strange that it sets the same uniqueId with the same session name more then once. It would be logical to just have one.. And overwrite the previous session cookie. Any other thing would be an programmers fault in my opinion. Because you can't have more then one session id per session cookie name. Also, the browser won't send all the cookies back. This is just useless overhead. But it seems that i have to live with it (for now). I think ill report this as an bug to PHP. Doubt you'll get very far. I could open 10 tabs in firefox and I'll have the same session id in each one, but they'll all be on different pages doing different things. Even in IE, if I open a new page I'll get the same session id in both browser windows. That is a good thing. But the problem is that there are like 5 or 6 headers for one request. --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0629-1, 07/19/2006 Tested on: 7/20/2006 8:56:33 AM avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start/session_write_close creates multiple sessioncookie headers. How to fix this.
Mathijs wrote: Chris wrote: Mathijs wrote: Hello again, I Use session_write_close() so the page loads quicker because i use session on multiple place. This because session has protection for race conditions. Now it works very well and i don't have any problems at all. I only see that there are multiple session cookie headers set. I Personally think that one is enough :P. How can i make it so that it just sets just one and not set this header every time i call session_start or session_write_close. Because i don't know when the cookie is set. I think this will be an either/or situation. Either it only sends one session cookie header and you don't use session_write_close all over the place.. or, it sends multiple cookies and you do use session_write_close all over the place. The internals of php would set this behaviour, not something you can change without changing the C code. Hmmm... I find it kinda strange that it sets the same uniqueId with the same session name more then once. It would be logical to just have one.. And overwrite the previous session cookie. Any other thing would be an programmers fault in my opinion. Because you can't have more then one session id per session cookie name. Also, the browser won't send all the cookies back. This is just useless overhead. But it seems that i have to live with it (for now). I think ill report this as an bug to PHP. Doubt you'll get very far. I could open 10 tabs in firefox and I'll have the same session id in each one, but they'll all be on different pages doing different things. Even in IE, if I open a new page I'll get the same session id in both browser windows. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start/session_write_close creates multiple sessioncookie headers. How to fix this.
Chris wrote: Mathijs wrote: Hello again, I Use session_write_close() so the page loads quicker because i use session on multiple place. This because session has protection for race conditions. Now it works very well and i don't have any problems at all. I only see that there are multiple session cookie headers set. I Personally think that one is enough :P. How can i make it so that it just sets just one and not set this header every time i call session_start or session_write_close. Because i don't know when the cookie is set. I think this will be an either/or situation. Either it only sends one session cookie header and you don't use session_write_close all over the place.. or, it sends multiple cookies and you do use session_write_close all over the place. The internals of php would set this behaviour, not something you can change without changing the C code. Hmmm... I find it kinda strange that it sets the same uniqueId with the same session name more then once. It would be logical to just have one.. And overwrite the previous session cookie. Any other thing would be an programmers fault in my opinion. Because you can't have more then one session id per session cookie name. Also, the browser won't send all the cookies back. This is just useless overhead. But it seems that i have to live with it (for now). I think ill report this as an bug to PHP. Thx. Mathijs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start/session_write_close creates multiple session cookie headers. How to fix this.
Mathijs wrote: Hello again, I Use session_write_close() so the page loads quicker because i use session on multiple place. This because session has protection for race conditions. Now it works very well and i don't have any problems at all. I only see that there are multiple session cookie headers set. I Personally think that one is enough :P. How can i make it so that it just sets just one and not set this header every time i call session_start or session_write_close. Because i don't know when the cookie is set. I think this will be an either/or situation. Either it only sends one session cookie header and you don't use session_write_close all over the place.. or, it sends multiple cookies and you do use session_write_close all over the place. The internals of php would set this behaviour, not something you can change without changing the C code. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
because you have nothing in $session_id. On 4/6/06, Diana Castillo [EMAIL PROTECTED] wrote: If I have nothing in $session_id, why do I get this message when I do a session_start() ? Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 at C:\Inetpub\wwwroot\usr\local\global\php\online\InterfaceManager.php line 149. -- Diana Castillo Destinia.com C/Granvia 22 dcdo 4-dcha 28013 Madrid-Spain Tel : 00-34-913604039 Ext 216 Fax : 00-34-915228673 email: [EMAIL PROTECTED] Web : http://www.hotelkey.com http://www.destinia.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start(), Pragma and Cache-control headers
I solved the problem after a while, seems it had been reacently debated in the bug pages within php, to remove headers which are added by the session_start(); you can add the following : ini_set('session.use_cookies', false); session_cache_limiter(''); Kind regards, Kim Steinhaug - - - - - - - - - www.steinhaug.com - Original Message - From: Kim Steinhaug (php list) [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Monday, August 22, 2005 7:01 PM Subject: [PHP] session_start(), Pragma and Cache-control headers Hello, I'm working on a downbload script which serves M3U files (Winamp playlist files) through a PHP file like this : somepath/download.m3u.php?id=2 Then in the PHP script I generate the M3U file, and serve up the headers I want. Swell so far, but a little problem appears. The downloads are for members only, and therefor I need to check if the user is logged in, I do this by sessions and therefore I add a session_start() at the start of my file. When I do this some headers are added to the file, namely : Set-Cookie: PHPSESSID=xxx; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Theese headers are not needed, and I dont want them either, exept I cant seem to get rid of them since I need the session_start() in the beginning of the file. Sure, I could wish for a function unset_potensial_header(pragma); I guess there are no way to remove theese unwanted headers? Yesterday I had to give up another problem, but luckily I found the answer here : http://bugs.php.net/bug.php?id=33057 So to sum it up : How can I remove the Cache-Control and Pragma headers? And Im not looking for this answer : header('Pragma: '); header('Cache-control: '); The headers are still sendt, exept they are empty, doesnt look like a nice sollution for a production environment. Kind regards, Kim Steinhaug - - - - - - - - - www.steinhaug.com -- 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] @session_start generates a new session_id
I'll try that, thanks a lot. -Original Message- From: Reinhart Viane [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 12:49 PM To: 'Lizet Peña de Sola'; [EMAIL PROTECTED] Subject: RE: [PHP] @session_start generates a new session_id Instead of: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; unset($_SESSION['validlogin']); unset($_SESSION['username']); unset($_SESSION['password']); session_unset(); print(username=.$_SESSION['username']); print(password=.$_SESSION['password']); if(session_id()){ session_destroy();} ? Try this: //unregister the sessions $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; //destroy the sessions array $_SESSION = array(); //destroy the session session_destroy(); Greetings Reinhart Viane -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] @session_start generates a new session_id
It still doesn't work :(... When I try to destroy the session without asking if there's a session_id, it gives me a warning, I fixed it with the if(session_id()) but still, when the user logs in again with a different profile, in the same browser window, the profile that is loaded is the previous one... Here I copy the logout.php code: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; //destroy the sessions array $_SESSION = array(); //destroy the session if(session_id()){ session_destroy(); } ? And the code that runs when the user logs in: ? $username=trim($_POST['user']); $password=trim($_POST['pwd']); if(session_id()){echo('Error, please contact tech support'); exit();} if(validateuser()){ session_start(); $_SESSION['validlogin']=true; $_SESSION['username']=$username; $_SESSION['password']=$password; } ... ? Any ideas why the session variables get set to their first value after starting the session for the second time? Should I create a different session id each time? Tia, Lizet -Original Message- From: Reinhart Viane [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 12:49 PM To: 'Lizet Peña de Sola'; [EMAIL PROTECTED] Subject: RE: [PHP] @session_start generates a new session_id Instead of: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; unset($_SESSION['validlogin']); unset($_SESSION['username']); unset($_SESSION['password']); session_unset(); print(username=.$_SESSION['username']); print(password=.$_SESSION['password']); if(session_id()){ session_destroy();} ? Try this: //unregister the sessions $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; //destroy the sessions array $_SESSION = array(); //destroy the session session_destroy(); Greetings Reinhart Viane -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] @session_start generates a new session_id
session_id($username); session_start(); Solved the problem... Thank you all for the replies... -Original Message- From: Lizet Peña de Sola [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 3:55 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] @session_start generates a new session_id It still doesn't work :(... When I try to destroy the session without asking if there's a session_id, it gives me a warning, I fixed it with the if(session_id()) but still, when the user logs in again with a different profile, in the same browser window, the profile that is loaded is the previous one... Here I copy the logout.php code: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; //destroy the sessions array $_SESSION = array(); //destroy the session if(session_id()){ session_destroy(); } ? And the code that runs when the user logs in: ? $username=trim($_POST['user']); $password=trim($_POST['pwd']); if(session_id()){echo('Error, please contact tech support'); exit();} if(validateuser()){ session_start(); $_SESSION['validlogin']=true; $_SESSION['username']=$username; $_SESSION['password']=$password; } ... ? Any ideas why the session variables get set to their first value after starting the session for the second time? Should I create a different session id each time? Tia, Lizet -Original Message- From: Reinhart Viane [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 12:49 PM To: 'Lizet Peña de Sola'; [EMAIL PROTECTED] Subject: RE: [PHP] @session_start generates a new session_id Instead of: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; unset($_SESSION['validlogin']); unset($_SESSION['username']); unset($_SESSION['password']); session_unset(); print(username=.$_SESSION['username']); print(password=.$_SESSION['password']); if(session_id()){ session_destroy();} ? Try this: //unregister the sessions $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; //destroy the sessions array $_SESSION = array(); //destroy the session session_destroy(); Greetings Reinhart Viane -- 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 -- 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] @session_start generates a new session_id
Hello Greg, Thanks for reply, I did try ini_set ( session.auto_start, 1); and it set the session.auto_start to On on my configuration, however the rest of the users on that server had auto_start off. This didn't solve the problem, should I try to access .htaccess? I presume it will affect all the sites on that server, right? The problem continues, I run the logout script each time the user leaves the admin site: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; unset($_SESSION['validlogin']); unset($_SESSION['username']); unset($_SESSION['password']); session_unset(); print(username=.$_SESSION['username']); print(password=.$_SESSION['password']); if(session_id()){ session_destroy();} ? And when the user tries to enter the admin panel again and log in, the following script runs: ? ... session_start(); $_SESSION['validlogin']=true; $_SESSION['username']=$username; $_SESSION['password']=$password; ? However when the user logs out and the first script runs, if that user tries to log in again with a different account, the session is started, but the username and password variables take the first user's values, they're not overriden. Any idea? Thanks a lot in advance. Lizet -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 6:18 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] @session_start generates a new session_id On Mon, 25 Oct 2004 15:59:18 -0400, Lizet Peña de Sola [EMAIL PROTECTED] wrote: How can I set session_auto_start On, I have a similar problem and I think it's because my web hosting has that feature off. .htaccess php_flag session.auto_start on -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- 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] @session_start generates a new session_id
Instead of: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; unset($_SESSION['validlogin']); unset($_SESSION['username']); unset($_SESSION['password']); session_unset(); print(username=.$_SESSION['username']); print(password=.$_SESSION['password']); if(session_id()){ session_destroy();} ? Try this: //unregister the sessions $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; //destroy the sessions array $_SESSION = array(); //destroy the session session_destroy(); Greetings Reinhart Viane -- 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
Re: [PHP] @session_start generates a new session_id
Hi Sadeq, Check your PHP config file. You may enable auto session start. I think this is the reasone of problem. sorry for the delay and indeed your suggestion solves now my problem. Thank's a lot :-) -- Best Regards, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] @session_start generates a new session_id
How can I set session_auto_start On, I have a similar problem and I think it's because my web hosting has that feature off. -Original Message- From: Sadeq Naqashzade [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:47 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] @session_start generates a new session_id Hi, Check your PHP config file. You may enable auto session start. I think this is the reasone of problem. Sadeq On Tue, 19 Oct 2004 18:21:29 +0200, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Matt, @session_start(); session_name(userauth); $_SESSION['SESS_CUS'] = $user_id; I am not 100% sure what the problem is, but if you are trying to change the session name to userauth, I think you need to do that before session_start session_name() works ok so far. For example: ? @session_start; $session = session_id(); /* index.php */ $_SESSION['SESS_CUS'] == $user_id; echo $session; ? OUTPUT in the browser: 34f321149ee49d20e0e223f3020c1f77 In the case a new page is loaded it changes to a new value: ? $session = session_id(); /* userauth.php */ echo PHPSESSID: $session; echo SESSION:.$_SESSION['SESS_CUS']; ? OUTPUT in the browser: PHPSESSID: b65de73df8d327a4e15627ccfd14968d SESSION: A new request over http generates a new session and $_SESSION['XYZ'] is not available anymore. -- Best Regards, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Yazd, 8917954894 -- 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] @session_start generates a new session_id
On Mon, 25 Oct 2004 15:59:18 -0400, Lizet Peña de Sola [EMAIL PROTECTED] wrote: How can I set session_auto_start On, I have a similar problem and I think it's because my web hosting has that feature off. .htaccess php_flag session.auto_start on -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] @session_start generates a new session_id
@session_start(); session_name(userauth); $_SESSION['SESS_CUS'] = $user_id; I am not 100% sure what the problem is, but if you are trying to change the session name to userauth, I think you need to do that before session_start http://us2.php.net/session_name -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] @session_start generates a new session_id
Hi Matt, @session_start(); session_name(userauth); $_SESSION['SESS_CUS'] = $user_id; I am not 100% sure what the problem is, but if you are trying to change the session name to userauth, I think you need to do that before session_start session_name() works ok so far. For example: ? @session_start; $session = session_id(); /* index.php */ $_SESSION['SESS_CUS'] == $user_id; echo $session; ? OUTPUT in the browser: 34f321149ee49d20e0e223f3020c1f77 In the case a new page is loaded it changes to a new value: ? $session = session_id(); /* userauth.php */ echo PHPSESSID: $session; echo SESSION:.$_SESSION['SESS_CUS']; ? OUTPUT in the browser: PHPSESSID: b65de73df8d327a4e15627ccfd14968d SESSION: A new request over http generates a new session and $_SESSION['XYZ'] is not available anymore. -- Best Regards, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] @session_start generates a new session_id
Hi, Check your PHP config file. You may enable auto session start. I think this is the reasone of problem. Sadeq On Tue, 19 Oct 2004 18:21:29 +0200, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Matt, @session_start(); session_name(userauth); $_SESSION['SESS_CUS'] = $user_id; I am not 100% sure what the problem is, but if you are trying to change the session name to userauth, I think you need to do that before session_start session_name() works ok so far. For example: ? @session_start; $session = session_id(); /* index.php */ $_SESSION['SESS_CUS'] == $user_id; echo $session; ? OUTPUT in the browser: 34f321149ee49d20e0e223f3020c1f77 In the case a new page is loaded it changes to a new value: ? $session = session_id(); /* userauth.php */ echo PHPSESSID: $session; echo SESSION:.$_SESSION['SESS_CUS']; ? OUTPUT in the browser: PHPSESSID: b65de73df8d327a4e15627ccfd14968d SESSION: A new request over http generates a new session and $_SESSION['XYZ'] is not available anymore. -- Best Regards, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Yazd, 8917954894 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() warnings
Always call the function on the first line of your page. Bye Paoage [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Larry E . Ullman wrote: When I use session_start function, I receive the following warning messages: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Can anyone explain why it happens and how to solve the warnings. Thanks :) Something on or about line 2 of ListClientInfo.php is sending data to the Web browser. This could be HTML, plain text, or blank spaces. Get rid of that and you'll get rid of the warnings. Larry Thanks, I got it. I leave a line of space before I use include directive. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() warnings
When I use session_start function, I receive the following warning messages: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Can anyone explain why it happens and how to solve the warnings. Thanks :) Something on or about line 2 of ListClientInfo.php is sending data to the Web browser. This could be HTML, plain text, or blank spaces. Get rid of that and you'll get rid of the warnings. Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() warnings
Larry E . Ullman wrote: When I use session_start function, I receive the following warning messages: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/w4t3c101/public_html/ListClientInfo.php:2) in /home/w4t3c101/public_html/SessionControl.php on line 9 Can anyone explain why it happens and how to solve the warnings. Thanks :) Something on or about line 2 of ListClientInfo.php is sending data to the Web browser. This could be HTML, plain text, or blank spaces. Get rid of that and you'll get rid of the warnings. Larry Thanks, I got it. I leave a line of space before I use include directive. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start in php 4.3.6
On Fri, May 21, 2004 at 10:01:56PM +0200, Paul Godard wrote: Hi All my web sites suddenly stopped working after my ISP installed the newer php 4.3.6 released. The problem is when calling the session_start() function. It seems that the warning message saying that the session has already started and that the function will be ignored makes the php script stop at this point although it is a warning. This worked perfectly in php 4.3.4. What should I do to be compatible with php 4.3.6? This is because your ISP has likely set session.auto_start = 1 in php.ini Either have the ISP set it to 0 or remove all session_start calls from your scripts to eliminate the warnings. /\/\ \/\/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start in php 4.3.6
On 05/21/04 16:08 Michael R. Wayne spoke: On Fri, May 21, 2004 at 10:01:56PM +0200, Paul Godard wrote: Hi All my web sites suddenly stopped working after my ISP installed the newer php 4.3.6 released. The problem is when calling the session_start() function. It seems that the warning message saying that the session has already started and that the function will be ignored makes the php script stop at this point although it is a warning. This worked perfectly in php 4.3.4. What should I do to be compatible with php 4.3.6? This is because your ISP has likely set session.auto_start = 1 in php.ini Either have the ISP set it to 0 or remove all session_start calls from your scripts to eliminate the warnings. Would putting an '@' in front of all session_start calls hide the problem? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start in php 4.3.6
* Thus wrote Bob Lockie ([EMAIL PROTECTED]): On 05/21/04 16:08 Michael R. Wayne spoke: On Fri, May 21, 2004 at 10:01:56PM +0200, Paul Godard wrote: Hi All my web sites suddenly stopped working after my ISP installed the newer php 4.3.6 released. The problem is when calling the session_start() function. It seems that the warning message saying that the session has already started and that the function will be ignored makes the php script stop at this point although it is a warning. This worked perfectly in php 4.3.4. What should I do to be compatible with php 4.3.6? This is because your ISP has likely set session.auto_start = 1 in php.ini Either have the ISP set it to 0 or remove all session_start calls from your scripts to eliminate the warnings. Would putting an '@' in front of all session_start calls hide the problem? Hide? yeah... Good Idea? No if (! session_id() ) session_start(); Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() make netscape 4.7 reload page.
Jonathan Zhang wrote: test.php -- ? session_start(); ? form input type=text name=test /form For Win2kpro+netscape 4.7,all form data you enter in this page will lost when resize the browser's window size, ns4.7 have reload this page when resize the window. But if you remove the session_start() from this page, the issue will not exist. I use Win2kpro+netscape 7.1, resizing the window can keep the input data. I don't have netscape 4.7 installed, so can not test it. Perhaps there is some bug in it. You may update Netscape to 7.1 for a lasy solution. Best Bao Is there any solution for it? thanks, Jonathan Zhang -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() make netscape 4.7 reload page.
Jonathan Zhang wrote: test.php -- ? session_start(); ? form input type=text name=test /form For Win2kpro+netscape 4.7,all form data you enter in this page will lost when resize the browser's window size, ns4.7 have reload this page when resize the window. But if you remove the session_start() from this page, the issue will not exist. Is there any solution for it? thanks, Jonathan Zhang Netscape 4.x has this annoying behavior, it tries to fetch a fresh copy whenever you resize window, view source code or print the page. You might try to use session_cache_limiter() function to control the cache headers send, try private_no_expire first. Do not set it to public if the page contains private information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() make netscape 4.7 reload page.
Marek, Thank you very much. Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jonathan Zhang wrote: test.php -- ? session_start(); ? form input type=text name=test /form For Win2kpro+netscape 4.7,all form data you enter in this page will lost when resize the browser's window size, ns4.7 have reload this page when resize the window. But if you remove the session_start() from this page, the issue will not exist. Is there any solution for it? thanks, Jonathan Zhang Netscape 4.x has this annoying behavior, it tries to fetch a fresh copy whenever you resize window, view source code or print the page. You might try to use session_cache_limiter() function to control the cache headers send, try private_no_expire first. Do not set it to public if the page contains private information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start() problem
From: Jeff McKeon [EMAIL PROTECTED] [snip] where do I set the default location for session data? session.save_path in php.ini ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start() problem
* Thus wrote Jeff McKeon ([EMAIL PROTECTED]): Not related to your problem but: session_regisister(userid, userpassword); spelling ~~~^^ Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() || shell access problem......
Sessions don't work on command line and that is how you run your script - from command line. CF High wrote: Hey Robert. Indeed, hard to find the problem. I don't believe it's a whitespace issue, or even a Headers sent issue, despite the fact that I'm receiving that error. Check it out: test.php contains just one line: ?$text = `usr/local/bin/php /path/to/my/php/test1.php`;? test1.php, the file to be executed, contains just one line: ?session_start();? There are no line breaks, spaces, etc. Still get Headers already sent. Pretty strange, right? Correct me if I'm wrong, but I think the problem may be related to the fact that when files are executed from the command line, php now looks for include_paths, session_paths, etc. relative to the server root; not the site root. I can think of no other reason why include paths, starting sessions, and so on, return errors from the command line but ork perfectly fine when run in a browser. Feel free to clue me in -- I know didly about shell access issues. --Noah Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 2003-09-20 at 15:46, CF High wrote: Hey all. I'm running a script from the command-line php interpreter as follows: (thanks to D. Souza for lead) $text = `usr/local/bin/php /path/to/my/php/page.php`; within the read file I want to enable sessions, so I session_start() at the top of the page: ? session_start(); ? ? code to execute here... ? Regardless of how I mess around with placement of session_start(), I get a Headers already sent. Why? Nothing has been output to the browser within the read file! Furthermore, if I create a test page with just: ?$text = `usr/local/bin/php /path/to/my/php/page.php`;? Still receive Headers already sent. My eyes are completely fried -- anyone feel like saving my vision? This often is difficult to detect when there's is implicit output outside of the ? tag. Check the top of the included file or start php script and see if there is any whitespace or newlines preceding the tag. HTH, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() || shell access problem......
H, Well, is there a way to pass params to file_to_be_executed in command line? For example: ? $my_param = 'my_include_path'; $text = `usr/local/bin/php /path/to/my/php/page.php`; ? Somehow I need $my_param to be passed to page.php (the file to be processed in command line). Any ideas? --Noah Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sessions don't work on command line and that is how you run your script - from command line. CF High wrote: Hey Robert. Indeed, hard to find the problem. I don't believe it's a whitespace issue, or even a Headers sent issue, despite the fact that I'm receiving that error. Check it out: test.php contains just one line: ?$text = `usr/local/bin/php /path/to/my/php/test1.php`;? test1.php, the file to be executed, contains just one line: ?session_start();? There are no line breaks, spaces, etc. Still get Headers already sent. Pretty strange, right? Correct me if I'm wrong, but I think the problem may be related to the fact that when files are executed from the command line, php now looks for include_paths, session_paths, etc. relative to the server root; not the site root. I can think of no other reason why include paths, starting sessions, and so on, return errors from the command line but ork perfectly fine when run in a browser. Feel free to clue me in -- I know didly about shell access issues. --Noah Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 2003-09-20 at 15:46, CF High wrote: Hey all. I'm running a script from the command-line php interpreter as follows: (thanks to D. Souza for lead) $text = `usr/local/bin/php /path/to/my/php/page.php`; within the read file I want to enable sessions, so I session_start() at the top of the page: ? session_start(); ? ? code to execute here... ? Regardless of how I mess around with placement of session_start(), I get a Headers already sent. Why? Nothing has been output to the browser within the read file! Furthermore, if I create a test page with just: ?$text = `usr/local/bin/php /path/to/my/php/page.php`;? Still receive Headers already sent. My eyes are completely fried -- anyone feel like saving my vision? This often is difficult to detect when there's is implicit output outside of the ? tag. Check the top of the included file or start php script and see if there is any whitespace or newlines preceding the tag. HTH, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() || shell access problem......
Thank the heavens above Actually, thank Ben, a poster from php.net manual. Looks like environment variables are not passed to file when it is executed from the command line. A workaround is: $inc_path = $_SERVER['DOCUMENT_ROOT'] . '/'; $remaddr = getenv(DOCUMENT_ROOT); putenv(DOCUMENT_ROOT=$inc_path); That does the trick for what I need done now; namely, being able to include files within my command line executed files. Still, there must be a way to pass params to command line executed files.. --Noah Cf High [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] H, Well, is there a way to pass params to file_to_be_executed in command line? For example: ? $my_param = 'my_include_path'; $text = `usr/local/bin/php /path/to/my/php/page.php`; ? Somehow I need $my_param to be passed to page.php (the file to be processed in command line). Any ideas? --Noah Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sessions don't work on command line and that is how you run your script - from command line. CF High wrote: Hey Robert. Indeed, hard to find the problem. I don't believe it's a whitespace issue, or even a Headers sent issue, despite the fact that I'm receiving that error. Check it out: test.php contains just one line: ?$text = `usr/local/bin/php /path/to/my/php/test1.php`;? test1.php, the file to be executed, contains just one line: ?session_start();? There are no line breaks, spaces, etc. Still get Headers already sent. Pretty strange, right? Correct me if I'm wrong, but I think the problem may be related to the fact that when files are executed from the command line, php now looks for include_paths, session_paths, etc. relative to the server root; not the site root. I can think of no other reason why include paths, starting sessions, and so on, return errors from the command line but ork perfectly fine when run in a browser. Feel free to clue me in -- I know didly about shell access issues. --Noah Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 2003-09-20 at 15:46, CF High wrote: Hey all. I'm running a script from the command-line php interpreter as follows: (thanks to D. Souza for lead) $text = `usr/local/bin/php /path/to/my/php/page.php`; within the read file I want to enable sessions, so I session_start() at the top of the page: ? session_start(); ? ? code to execute here... ? Regardless of how I mess around with placement of session_start(), I get a Headers already sent. Why? Nothing has been output to the browser within the read file! Furthermore, if I create a test page with just: ?$text = `usr/local/bin/php /path/to/my/php/page.php`;? Still receive Headers already sent. My eyes are completely fried -- anyone feel like saving my vision? This often is difficult to detect when there's is implicit output outside of the ? tag. Check the top of the included file or start php script and see if there is any whitespace or newlines preceding the tag. HTH, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() || shell access problem......
On Sun, 21 Sep 2003, CF High wrote: Well, is there a way to pass params to file_to_be_executed in command line? For example: ? $my_param = 'my_include_path'; $text = `usr/local/bin/php /path/to/my/php/page.php`; ? Somehow I need $my_param to be passed to page.php (the file to be processed in command line). Any ideas? Just put them after the filename and grab them out of your $argv array. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() || shell access problem......
On Sat, 2003-09-20 at 15:46, CF High wrote: Hey all. I'm running a script from the command-line php interpreter as follows: (thanks to D. Souza for lead) $text = `usr/local/bin/php /path/to/my/php/page.php`; within the read file I want to enable sessions, so I session_start() at the top of the page: ? session_start(); ? ? code to execute here... ? Regardless of how I mess around with placement of session_start(), I get a Headers already sent. Why? Nothing has been output to the browser within the read file! Furthermore, if I create a test page with just: ?$text = `usr/local/bin/php /path/to/my/php/page.php`;? Still receive Headers already sent. My eyes are completely fried -- anyone feel like saving my vision? This often is difficult to detect when there's is implicit output outside of the ? tag. Check the top of the included file or start php script and see if there is any whitespace or newlines preceding the tag. HTH, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() || shell access problem......
Hey Robert. Indeed, hard to find the problem. I don't believe it's a whitespace issue, or even a Headers sent issue, despite the fact that I'm receiving that error. Check it out: test.php contains just one line: ?$text = `usr/local/bin/php /path/to/my/php/test1.php`;? test1.php, the file to be executed, contains just one line: ?session_start();? There are no line breaks, spaces, etc. Still get Headers already sent. Pretty strange, right? Correct me if I'm wrong, but I think the problem may be related to the fact that when files are executed from the command line, php now looks for include_paths, session_paths, etc. relative to the server root; not the site root. I can think of no other reason why include paths, starting sessions, and so on, return errors from the command line but ork perfectly fine when run in a browser. Feel free to clue me in -- I know didly about shell access issues. --Noah Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 2003-09-20 at 15:46, CF High wrote: Hey all. I'm running a script from the command-line php interpreter as follows: (thanks to D. Souza for lead) $text = `usr/local/bin/php /path/to/my/php/page.php`; within the read file I want to enable sessions, so I session_start() at the top of the page: ? session_start(); ? ? code to execute here... ? Regardless of how I mess around with placement of session_start(), I get a Headers already sent. Why? Nothing has been output to the browser within the read file! Furthermore, if I create a test page with just: ?$text = `usr/local/bin/php /path/to/my/php/page.php`;? Still receive Headers already sent. My eyes are completely fried -- anyone feel like saving my vision? This often is difficult to detect when there's is implicit output outside of the ? tag. Check the top of the included file or start php script and see if there is any whitespace or newlines preceding the tag. HTH, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start() corrupt HTML output with IE
hecchan wrote: Using IE 6 (XP) i can't see the source generated for PHP even the page works properly (It doesn't happend with Mozilla or Opera). The View source in IE 5 and 6 is buggy : it doesnt work as soon as there are too many files in the Temp Internetfiles folder. sic. Solution is of course emptying IE cache... or switching to mozilla ;-) See M$ Knowledge base article Q306907 -- Christophe Chisogne Developper, Publicityweb sprl http://www.publicityweb.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start() corrupt HTML output with IE
Thank you Curt for the explanation. Viraj Curt Zirzow wrote: * Thus wrote Viraj Kalinga Abayarathna ([EMAIL PROTECTED]): header(Cache-control: private); p.s. and also if there is any one wo knows what exactly this header line means, please post a brief decription. thanks. private means that only the intended person that is getting this file is able to cache it. So if you're going through a proxy that proxy must not cache that file. Curt -- I used to think I was indecisive, but now I'm not so sure. -- 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] Session_start() corrupt HTML output with IE
Hi hecchan, I don't have a crear idea on what your problem is, but i have read an article on phpfreak.com, it says to work the sessioned PHP scripts correctly with IE6 you have to insert.. header(Cache-control: private); immediatly after starting the session. try this. Viraj p.s. and also if there is any one wo knows what exactly this header line means, please post a brief decription. thanks. hecchan wrote: Hi, Using IE 6 (XP) i can't see the source generated for PHP even the page works properly (It doesn't happend with Mozilla or Opera). If i comment out the line: session_start() This behaviour stops. Any idea what's going on? Thanks hecchan -- 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] Session_start() corrupt HTML output with IE
* Thus wrote Viraj Kalinga Abayarathna ([EMAIL PROTECTED]): header(Cache-control: private); p.s. and also if there is any one wo knows what exactly this header line means, please post a brief decription. thanks. private means that only the intended person that is getting this file is able to cache it. So if you're going through a proxy that proxy must not cache that file. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start() corrupt HTML output with IE
* Thus wrote hecchan ([EMAIL PROTECTED]): Hi, Using IE 6 (XP) i can't see the source generated for PHP even the page works properly (It doesn't happend with Mozilla or Opera). If i comment out the line: session_start() This behaviour stops. Any idea what's going on? What is your session.cache_limiter ini setting? private, nocache, public? Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session_start
[snip] Not to be nosey or anything but usually session data will always be saved or not. How come one would want to check to see if is was or not. [snip] Maybe I am on the wrong track but the other day I got a disk full error when I was sending some mail... at the same time while my website was working, it wasnt saving session data, so users were getting sent back to the login page instead of going on to use the site. What I was hoping to do was to be able to give a error message if the server was having this problem, but in order to do that I was needing a way of knowing if it was because the session_start failed or users who didnt have cookies turned on. I probably just need to get a new host since these disk full errors happen regularly. :( Mr P. -- __ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
Yeah, get a new host :) J on 27/02/03 11:36 AM, Mr Percival ([EMAIL PROTECTED]) wrote: [snip] Not to be nosey or anything but usually session data will always be saved or not. How come one would want to check to see if is was or not. [snip] Maybe I am on the wrong track but the other day I got a disk full error when I was sending some mail... at the same time while my website was working, it wasnt saving session data, so users were getting sent back to the login page instead of going on to use the site. What I was hoping to do was to be able to give a error message if the server was having this problem, but in order to do that I was needing a way of knowing if it was because the session_start failed or users who didnt have cookies turned on. I probably just need to get a new host since these disk full errors happen regularly. :( Mr P. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session_start
At 01:36 27.02.2003, Mr Percival said: [snip] What I was hoping to do was to be able to give a error message if the server was having this problem, but in order to do that I was needing a way of knowing if it was because the session_start failed or users who didnt have cookies turned on. I probably just need to get a new host since these disk full errors happen regularly. :( [snip] session_start() cannot fail - the failure happens after the end of your influence. Ask these guys at your webhost to move /tmp to another partition, or _at_least_ to have session.save_path point to a partition that doesn't get exhausted too quickly. God. What do these webhosts think... -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session_start
At 01:36 27.02.2003, Mr Percival said: [snip] What I was hoping to do was to be able to give a error message if the server was having this problem, but in order to do that I was needing a way of knowing if it was because the session_start failed or users who didnt have cookies turned on. I probably just need to get a new host since these disk full errors happen regularly. :( [snip] session_start() cannot fail - the failure happens after the end of your influence. Ask these guys at your webhost to move /tmp to another partition, or _at_least_ to have session.save_path point to a partition that doesn't get exhausted too quickly. Or use session_save_path() in your script to use a directory of your own. Make sure you implement your own cleanup, though. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
At 05:52 24.02.2003, Mr Percival said: [snip] According to the PHP manual session_start always returns true. Ther are times (like when there is a disk full error on the server) that the sesison_start will fail because its unable to write the session tmp file. So shouldnt session_start be able to return false if the file write fails? Or does it return false but the manual doesnt say so? [snip] session_start() just prepares for session use: - check for an existing session ID (cookie or request parameter - if found, retrieve stored session data - else generate new session key - check garbage collection (gc_probability) There's nothing that it does to prepare to write the session file, this is done when your script exits. BTW, having a look at the implementation in ext/session/session.c, the function is declared returning void: PHPAPI void php_session_start(TSRMLS_D) The actual return value being stored in register AX (at least on Intel platforms) it is most unlikely that ax contains a zero value. The last statements at function end are: if (PS(mod_data) PS(gc_probability) 0) { int nrdels = -1; nrand = (int) (100.0*php_combined_lcg(TSRMLS_C)); if (nrand PS(gc_probability)) { PS(mod)-gc(PS(mod_data), PS(gc_maxlifetime), nrdels TSRMLS_CC); } } PS(mod_data): returns a pointer to internal data structures, not zero. PS(gc_probability): usually 1. nrand: seldom zero value. Result: Will return false if (and only if) the garbage collector routine (gc) returns false. But anyway this has only academic value since php_session_start() is declared to return void - this should be stated correctly in the manual IMHO. -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
So how do I check if the session write failed? I thought perhaps if(session_id() == ){ echo error; } but if all session_start does is basically assign a session ID then session_id will never be empty even when the write fails. Thanks! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
At 13:36 24.02.2003, Mr Percival said: [snip] So how do I check if the session write failed? I thought perhaps if(session_id() == ){ echo error; } but if all session_start does is basically assign a session ID then session_id will never be empty even when the write fails. [snip] You can't check since session write happens _after_ the execution of your script. You could check if ini_get('session.save_path') is writable, or if you are able to create a temp file with some contents on it, but that won't tell you exactly if session writing will be successful - too many different parameters: - what will the size of your session file be? - after your check, how many session files will be written by other instances until it's your turn? - the complete disk usage may change, since you're in a multi-user multi-session environment... Better: make a check if there's enough space left on the session.save_path, on a regular basis (hint: cron job). Make this job either send you an email, or delete orphaned session files (generate a listing and walk it by last access date). -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session_start
Not to be nosey or anything but usually session data will always be saved or not. How come one would want to check to see if is was or not. -Original Message- From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 7:49 AM To: Mr Percival Cc: [EMAIL PROTECTED] Subject: Re: [PHP] session_start At 13:36 24.02.2003, Mr Percival said: [snip] So how do I check if the session write failed? I thought perhaps if(session_id() == ){ echo error; } but if all session_start does is basically assign a session ID then session_id will never be empty even when the write fails. [snip] You can't check since session write happens _after_ the execution of your script. You could check if ini_get('session.save_path') is writable, or if you are able to create a temp file with some contents on it, but that won't tell you exactly if session writing will be successful - too many different parameters: - what will the size of your session file be? - after your check, how many session files will be written by other instances until it's your turn? - the complete disk usage may change, since you're in a multi-user multi-session environment... Better: make a check if there's enough space left on the session.save_path, on a regular basis (hint: cron job). Make this job either send you an email, or delete orphaned session files (generate a listing and walk it by last access date). -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- 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] session_start
At 20:58 13.02.2001, Dennis Cole spoke out and said: [snip] Not to be nosey or anything but usually session data will always be saved or not. How come one would want to check to see if is was or not. [snip] I didn't ask for this ;- -- O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
Hello Mr Percival [EMAIL PROTECTED] wrote: Hi, According to the PHP manual session_start always returns true. Ther are times (like when there is a disk full error on the server) that the sesison_start will fail because its unable to write the session tmp file. So shouldnt session_start be able to return false if the file write fails? Or does it return false but the manual doesnt say so? -- I haven't had any disk full error experience so I'm not sure but I think what will happen is just php will crash (complain or return an error in other words because your script will stop) instead of returning FALSE which you can check later on... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session_start
The manual is right, session_start should always return true. For example using this code: ?php $sess = session_start(); if ($sess = 1){ echo Session start returned TRUE;} ? PHP is set to save to C:\tmp which does not exist. But, because session data is not saved at the beginning of the page where the session_start is called, but at the end there the script is through executing, the session_start still worked. The saving did not. This script would put out the following: - Warning: open(/tmp\sess_01ef33d269ce2ea08b2b8c8899375152, O_RDWR) failed: m (2) in C:\apache\htdocs\blog\test.php on line 2 *** The above is PHP trying to obtain previous session data which it cannot find. Session start returned TRUE Warning: open(/tmp\sess_01ef33d269ce2ea08b2b8c8899375152, O_RDWR) failed: m (2) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 --- Dennis Cole DCW Productions.us -Original Message- From: Mr Percival [mailto:[EMAIL PROTECTED] Sent: Sunday, February 23, 2003 11:52 PM To: [EMAIL PROTECTED] Subject: [PHP] session_start Hi, According to the PHP manual session_start always returns true. Ther are times (like when there is a disk full error on the server) that the sesison_start will fail because its unable to write the session tmp file. So shouldnt session_start be able to return false if the file write fails? Or does it return false but the manual doesnt say so? -- __ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup -- 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] session_start... twice?
This has to do with how php works with session internaly. $_SESSION is set after the fist call to session_start(), session_destroy() destroys only data that are already stored, the second call to session_start() tries to retrieve these data, but there are none. Use $_SESSION=array() before session_destroy() as the documentation sugests James Taylor wrote: I have a single page site I'm working on that displays the contents of your current session. Users can clear the contents by clicking a link that triggers a $PHP_SELF?clear=1 - Before any headers are sent out, the script checks for $_GET['clear'], and if it's set, it does a session_destroy();. For some reason though, the contents of the session are STILL displayed until you do a refresh on the page. However, for some bizarre reason, if I call session_start() at the very beginning, call session_destroy(); and then session_start() AGAIN after the destroy, it seems to work like it's supposed to. Is this a bug, or is it working properly? Also - I'm sure there's a better method than this - Any suggestions on what that might be? If there are no better methods well... Are there any downsides to what I'm doing? Below is a sample version of the script, to give you an idea of what I mean incase my ramblings above didn't make sense. Thanks!. ?php session_start();// Start the session if (isset($_GET['clear'])) { session_destroy(); // If they chose to clear the session, then we do so } session_start(); // Start it again; it works for whatever reason ? htmlbody (some other stuff) ? /* Here I just print out whatever's in the session. Unless session_start is called the second time after the destroy, a user will have to click refresh before the data appears to be gone */ if (isset($_SESSION['states'])) { foreach ($_SESSION['states'] as $value) { echo $valuebr/\n; } } // and lastly, here's our clear session link below ? a href=index.php?clear=1Clear the session/a /body/html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() -- no more output
On Sun, Sep 22, 2002 at 06:03:50PM -0500, Michael Sims wrote: ?php session_register(bunt); phpinfo(); ? This is just a simple example. The problem is that the script produces no output at all when called with the browser. Is it possible that display_errors is set to Off in your php.ini? THX for the hint! I've looked it up, and display_errors is set to 'on'. But I've just found out that it must be a problem of the browser (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3)! When using lynx, I'm getting output as expected. Hm ... GH -- This mail is copyrighted material and must not be processed by closed-source software. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start() -- no more output
On Mon, 23 Sep 2002 00:54:07 +0200, you wrote: ?php session_register(bunt); phpinfo(); ? This is just a simple example. The problem is that the script produces no output at all when called with the browser. Is it possible that display_errors is set to Off in your php.ini? If this were the case, perhaps a fatal error is occuring when you call the session functions but you aren't seeing it because of the display_errors setting...? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session_start() times and resets?
See session.gc_maxlifetime in php.ini. The session timer is based on the session file access (or modified?) timestamp. It gets reset every time the session data is accessed, which is every time a page using that session is requested. Kirk -Original Message- From: Smileyq [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 11:35 PM To: [EMAIL PROTECTED] Subject: [PHP] session_start() times and resets? I have one question that I've been working about. When you setup a session to last a particular time say 1 week. If the user comes back to that page because the week is over to reset the session does the user then at that time reset the timer to yet another week. I'm trying to figure out a way to set something like this up so that if they choose not to come back for a period of time the session will delete but if they do come back it will just reset for another week . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Session_start()
You must place session_start() before any other /output/. It can come after other code, as long as nothing will be output before it. Alternately, you can turn on output buffering and just not worry about it. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Team GotFusion [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 7:16 AM To: [EMAIL PROTECTED] Subject: [PHP] Session_start() Do I have to place a session_start() function at the top of a page (.php) before the headers? If I am creating a login form with PHP_SELF, can I place the session_start() at any point in the html where the user has been validated and logged in? Thanks, Tami Team GotFusion --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start()
On Thursday, March 7, 2002, at 07:25 PM, Matthew Walker wrote: Do I have to place a session_start() function at the top of a page (.php) before the headers? When they say that you need to put session_start() before the headers, they're referring to the HTTP headers, not the head tag of the HTML document. HTTP headers are information about the document that tell the client what to expect as it receives the document -- this helps the client decide how best to handle the document. For instance, your client (web browser) might be configured to print any text files directly to the screen, but any XML files need to be parsed properly before being printed. Or perhaps you're not even being sent a document, but rather an MP3 or a PDF. Your browser might want to know a bit about the file that it is being served, before it goes ahead and displays the data on the screen -- in the case of an MP3 or PDF, it might wish to open up Windows media Player or Quicktime or Adobe Acrobat as a helper application (assuming your browser has been programmed to do this). You can learn more about HTTP headers here: http://www.jmarshall.com/easy/http/ NB I haven't read it, I just googled that (but I think I will read it later). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session_start() issue??
If you redirect using the full (http://foo.bar/rex...) URL, it may be restarting your session. Try using relative URLs. Hi all, Has anyone seen this. I have a login form (login.htm) which calls a login handler (check_login.php). If the login is sucessfull the check_login.php will set a couple session variables, then redirect the user to a menu page. The problem I am seeing is that when I call session_start() from the menu page, I get a new session reference rather than a reference to the session I started in the check_login.php. Is there a setting in the php.ini I should change? Any thoughts would be greatly appreciated. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session_start() issue??
Also read about session management at http://php.net/session Hi all, Has anyone seen this. I have a login form (login.htm) which calls a login handler (check_login.php). If the login is sucessfull the check_login.php will set a couple session variables, then redirect the user to a menu page. The problem I am seeing is that when I call session_start() from the menu page, I get a new session reference rather than a reference to the session I started in the check_login.php. Is there a setting in the php.ini I should change? Any thoughts would be greatly appreciated. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session_start() issue??
Hi Jim, Thanks for you replies. I was using relative paths and still I got the seperate sessions being opened. The interesting part was this was only happening on my dev machine (win32), when I moved the files to a Linux box, I did not have the same problem. Must be something in the IIS or PHP.INI on the dev box I guess. Thanks again. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start() or session_register() AND cookies
Change the session_name and you can. On Mon, 1 Oct 2001, [iso-8859-1] Augusto Cesar Castoldi wrote: Hi... If I use the session_start or session_register I'll never be able to open two sessions in the same computer in the same time? regards, Augusto ___ Yahoo! GeoCities Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! http://br.geocities.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start() problem
Did you make sure everything below is BEFORE the html tag? Also you can just set the variable $sesionvar like this: $sesionvar = fulanito; instead of $HTTP_SESSION_VARS[sesionvar] = fulanito; lines in the acceso.php file: 27 session_name(primera); 28 session_start(); 29 session_register(sesionvar); 30 $HTTP_SESSION_VARS[sesionvar] = fulanito; what I get in the browser: Warning: Cannot send session cookie - headers already sent by (output started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on line 28 Warning: Cannot send session cache limiter - headers already sent (output started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on line 28 some help please thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start() part II
On Mon, Aug 13, 2001 at 04:57:08PM +0200, Aniceto Lopez wrote: ok, let's have this in the right place in a file named startsesion.php i.e. session_start(); session_name(mysesion); session_register(myvar); $myvar = whatever; a SID is generated autmaticaly I've been trying to echo the values of the var defined and the SID generated in another php file ?php echo ($sesionvar); ? not working ?php echo ($HTTP_SESSION_VARS[myvar] ); ? not working ?php echo ($GLOBALS[$sesionvar]); ? not working ?php echo session_name(); ? not working ?php echo ($PHPSESSID); ? not working how can I get this values? thanks, gracias Did you use session_start() in the file where you try to output data from the session? -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start() part II
On the second page before the html tag write: ? session_name(mysession); session_start(); ? and then go ahead and echo your $myvar; ok, let's have this in the right place in a file named startsesion.php i.e. session_start(); session_name(mysesion); session_register(myvar); $myvar = whatever; a SID is generated autmaticaly I've been trying to echo the values of the var defined and the SID generated in another php file ?php echo ($sesionvar); ? not working ?php echo ($HTTP_SESSION_VARS[myvar] ); ? not working ?php echo ($GLOBALS[$sesionvar]); ? not working ?php echo session_name(); ? not working ?php echo ($PHPSESSID); ? not working how can I get this values? thanks, gracias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start() part III
On Mon, Aug 13, 2001 at 05:39:47PM +0200, Aniceto Lopez wrote: I guess Renze, I have to use session_start() in the file where I want to output data from the session All this questions about session are generated because I want to control the acces to some of the web pages in a site so only accesible to registered visitors. Ok name user and password are stored in a db (mysql), after password verification sesion is started, temporal storage of some values (PHPSESSID i.e.) and I guess in the begining of every restricted page this temporal info shoul be checked to make the page visible or not but if the visitor closes the browser the sesion is over, session_destroy is this necessary? thanks remind me to invite you to have a beer next time you come to barcelona Yes, indeed, you do have to use session_start() on each page you want to use the session-info. And no, you don't need session_destroy() when the user closes the browser. The session is ended automatically then. And btw, how would you detect whether or not someone has closed his browser? Hope this was an answer to your question... -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start() part III
When you named your session by using session_name(mysession) you renamed your session from PHPSESSID to mysession. You do not need to destroy each session when someone closes the browser out. If you do not, the persons session will be stored in a temp folder on the php server and once in awhile php will go in and clean up that directory for you. So as long as the person comes back to the site using the same sessionid number before php cleans up the directory then you'll have access to the same information. If you want access to the same information all the time, use cookies, the majority of people allow cookies so you're pretty safe. I hope that all made sense :) Rick I guess Renze, I have to use session_start() in the file where I want to output data from the session All this questions about session are generated because I want to control the acces to some of the web pages in a site so only accesible to registered visitors. Ok name user and password are stored in a db (mysql), after password verification sesion is started, temporal storage of some values (PHPSESSID i.e.) and I guess in the begining of every restricted page this temporal info shoul be checked to make the page visible or not but if the visitor closes the browser the sesion is over, session_destroy is this necessary? thanks remind me to invite you to have a beer next time you come to barcelona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start ()
You register it just when you want to assign to it a value, ie: page1.php session_start(); session_register(username); $username = shawn; page2.php session_start(); echo Welcome $username; page3.php session_start(); echo Welcome again $username so basically, register once and use session_start() to retreive whatever registered sessions! -elias http://www.eassoft.cjb.net shawn [EMAIL PROTECTED] wrote in message 003001bfb88d$d88bbfc0$[EMAIL PROTECTED]">news:003001bfb88d$d88bbfc0$[EMAIL PROTECTED]... When using session_start () over alot of pages, do i need to reregister the origional session? example: page1:session_start(); session_register('data'); page2:session_start(); page3:session_start(); session_register('data'); new to sessions, (no really), so thanks for the help, ill be going through the manual while I wait :-) Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start
As far as I know, the session fucntions work only with php4 for php3, you might want to take a look at phplib hope that helps Ankur Verma - Original Message - From: "Jacky@lilst" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 08, 2001 2:35 AM Subject: [PHP] session_start People very basic question here, I wanna assign username onto session after the login succeed, I use: session_start(); session_register("username"); $UserNameSession="username"; did not work what is wring with this? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start
At 22:05 07.03.2001, Jacky@lilst said: [snip] People very basic question here, I wanna assign username onto session after the login succeed, I use: session_start(); session_register("username"); $UserNameSession="username"; [snip] session_start(); session_register($UserNameSession); if (!isset($UserNameSession)) $UserNameSession="username"; [snip] I got problem of how to assign session value in php3. As far as I know, all syntax in manual talks about php4 syntax only. How am I going to do that? [snip] do nothing, PHP will assign the value for you. ...ebird O Ernest E. Vogelsinger (\)http://www.1-at-web.at/ ^ ICQ# 13394035 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] session_start
To assign session variables you need to reference them by name: $username = "new_user"; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start
Le Mercredi 7 Mars 2001 22:05, vous avez crit : People very basic question here, I wanna assign username onto session after the login succeed, I use: session_start(); session_register("username"); the syntax for session_register is : session_register("session_names",var_without_quote) and I think you doesnt need this line , it's done automaticlly by PHP $UserNameSession="username"; did not work what is wring with this? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- __ Matthieu LE CORRE SERVICE INFORMATIQUE Ecole Polytechnique de l'Universit de Nantes (EPUN) Site de la Chantrerie Rue Christian Pauc BP 50609 44306 Nantes Cedex 3 02 40 68 32 23 __ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start
Le Mercredi 7 Mars 2001 09:11, vous avez crit : Le Mercredi 7 Mars 2001 22:05, vous avez crit : People very basic question here, I wanna assign username onto session after the login succeed, I use: session_start(); session_register("username"); the syntax for session_register is : session_register("session_names",var_without_quote) and I think you doesnt need this line , it's done automaticlly by PHP $UserNameSession="username"; rectification i was wrong : I didn't see UserName session but username You need this line ! but for session_register I am right ! good luck regards did not work what is wring with this? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- __ Matthieu LE CORRE SERVICE INFORMATIQUE Ecole Polytechnique de l'Universit de Nantes (EPUN) Site de la Chantrerie Rue Christian Pauc BP 50609 44306 Nantes Cedex 3 02 40 68 32 23 __ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start
do we have to use in each page using the data of a session the session-start()? cause in the manual it says that session_start -- Initialize session data and session_start() creates a session ?! thanks You want session_start() at the top of every page that uses session data. It initializes session data to the existing values, and creates a (logical) session for you to work with. It doesn't wipe out your session and make a new one, which is how I think you read it. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start problem
On Fri, 19 Jan 2001, Markus H. Maussner wrote: hi... every time i do a session_start(); with php i get in the first two lines of the output this PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9""Your data Contact LOGOUT PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9""Contact LOGOUT do i do something wrong ? can i put this message somehow off ? everything else work fine.. sessions and so.. just this two lines are a bit disturbing me... markus Are you using quotes in your A tags? -- Ignacio Vazquez-Abrams [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_start() and cache problem ...
The other website does use session_start(). A "HEAD / HTTP/1.0" gives I have the extra lines : Expires, Cache-Control, Pragama. I would like to get rid of those 3 lines : is it possible and how could I achieve that ? Probably by sending your own (blank) headers with those names. ?php header("Expires: "); . . . ? That will quite possibly make the session stuff not work too well with browser caching, however. By Day:|By Night: Don't miss the Zend Web Store's| There's not enough room here... Grand Opening on January 23, 2001! | Start here: http://www.zend.com| http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]