[PHP] Re: Sessions problem bug

2004-10-27 Thread Jason Barnett
Are you using cookie-based sessions?  Thus sayeth the manual:
Note:  When using session cookies, specifying an id for session_id() will always 
send a new cookie when session_start() is called, regardless if the current 
session id is identical to the one being set.

Thanks google.
Reinhart Viane wrote:
Some days ago I asked some questions concerning php and sessions
Apparently it seems to be a bug:
'When you use a session name that has only numbers, each call to
session_start seems to regenerate a new session id, so the session does
not persist.'
http://bugs.php.net/search.php?search_for=sessionboolean=0limit=10ord
er_by=direction=ASCcmd=displaystatus=Openbug_type%5B%5D=Session+rela
tedphp_os=phpver=assign=author_email=bug_age=0
And there you pick bug with ID 27688
Just to let everyone know.
Greetz,
Reinhart Viane

Reinhart Viane 
[EMAIL PROTECTED] 
Domos || D-Studio 
Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01 --
fax +32 15 43 25 26 

STRICTLY PERSONAL AND CONFIDENTIAL 
This message may contain confidential and proprietary material for the
sole use of the intended 
recipient.  Any review or distribution by others is strictly prohibited.
If you are not the intended 
recipient please contact the sender and delete all copies.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Sessions problem bug

2004-10-27 Thread Reinhart Viane
On the server i use:

Session.auto_start is off
Session.use_cookie is on
Session.use_trans_sid is 1

I do not set the session id myself
All pages that requite the sessions have session_start() at the very
first line

-Original Message-
From: Jason Barnett [mailto:[EMAIL PROTECTED] 
Sent: woensdag 27 oktober 2004 11:41
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Sessions problem bug


Are you using cookie-based sessions?  Thus sayeth the manual:

Note:  When using session cookies, specifying an id for session_id()
will always 
send a new cookie when session_start() is called, regardless if the
current 
session id is identical to the one being set.

Thanks google.


Reinhart Viane wrote:
 Some days ago I asked some questions concerning php and sessions
 
 Apparently it seems to be a bug:
 'When you use a session name that has only numbers, each call to 
 session_start seems to regenerate a new session id, so the session 
 does not persist.'
 
 http://bugs.php.net/search.php?search_for=sessionboolean=0limit=10o
 rd

er_by=direction=ASCcmd=displaystatus=Openbug_type%5B%5D=Session+rela
 tedphp_os=phpver=assign=author_email=bug_age=0
 
 And there you pick bug with ID 27688
 
 Just to let everyone know.
 Greetz,
 
 Reinhart Viane
 
 
 
 Reinhart Viane
 [EMAIL PROTECTED] 
 Domos || D-Studio 
 Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01
--
 fax +32 15 43 25 26 
 
 STRICTLY PERSONAL AND CONFIDENTIAL
 This message may contain confidential and proprietary material for the
 sole use of the intended 
 recipient.  Any review or distribution by others is strictly
prohibited.
 If you are not the intended 
 recipient please contact the sender and delete all copies.

-- 
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] Re: Sessions Problem !!

2004-08-06 Thread Chris Martin
Dre wrote:
the exact error messages are

==
Warning: session_start(): open(/tmp\sess_000c30790862f64268e755546b6fcbb2,
O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache
Group\Apache2\htdocs\maillist\maillist\admin.php on line 1
First, if you want to store session data on win32, you'll need to change 
the session.savepath in your php.ini.
open it and search for:
session.save_path
and change it from
session.save_path = /tmp
to
session.save_path = C:\WINDOWS\Temp (Or wherever your temp folder is if 
you're not on XP)

Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at C:\Program Files\Apache
Group\Apache2\htdocs\maillist\maillist\admin.php:1) in C:\Program
Files\Apache Group\Apache2\htdocs\maillist\maillist\admin.php on line 1
This error tells you that the output was started at line 1 of your 
admin.php file. (maybe a blank line at the top of the script?)

As Miles suggested:
You have to call session_start() before any output to the page, even a 
single space.

--
Chris Martin
Web Developer
Open Source  Web Standards Advocate
http://www.chriscodes.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Sessions Problem !!

2004-08-06 Thread Kevin Waterson
This one time, at band camp, Chris Martin [EMAIL PROTECTED] wrote:


  Warning: session_start(): Cannot send session cookie - headers already sent
  by (output started at C:\Program Files\Apache
  Group\Apache2\htdocs\maillist\maillist\admin.php:1) in C:\Program
  Files\Apache Group\Apache2\htdocs\maillist\maillist\admin.php on line 1
 
 This error tells you that the output was started at line 1 of your 
 admin.php file. (maybe a blank line at the top of the script?)
 
 As Miles suggested:
 You have to call session_start() before any output to the page, even a 
 single space.

This error is more likely generated as the headers are being sent from the error
message.

Kevin


-- 
 __  
(_ \ 
 _) )            
|  /  / _  ) / _  | / ___) / _  )
| |  ( (/ / ( ( | |( (___ ( (/ / 
|_|   \) \_||_| \) \)
Kevin Waterson
Port Macquarie, Australia

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Sessions Problem !!

2004-08-06 Thread Dre
Thanks Chris ... problem solved, I'm sorry but these configuration details
is a bit new for me
Originally I'm a C++ programmer and web development is not my major kind of
work

Thanks again



Chris Martin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Dre wrote:

  the exact error messages are
 
 

  ==
 
  Warning: session_start():
open(/tmp\sess_000c30790862f64268e755546b6fcbb2,
  O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache
  Group\Apache2\htdocs\maillist\maillist\admin.php on line 1

 First, if you want to store session data on win32, you'll need to change
 the session.savepath in your php.ini.
 open it and search for:
 session.save_path
 and change it from
 session.save_path = /tmp
 to
 session.save_path = C:\WINDOWS\Temp (Or wherever your temp folder is if
 you're not on XP)

  Warning: session_start(): Cannot send session cookie - headers already
sent
  by (output started at C:\Program Files\Apache
  Group\Apache2\htdocs\maillist\maillist\admin.php:1) in C:\Program
  Files\Apache Group\Apache2\htdocs\maillist\maillist\admin.php on line 1

 This error tells you that the output was started at line 1 of your
 admin.php file. (maybe a blank line at the top of the script?)

 As Miles suggested:
 You have to call session_start() before any output to the page, even a
 single space.

 -- 
 Chris Martin
 Web Developer
 Open Source  Web Standards Advocate
 http://www.chriscodes.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Sessions Problem !!

2004-08-06 Thread Chris Martin
Dre wrote:
Thanks Chris ... problem solved, I'm sorry but these configuration details
is a bit new for me
Originally I'm a C++ programmer and web development is not my major kind of
work
Thanks again
Good.
I think that little tidbit was actually left out of the windows install 
notes, but I could've just overlooked it.

--
Chris Martin
Web Developer
Open Source  Web Standards Advocate
http://www.chriscodes.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Sessions problem

2003-06-10 Thread Cristian MARIN
It's a bit large the concept not working. The code seems OK but I can't tested or 
help you because I can't see what it should do. If I register the my_email by hand it 
will enter to the do_session_crap() ... if not I don't get anything. When you are 
registering the my_email and how do you get the datas ... I need more to help you .



-- 
-
Cristian MARIN
InterAKT Online (www.interakt.ro)
+4021 411 2610 
[EMAIL PROTECTED]

  Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
  Hi,
  Heres the code (very simple stuff) but not working: 

  if(session_is_registered('my_email')){}
   else{
 do_session_crap();
   }


   function do_session_crap()
{
 if(isset($id[0]))
 {$p1=$id[0];
 echo $p1;
 $_SESSION['p1']  = $p1; 
 
 }
 if(isset($id[1]))
 {$p2=$id[1];
 echo $p2;
 $_SESSION['p2']  = $p2;
 }
 if(isset($id[2]))
 {$p3=$id[2];
 $_SESSION['p3']  = $p3;
 }
 if(isset($id[3]))
 {$p4=$id[3];
 $_SESSION['p4']  = $p4;
 }
 if(isset($id[4]))
 {$p5=$id[4];
 $_SESSION['p5']  = $p5;
 }
 else {echo not working;}
  //   header(Location: my.login.php);
 exit;
}

  it always gives me not working
  Any idea why?

  -Ryan

[PHP] Re: Sessions problem

2003-03-10 Thread Dan Phiffer
I believe there's a domain limitation inherent to the way cookies work
(assuming a cookies-based sessions setup), but there may be some way of
circumventing that (can't some ad banner companies track visitors from site
to site?). Seems like a multi-file search and replace should do the trick.
If you're using UltraEdit/BBEdit/Emacs you should be able to update your
links without too much effort.

HTH,
-Dan


David Chamberlin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hey all,

 Some of my users have reported a problem with my site and it's taken a
 while to debug it, but I think I've finally tracked it down.

 If they go to the site as:

 http://www.mysite.org/

 Then it works

 But if they go as:

 http://mysite.org/

 It doesn't.

 I believe it has to do with my use of session variables.  Apparently (I
 didn't know this, but it's obvious from the debugging) that there are
 different session ID's and thus different session variables for the two.
And the problem is (due to sloppy programming on my part ... sigh
 ...) that sometimes I set up the links as a href=/page and
 sometimes I do the explicit a href=http://www.mysite.org/page.  So
 when it goes to the link as www.mysite.org, it registers the variables,
 but then later when it tries to access and it's just mysite.org, the
 variables aren't set.  Lots of confusion ensues.

 Is there any way to unify this, or do I have to go through and fix all
 of the absolute links to be relative?

 Thanks,
 Dave




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [Kopia] [PHP] Re: Sessions problem with FreeBSD 4.3

2002-01-24 Thread Erik Price

 From my understanding, as long as you have a session_start() function 
above the html tag, you can work with variables in the form 
$_SESSION['variableName'] rather than having to use session_register().  
In fact, using session_register() is no longer needed at all.  Use 
$_SESSION['variableName'] the way you would any other variable.


Erik

PS: I'm not speaking definitively, just my own interpretation of the 
manual.



On Wednesday, January 23, 2002, at 07:18  PM, Yasuo Ohgaki wrote:

 Jeff Sheltren wrote:
 What happens if you set register_globals=Off and use
 $_SESSION?


 Thanks for the reply.  I will try changing register_globals to Off.  I 
 am
 not quite sure I know what you mean by using $_SESSION though, could 
 someone
 please explain how that is uesd?

 Session manaul pages are updated. There is enough explanation how to
 use $HTTP_SESSION_VARS/$_SESSION now :)

 -- Yasuo Ohgaki


 -- 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]




[PHP] Re: [Kopia] [PHP] Re: Sessions problem with FreeBSD 4.3

2002-01-23 Thread Yasuo Ohgaki

Jeff Sheltren wrote:
What happens if you set register_globals=Off and use
$_SESSION?


 Thanks for the reply.  I will try changing register_globals to Off.  I am
 not quite sure I know what you mean by using $_SESSION though, could someone
 please explain how that is uesd?
 

Session manaul pages are updated. There is enough explanation how to
use $HTTP_SESSION_VARS/$_SESSION now :)

-- 
Yasuo Ohgaki


-- 
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]