RE: [PHP] RE: [SPAM 6.0] [PHP] Session help!?

2005-07-22 Thread Programmer
I did not specify all versions; older versions worked fine, but I.E.
that shipped with WINXP, before any service packs had these issues.  

J

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 9:04 PM
To: Programmer
Cc: 'Richard Baldwin'; php-general@lists.php.net
Subject: Re: [PHP] RE: [SPAM 6.0] [PHP] Session help!?

On Thu, July 21, 2005 2:21 pm, Programmer said:
 The biggest gotcha that I have ran into concerning sessions is this:

 If your client's browser is I.E. and the domain is named with
 _(underscores), -(dashes), etc.  I.E. discards the session and starts
a
 new one.  I don't know if this is fixed under SP2.

This cannot be true for many versions of IE...

I would have noticed. :-)

Though IE *is* giving me fits on this page:
http://uncommonground.com/artist/

They login okay, but can't get to following pages.

These are users for whom the question: what browser version do you
have?
yields answers like Windows 2000...

Is it that goofy mini privacy policy crap?  Like the bad guys won't just
LIE.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Session help!?

2005-07-21 Thread Richard Baldwin

Hey,

I have a site where I am using session_start() at the beginning of each 
page. The session id is passed transparently from the first page but 
after that it dissapears from the links and I lose all my session variables.


Is there something elementary I'm missing? This is my first stab at PHP 
so I could be overlooking something really obvious or not really 
understanding how its supposed to work.


The trans_id thingy is enabled by the way.

Thanx in advance,
Rich

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



[PHP] RE: [SPAM 6.0] [PHP] Session help!?

2005-07-21 Thread Programmer
The biggest gotcha that I have ran into concerning sessions is this:

If your client's browser is I.E. and the domain is named with
_(underscores), -(dashes), etc.  I.E. discards the session and starts a
new one.  I don't know if this is fixed under SP2.

Example: a domain name http://my-domain.com will cause I.E. to lose
sessions; however, there is a way around this if your are developing
this for an internal website, you can simply add a host file record to
utilize the actual IP.
Example:
http://my-domain.com225.225.225.1

If your client's browser is not I.E. then make sure all of your php.ini
variables are as they need to be regarding sessions.


Hope this helps.


-Original Message-
From: Richard Baldwin [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 10, 2005 3:46 PM
To: php-general@lists.php.net
Subject: [SPAM 6.0] [PHP] Session help!?

Hey,

I have a site where I am using session_start() at the beginning of each 
page. The session id is passed transparently from the first page but 
after that it dissapears from the links and I lose all my session
variables.

Is there something elementary I'm missing? This is my first stab at PHP 
so I could be overlooking something really obvious or not really 
understanding how its supposed to work.

The trans_id thingy is enabled by the way.

Thanx in advance,
Rich

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

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



Re: [PHP] RE: [SPAM 6.0] [PHP] Session help!?

2005-07-21 Thread Richard Lynch
On Thu, July 21, 2005 2:21 pm, Programmer said:
 The biggest gotcha that I have ran into concerning sessions is this:

 If your client's browser is I.E. and the domain is named with
 _(underscores), -(dashes), etc.  I.E. discards the session and starts a
 new one.  I don't know if this is fixed under SP2.

This cannot be true for many versions of IE...

I would have noticed. :-)

Though IE *is* giving me fits on this page:
http://uncommonground.com/artist/

They login okay, but can't get to following pages.

These are users for whom the question: what browser version do you have?
yields answers like Windows 2000...

Is it that goofy mini privacy policy crap?  Like the bad guys won't just LIE.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Session help please?

2004-04-01 Thread Paul
Probably a stupid question.

I figured I could do something like $_SESSION['test'] = 5 and refer to $test
on other pages however I cannot. The reason I thought I could do this is
because I can do $_SESSION['test'] = $_POST['test'] and be able to refer to
just $test on other pages.

Is the correct way to do this to make sure that I have somewhere
session_register['test']


Thanks!

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



Re: [PHP] Session help please?

2004-04-01 Thread Chris Shiflett
--- Paul [EMAIL PROTECTED] wrote:
 I figured I could do something like $_SESSION['test'] = 5 and refer to
 $test on other pages however I cannot. The reason I thought I could do
 this is because I can do $_SESSION['test'] = $_POST['test'] and be able
 to refer to just $test on other pages.

This is because you probably have register_globals enabled, so the value
of test in the user POST request is available to you as both:

$_POST['test']

and

$test

It has nothing to do with you also setting $_SESSION['test'].

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



[PHP] session help

2003-02-28 Thread jay
okay so please help if you can...

a page with a form that submits to itself for verification starts a session if 
its verified and registers the session variables, then header()s on into the 
application... in the application is a logout button that submits to an action 
page that unsets the session vars and destroys the session then header()ing 
back out to the login page... however... no matter what login i try... it 
always saves the session values fromt he first session...

i am having a terrible time killing the session
someone please please help me...

thank you,
jay merritt
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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



RE: [PHP] Session Help

2002-01-30 Thread Kevin Stone

This is such an annoying thing.  And it seems as though no one is
willing to cover it in any manual, book or tutorial.  Apparently the
problem is that PHP sessions automatically set the no-cache header.  So
at the top of each script, after the session_start() function set
header(Cache-Control: public);  That will the trick.  Actually it may
work too well but at least your visitors won't get discouraged by that
annoying message.

--
Kevin Stone
[EMAIL PROTECTED]

 -Original Message-
 From: Michael: Dave II, Electric Boogaloo
[mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 29, 2002 3:47 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Session Help
 
 I'm having a little problem with my sessions on a website I'm
programming
 for.  After a user logs in, if that user follows a link, the variable
 information is being passed correctly, but when they hit Back,
Internet
 Explorer gives a Warning This Page Has Expired error.  Hitting
refresh
 does fix this, but Forward/Back is such a common procedure that I'd
like
 for this to work smoothly.  Could someone tell me what I'm doing wrong
 here?
 
 Thanks in advance.
 
 
 Michael
 
 
 
 --
 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] Session Help

2002-01-29 Thread Michael: Dave II, Electric Boogaloo

I'm having a little problem with my sessions on a website I'm programming
for.  After a user logs in, if that user follows a link, the variable
information is being passed correctly, but when they hit Back, Internet
Explorer gives a Warning This Page Has Expired error.  Hitting refresh
does fix this, but Forward/Back is such a common procedure that I'd like
for this to work smoothly.  Could someone tell me what I'm doing wrong here?

Thanks in advance.


Michael



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

2001-11-30 Thread phantom

I am trying to set my session data to be stored in MySQL so I am using
session_set_save_handler() which sets the six user-level session storage
functions (which I have already defined).

Will session_set_save_handler automatically run the appropiate storage
function when required (like when i say session_register(Variable))
--OR-- do I specifically have to run that function
(mysql_sessions_write(SID,$Value))  from my script when I want to save
info to the session table?

I would appreciate any scripts anyone might have that would illustrate
how this works, the PHP manual and online examples I have found just are
not cutting it.

Thank you.  [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 Help

2001-11-30 Thread Papp Gyozo


PHP automatically calls the appropiate function instead if you.
But consider that the save handler is not called on individual 
session_register functions, only when all output is gone, and 
the whole session - each registered variable - must be saved.

manual
Note: The write handler is not executed until after the output stream is closed. 
Thus, output from debugging statements in the write handler will never be seen in 
the browser. If debugging output is necessary, it is suggested that the debug output 
be written to a file instead. 
/manual

- Original Message - 
From: phantom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 10:10 AM
Subject: [PHP] Session Help


| I am trying to set my session data to be stored in MySQL so I am using
| session_set_save_handler() which sets the six user-level session storage
| functions (which I have already defined).
| 
| Will session_set_save_handler automatically run the appropiate storage
| function when required (like when i say session_register(Variable))
| --OR-- do I specifically have to run that function
| (mysql_sessions_write(SID,$Value))  from my script when I want to save
| info to the session table?
| 
| I would appreciate any scripts anyone might have that would illustrate
| how this works, the PHP manual and online examples I have found just are
| not cutting it.
| 
| Thank you.  [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] Session help

2001-11-14 Thread John Taylor-Johnston

Start at index.html. It goes to postcard.php. When I click on submit in
postcard.php, if I change any of the values in the form, the session
values received in send_mail.php do not change. Anyone have an idea what
I have done wrong now?

http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/index.html.phps

http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/postcard.phps

http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/display_image.phps

http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/send_mail.phps

John


-- 
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] session help (session.gc_probability)

2001-05-08 Thread Jeff Warrington

Hi,

i am using sessions for a web application and was wondering whether it's
possible to set the gc_probablity to  1%. I tried with a value of 0.25
but it appears that the gc callback function still runs at 1%. I figure
that the value is an integer and rounds up the values but if someone
can tell me different..

thanks,
jeff

-- 
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] Session Help for newbie plz

2001-03-21 Thread insight

I am looking for help with session handling.
I have modified Joe Jarosciak`s password script slightly, so that instead of
logging in to d/l files, you login to one or two secure area`s. (depending
on the access level of password used)

How and where can i modify this more, so that a session will be created, and
the logged-in users data will be passed over to the two secure area`s??

e.g. pass the login information to the two secure area pages, so they can
evaluate if the user is allowed to view them or not!



Heres the sript so far:

--- index.php---

html
head
/head
body bgcolor="#FF"
table border="1" width="100%" bgcolor="#00" bordercolor="#00"
cellspacing="0"
  tr
td width="100%"
  p align="center"bfont size="4" color="#FF"Authorized Access
Only/font/b/td
form method="POST" action="secure.php"
  center
  /tr
/table
address align="center"nbsp;/address
address align="center"nbsp;/address
  address align="center"bName:/b/address
  address align="center"nbsp;input type="text" name="PHP_AUTH_USER"
size="20" value=""/address
  address align="center"nbsp;/address
  address align="center"bPassword:/b/address
  address align="center"input type="password" name="PHP_AUTH_PW"
size="20" value=""/address
  p align="center"input type="submit" value="Login" name="B1" input
type="reset" value="Reset" /p
/form
/body
/html

end index.php---






-secure.php-

?php

$auth = false;

if (isset( $PHP_AUTH_USER )  isset($PHP_AUTH_PW)) {

$filename = ("D:\Inetpub\wwwroot\password\vault\passwords.txt");
$fp = fopen( $filename, 'r' );
$file_contents = fread( $fp, filesize( $filename ) );
fclose( $fp );

$lines = explode ( "\n", $file_contents );

foreach ( $lines as $line ) {

list($username,$password,$tc,$fc) = explode(':', $line );
 //  echo 'br';
 //echo $username;
 //echo '   :   ';
 //echo $password;
 //echo 'br';


   if (( $username == "$PHP_AUTH_USER" )  ( $password ==
"$PHP_AUTH_PW" )) {
$auth = true;
break;
}
}
}


// ==Header + IP Checking==
$updated_from=getenv("REMOTE_ADDR");
print ('
div align="center"
  centertable border="1" cellpadding="0" cellspacing="0" width="667"
bgcolor="#00" bordercolor="#00"tr
td width="100%"
  p align="center"font color="#FF" size="0" Connected from (IP): ');

print 'font color="#00"';
print $updated_from;

print '/font/fontfont color="#00" size="0"nbsp;/fontfont
color="#FF"font size="0"nbsp;|
font size="1" Your username -  /font';
print 'font color="#00"';
print $PHP_AUTH_USER;
print '/font/font/fontfont color="#FF"
size="0"nbsp;/fontfont color="#00" size="0"
  /font/p/td/tr/table/centerbr/div';
// ==end - Header + IP Checking==







// ==on support or not===
if (! $auth)
 {
echo 'br You used username: ';
echo $PHP_AUTH_USER;
echo 'br You used password: ';
echo $PHP_AUTH_PW;
echo 'br';
echo 'brcenter';
echo 'br';
echo 'pfont color="#00"bSorry, but this is wrong.
Authorization with right username and password is Required!/b/font/p';
exit;
  }


if (($auth) and ($tc == '1'))
 {
   print 'bfont color="#00" size="1"- You are authorized for access
area 1./font/bbr' ;
 }


if (($auth) and ($fc == '1'))
 {
   print 'bfont color="#00" size="1"- You are authorized for access
area 2./font/bbr' ;
 }


if (($auth) and ($tc == '0'))
 {
   print 'bfont color="#FF" size="1"- You are not authorized for
access area 1./font/bbr' ;
 }


if (($auth) and ($fc == '0'))
 {
   print 'bfont color="#FF" size="1"- You are not authorized for
access area 2./font/bbr' ;
 }
// ==end -- on support or not===





// ==buttons===

if (($auth) and ($tc == '1'))
 {
   print 'a href="access_area1.htm"font face="Arial, Helvetica,
sans-serif"bfont size="4" color="#FF"Area 1/font/b/font
/abr';
 }

if (($auth) and ($fc == '1'))
 {
   print 'a href="access_area2.htm"font face="Arial, Helvetica,
sans-serif"bfont size="4" color="#FF"Area 2/font/b/font
/a';
 }
// ==end buttons===



if ($auth)
 {
echo 'bcenterfont size="1"Thank you. You were authorized with
right username and password!/font/b';
 }

?

---end secure.php-







-access_area1.htm-


html
head
titleAccess Area 1/title
/head

body bgcolor="#FF6600" text="#00"
div align="center"
  table width="40%" border="1" cellspacing="0" cellpadding="0"
bgcolor="#FF" bordercolor="#00"
tr
  td
div align="center"bfont face="Arial, Helvetica, sans-serif"
size="6"Secure
  Area 1/font/b/div
  /td
/tr
  /table
/div

[PHP] Session Help (transparent sid's)

2001-01-11 Thread Jamie Burns

Hello,

Can someone please help?

My ISP has recompiled php with the transparent sid support and now when i try to 
access a certain page for the first time (ie. no cookie yet set) then php is making a 
right mess of my javascript and html (adding speech marks and question marks in 
unwanted places) !

Is there a way to override this behaviour in the ini file, or even in the code?

One of my customers sites is down because of this, and i can find nothing through 
searching 8(

Thanks guys,

Jamie Burns.