Re: [PHP] Session problems with 4.4.5?

2007-02-22 Thread alex handle

On 2/16/07, Jochem Maas [EMAIL PROTECTED] wrote:


Ken Williams wrote:
 Is anyone else having problems with session in 4.4.5?  I'm under apache
 1.3.27 in linux 2.4.34 and all my web sites break under 4.4.5.  As soon
as a
 page tries to register a session variable with session_register apache
will
 segfault.  Has worked perfectly fine for the past 2 years and like 10
 version of PHP 4.4.X.

segfault probably indicates  problem. goto bugs.php.net and file a bug
with
details about your machine and a small reproduce script.

side note: use of session_register() is not recommended - reading the
following
page may help you understand why, help you work around your current
problem and
hopefully get you on the path of using $_SESSION:

http://php.net/session_register


 [EMAIL PROTECTED]


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



Will there be a 4.4.6 release soon?
A lot of users run OsCommerce and i  don't like to run  a unpatched php
4.4.4.

Thanks

Alex


Re: [PHP] Session problems with 4.4.5?

2007-02-22 Thread steve

Yes... I think the test version of it goes out today.

On 2/22/07, alex handle [EMAIL PROTECTED] wrote:

On 2/16/07, Jochem Maas [EMAIL PROTECTED] wrote:

 Ken Williams wrote:
  Is anyone else having problems with session in 4.4.5?  I'm under apache
  1.3.27 in linux 2.4.34 and all my web sites break under 4.4.5.  As soon
 as a
  page tries to register a session variable with session_register apache
 will
  segfault.  Has worked perfectly fine for the past 2 years and like 10
  version of PHP 4.4.X.

 segfault probably indicates  problem. goto bugs.php.net and file a bug
 with
 details about your machine and a small reproduce script.

 side note: use of session_register() is not recommended - reading the
 following
 page may help you understand why, help you work around your current
 problem and
 hopefully get you on the path of using $_SESSION:

 http://php.net/session_register

 
  [EMAIL PROTECTED]
 

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


Will there be a 4.4.6 release soon?
A lot of users run OsCommerce and i  don't like to run  a unpatched php
4.4.4.

Thanks

Alex



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



Re: [PHP] Session problems with 4.4.5?

2007-02-16 Thread Jochem Maas
Ken Williams wrote:
 Is anyone else having problems with session in 4.4.5?  I'm under apache 
 1.3.27 in linux 2.4.34 and all my web sites break under 4.4.5.  As soon as a 
 page tries to register a session variable with session_register apache will 
 segfault.  Has worked perfectly fine for the past 2 years and like 10 
 version of PHP 4.4.X.

segfault probably indicates  problem. goto bugs.php.net and file a bug with
details about your machine and a small reproduce script.

side note: use of session_register() is not recommended - reading the following
page may help you understand why, help you work around your current problem and
hopefully get you on the path of using $_SESSION:

http://php.net/session_register

 
 [EMAIL PROTECTED]
 

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



RE: [PHP] Session problems [SOLVED]

2006-02-22 Thread Dan Parry
Hi all

I didn't get that many replies (thanks to those who did reply :) ) for this,
so now I've figured out the problem I thought I'd share the solution just in
case anyone else has the same issue:

solution
The problem stemmed from the way the return from UPDATE is handled and the
scripts reliance on the mysql_affected_rows() command

If the UPDATE command is executed on a record and no values are altered the
command exits with a value of 0 meaning that the result of
mysql_affected_rows() is false

This occurs on redirects and fast refreshes because the time value hasn't
changed so no values are altered in the row, mysql_affected_rows() is false
and the function continues as no condition is met to return a value... the
following INSERT then causes the problem

The solution was do execute a simple SELECT to get the number of rows for
the session ID and if mysql_affected_rows() evaluated to false but the
number of records is 1 return true
/solution

And there we have it... nearly drove me nuts but I got there in the end

Cheers

Dan
-
Dan Parry
Senior Developer
Virtua Webtech Ltd
http://www.virtuawebtech.co.uk

-Original Message-
From: Dan Parry [mailto:[EMAIL PROTECTED] 
Sent: 16 February 2006 09:51
To: php-general@lists.php.net
Subject: [PHP] Session problems

Hi all

 

I've been getting an error while using a custom session handler utilising a
MySQL database

 

The error I receive is:

 

Duplicate entry 'PHPSESSID_REMOVED' for key 1
Warning: Unknown(): A session is active. You cannot change the session
module's ini settings at this time. in Unknown on line 0

 

I've contacted my hosting company regarding this but currently they don't
seem to know the cause

 

I've Googled but I can't find anything I can use

 

Thanks in advance :-)

 

Dan

 

-

Dan Parry

Senior Developer

Virtua Webtech Ltd

http://www.virtuawebtech.co.uk

 

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



RE: [PHP] Session problems

2006-02-16 Thread Peter Lauri
What is the code that generates this?

-Original Message-
From: Dan Parry[EMAIL PROTECTED]
Sent: 16/02/06 4:50:51 PM
To: php-general@lists.php.netphp-general@lists.php.net
Subject: [PHP] Session problems

Hi all

 

I've been getting an error while using a custom session handler utilising a
MySQL database

 

The error I receive is:

 

Duplicate entry 'PHPSESSID_REMOVED' for key 1
Warning: Unknown(): A session is active. You cannot change the session
module's ini settings at this time. in Unknown on line 0

 

I've contacted my hosting company regarding this but currently they don't
seem to know the cause

 

I've Googled but I can't find anything I can use

 

Thanks in advance :-)

 

Dan

 

-

Dan Parry

Senior Developer

Virtua Webtech Ltd

http://www.virtuawebtech.co.uk

 


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



RE: [PHP] Session problems

2006-02-16 Thread Dan Parry
); 

$session_sql = DELETE FROM  . $this-ses_table 
 .  WHERE ses_time  $ses_life; 
$session_res = @mysql_query ($session_sql, $this-dblink);
if (!$session_res)  $this-localError('c1(ses)',
mysql_error() . ' - SQL: ' . $session_sql . 'br/a href=' . WS_SITE_ROOT
. '?action=buildClick here to build session tables (for database)/a',
__file__, __line__, ERROR_STATUS_FATAL);


if (!$session_res) { 
return FALSE; 
} else { 
return TRUE; 
} 
} 
}
?
-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED] 
Sent: 16 February 2006 12:25
To: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: RE: [PHP] Session problems

What is the code that generates this?

-Original Message-
From: Dan Parry[EMAIL PROTECTED]
Sent: 16/02/06 4:50:51 PM
To: php-general@lists.php.netphp-general@lists.php.net
Subject: [PHP] Session problems

Hi all

 

I've been getting an error while using a custom session handler
utilising a
MySQL database

 

The error I receive is:

 

Duplicate entry 'PHPSESSID_REMOVED' for key 1
Warning: Unknown(): A session is active. You cannot change the session
module's ini settings at this time. in Unknown on line 0

 

I've contacted my hosting company regarding this but currently they
don't
seem to know the cause

 

I've Googled but I can't find anything I can use

 

Thanks in advance :-)

 

Dan

 

-

Dan Parry

Senior Developer

Virtua Webtech Ltd

http://www.virtuawebtech.co.uk

 


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

2006-02-16 Thread Curt Zirzow
On Thu, Feb 16, 2006 at 12:37:14PM -, Dan Parry wrote:
 Here is the complete code from the class... it's just a modified version of
 that available from an article on the Zend site
 
 ?
 
 $ses_class = new session();
   ini_set(session.save_handler, user);

You dont need to do this. session_set_save_handler() worries (if at
all) about that.

Curt.
-- 
cat .signature: No such file or directory

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



Re: [PHP] Session problems

2006-02-16 Thread Richard Lynch
On Thu, February 16, 2006 3:50 am, Dan Parry wrote:
 I've been getting an error while using a custom session handler
 utilising a
 MySQL database

 The error I receive is:

 Duplicate entry 'PHPSESSID_REMOVED' for key 1

Looks like your Session ID that you are trying to insert into the
database in your session_start_handler function is a duplicate of an
existing session.

 Warning: Unknown(): A session is active. You cannot change the session
 module's ini settings at this time. in Unknown on line 0

This to me sounds like you have php.ini setting sessions to 'file' and
then you try to change it in, say, .htaccess but php.ini has
session.auto_start turned on, so you've already got an active 'file'
session going, and PHP ain't gonna let you change horses in mid-stream
to 'user' sessions...

Just a Wild Guess.

If you have .htaccess changing the session to 'user', try turning off
session.auto_start as well, and it may fix it.

You may also have to remove all cookies from your browser (and all
user's browsers) to clear out all old session data...

Or, perhaps, you could get away with changing the session ID name of
the Cookie, which might resolve the situation enough that the old
session data hanging around is a non-issue.

 I've contacted my hosting company regarding this but currently they
 don't
 seem to know the cause

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



RE: [PHP] Session problems

2006-02-16 Thread Chrome
Hi

I've checked the PHP ini and session.auto_start is off (0)

[snip]
Looks like your Session ID that you are trying to insert into the
database in your session_start_handler function is a duplicate of an
existing session.
[/snip]

It IS the existing session... I've verified this by being the only person
that knows where the site is :) (and matching IDs in the DB, natch)

This has stumped my hosting company as well as me

Successful conclusion rewards a night out :)

http://chrome.me.uk/snippets/  to view the issue (may need a few
refreshes)

Use admin/admin to log in on this site (it's in dev :) )

Ooo at this point I should mention I'm replying to this from my home
address, not work (yeah, I have no life...)

Thanks all

Dan
 
---
http://chrome.me.uk
 
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: 16 February 2006 21:26
To: Dan Parry
Cc: php-general@lists.php.net
Subject: Re: [PHP] Session problems

On Thu, February 16, 2006 3:50 am, Dan Parry wrote:
 I've been getting an error while using a custom session handler
 utilising a
 MySQL database

 The error I receive is:

 Duplicate entry 'PHPSESSID_REMOVED' for key 1

Looks like your Session ID that you are trying to insert into the
database in your session_start_handler function is a duplicate of an
existing session.

 Warning: Unknown(): A session is active. You cannot change the session
 module's ini settings at this time. in Unknown on line 0

This to me sounds like you have php.ini setting sessions to 'file' and
then you try to change it in, say, .htaccess but php.ini has
session.auto_start turned on, so you've already got an active 'file'
session going, and PHP ain't gonna let you change horses in mid-stream
to 'user' sessions...

Just a Wild Guess.

If you have .htaccess changing the session to 'user', try turning off
session.auto_start as well, and it may fix it.

You may also have to remove all cookies from your browser (and all
user's browsers) to clear out all old session data...

Or, perhaps, you could get away with changing the session ID name of
the Cookie, which might resolve the situation enough that the old
session data hanging around is a non-issue.

 I've contacted my hosting company regarding this but currently they
 don't
 seem to know the cause

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


__ NOD32 1.1412 (20060216) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com

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



Re: [PHP] Session problems

2005-07-13 Thread Richard Lynch


Don't use session_register()

It was only needed way back when in PHP3 (?)

Simplify your test until it works -- Then start adding the other stuff in.

Are you *SURE* you are calling session_start() on the page that gets the
POST?

I think you need to call session_name() *BEFORE* session_start() but I
could be wrong about that...

What may be happening is PHP uses the default name to set your cookie to
start with, then you change the session_name() but it's too late, the
cookie already was set.

If you reverse the order in another page, the other page looks for a
cookie name that doesn't exist.

Re-configure your browser to display all the cookies you get.

On Tue, July 12, 2005 6:54 am, Jason said:
 I am having a problem with sessions.  For some reason it keeps creating
 a new session for every page link you click and not using the original
 session created when session_start() gets called.  Below is the code I
 am testing with.

 [one.php]
 ?php

 $SessionID = md5( uniqid( rand () ) );

 session_start();

 if( ( !session_is_registered( 'hash' ) ) || ( $_SESSION['hash'] !=
 $_SESSION['chkhash'] ) ) {
   session_name( 'prostarinventory' );
  session_register( 'hash' );
   session_register( 'chkhash' );
  session_register( 'count' );
   $_SESSION['hash'] = $SessionID;
   $_SESSION['chkhash'] = $SessionID;
   $_SESSION['count'] = 1;
 } else {
  $_SESSION['count']++;
 }

 print_r( $_SESSION );

 ?
 [/one.php]
 [test1.php]
 ?PHP
 include 'one.php';
 print_r( $_SESSION );
 ?
 form action=test.php method=postinput name=test
 type=textinput name= type=submit/form
 [/test1.php]

 [test.php]
 ?php
 include 'one.php';
 echo SESSIONS: ;
 print_r( $_SESSION );
 echo BRPOSTS: ;
 print_r( $_POST );
 echo BRGETS: ;
 print_r( $_GET );
 ?
 [/test.php]

 Any help is appreciated, so far I have found that if I use the
 include_once 'one.php'; and simply refresh the page sessions work fine,
 but if you call the test1.php then submit the form the session variables
 aren't found in the old session and a new one is being created on the
 server.

 --
 Jason G.

 In my opinion anyone
  interested in improving
  themselves should not
  rule out becoming pure
  energy.
 ~Jack Handley,
  The New Mexican, 1988.

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




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



Re: [PHP] Session problems

2005-07-13 Thread Ahmed Saad
On 7/13/05, Richard Lynch [EMAIL PROTECTED] wrote:
 I think you need to call session_name() *BEFORE* session_start() but I
 could be wrong about that...

totally right! in the php manual,

The session name is reset to the default value stored in session.name
at request startup time. Thus, you need to call session_name()  for
every request (and before session_start()  or session_register() are
called).

-ahmed

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



Re: [PHP] Session problems under heavy load???

2004-08-07 Thread Torsten Roehr
Ed Lazor [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I ran into this last month.  It was a problem with the ISP's server.  They
 were load balancing between different machines and PHP / Apache was having
 trouble accessing session files.

Storing the session data in a database might solve this problem.

Regards, Torsten Roehr


  -Original Message-
  From: BOOT [mailto:[EMAIL PROTECTED]
  Sent: Friday, August 06, 2004 1:26 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Session problems under heavy load???
 
  My server was under a heavy load (rebuilding software raid 1 array) and
my
  PHP+MySQL site seemed to be all messed up. From what I can makeout
  session
  variables were being lost. I would expect simply degraded performance
but
  not the loss of variables. Is this normal? LOL the array is still
  rebuilding
  right now and the alternative problem means something happened to my
code
  (yes I have backups :))
 
  Thanks for any comments!
 

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



RE: [PHP] Session problems under heavy load???

2004-08-06 Thread Ed Lazor
I ran into this last month.  It was a problem with the ISP's server.  They
were load balancing between different machines and PHP / Apache was having
trouble accessing session files.

 -Original Message-
 From: BOOT [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 06, 2004 1:26 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Session problems under heavy load???
 
 My server was under a heavy load (rebuilding software raid 1 array) and my
 PHP+MySQL site seemed to be all messed up. From what I can makeout
 session
 variables were being lost. I would expect simply degraded performance but
 not the loss of variables. Is this normal? LOL the array is still
 rebuilding
 right now and the alternative problem means something happened to my code
 (yes I have backups :))
 
 Thanks for any comments!
 

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



Re: [PHP] Session problems...

2004-03-19 Thread John W. Holmes
From: Eric Gorr [EMAIL PROTECTED]

 When I visit test1.php with the url:
 http://domainpath/test1.php?name=billpwd=henry

 I see the output:

 user = 'bill'
 ID= 41699d4461e8fe3a71243bb3cb1c2298'
 You were remembered and are now being redirected to the home page. If
 this fails for some reason (and if you are seeing this, it probably
 has), please click here: To Home Page

 However, upon redirection to test2.php, I see:
 ''
 31e2cab461dc525ea9a8c22e5d997db5

 The session ID appears to have changed. Any idea why?

 'window.location=\http://www.ericgorr.net/advciv/test2.php\;', 5000

If I go to test1.php at the above URL, I'm redirected to test2.php and
my name is remembered. If it's not working for you, then the session
cookie must not be getting set correctly or your browser is not accepting
cookies.

You can try passing the session id in the URL.

'window.location=\http://www.ericgorr.net/advciv/test2.php?; .
session_name() . '=' . session_id() . \', 5000

or

'window.location=\http://www.ericgorr.net/advciv/test2.php?; . SID . \',
5000

---John Holmes...

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



Re: [PHP] Session problems...

2004-03-19 Thread Eric Gorr
At 1:58 PM -0500 3/19/04, John W. Holmes wrote:
From: Eric Gorr [EMAIL PROTECTED]

 When I visit test1.php with the url:
 http://domainpath/test1.php?name=billpwd=henry
 I see the output:

 user = 'bill'
 ID= 41699d4461e8fe3a71243bb3cb1c2298'
 You were remembered and are now being redirected to the home page. If
 this fails for some reason (and if you are seeing this, it probably
 has), please click here: To Home Page
 However, upon redirection to test2.php, I see:
 ''
 31e2cab461dc525ea9a8c22e5d997db5
 The session ID appears to have changed. Any idea why?

 'window.location=\http://www.ericgorr.net/advciv/test2.php\;', 5000
If I go to test1.php at the above URL, I'm redirected to test2.php and
my name is remembered. If it's not working for you, then the session
cookie must not be getting set correctly or your browser is not accepting
cookies.
Was the session id the same?

I am using Mozilla 1.7a and can use the 'Manage Stored Cookies' 
feature to see that it is accepting the cookie. The cookies contains 
the correct session id, displayed from test1.php. When I get to 
test2.php, the session id is different.

Again, I can use sessions without any problems in other situations 
with my site, so I do not believe there is a problem with my browser 
accepting cookies.

Do you have any other ideas?

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


Re: [PHP] Session problems...

2004-03-19 Thread Eric Gorr
Ah HA! I knew I wasn't crazy...well, pretty sure... ;-)

I figured out why my sessions were behaving so oddly.

I was accessing test1.php via:

  http://ericgorr.net/...

In test1.php, I was then redirecting to test2.php via

  http://www.ericgorr.net/...

Apparently, with Mozilla and Safari, php sessions sees these as two 
different domains and therefore cannot resume the session since the 
session IDs are stored under two different domains. (ok, poor wording 
here...feel free to make it more accurate)

However, with Internet Explorer is apparently a bit more lenient in 
these matters and I never got a failure.

So, I can change the redirection to:

  http://ericgorr.net/...

or I can visited test1.php via:

  http://www.ericgorr.net/...

and things will work.

Now, to solve the problem in the general case, it would seem 
necessary to pass the session id around. However, I am hoping that 
someone can suggest a better solution.

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


Re: [PHP] Session Problems with 4.3.2

2003-07-22 Thread Joe Sheehan
(Power went out in my area for the last four hours)
Thanks for all the feedback.
Anyway, just to make sure my scripts etc were correct I
threw 4.2 back in using the same ini that I was with 4.3.2
No problems with 4.2 but 4.3.2 doesn't work. Page1.php works
properly by creating the session file with the value but page2.php
acts as if it needs to create one as well but the file has zero size.
I'm curious if it has to do with how 4.3.2 now builds.

I use
./configure
--prefix=/ext
--without-pear
--with-mysql
--enable-sockets
--enable-memory-limit
--with-gnu-ld
--with-pgsql=/usr/include/pgsql
when I built 4.0.6, 4.2 and 4.3.2. What is interesting is for 4.3 it does 
not build the php daemon
within the main directory. I'm curious if I'm missing sometype of config 
option thats throwing this off.
Could that be my problem? haven't had a problem with 4.0.6 or 4.2
Which daemon in 4.3 is the correct one which is the standalone
similar to 4.2 and 4.0.6. I hope its just a user error at this point.

Thanks




From: Evan Nemerson [EMAIL PROTECTED]
To: Joe Sheehan [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Session Problems with 4.3.2
Date: Tue, 22 Jul 2003 13:10:40 -0700
Try appending ?php echo SID; ? to the url (perhaps cookies are off in
browser)
If that doesn't work, try the example at php.net/session



On Tuesday 22 July 2003 11:49 am, you wrote:
 It echo No. Have no idea why its not set?
 Even tried using session_register with register_globals on
 but no luck either.
 Anyone have any idea what i'm doing wrong? I'm hoping its just
 a user error.
 Thanks in advance



 From: Evan Nemerson [EMAIL PROTECTED]

 To: Joe Sheehan [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: [PHP] Session Problems with 4.3.2
 Date: Tue, 22 Jul 2003 10:01:03 -0700
 
 Were you planning on incrementing $_SESSION['count'] anywhere? If not, 
try
 
 ?php isset($_SESSION['count']) ? echo Yes.\n : echo No.\n; ?
 
 On Tuesday 22 July 2003 09:55 am, Joe Sheehan wrote:
   Just noticed my email was messed up because of the html. Sorry
   about that
  
   I've been using up until a day or so ago version 4.0.6.
   I'm moving everything now to 4.3.2 but
   having problems with sessions. I've tried a basic example
   but can't retrieve session values.
   Can anyone tell me what I'm doing wrong? I see the session file
   is created but can't retrieve its value. What is interesting
   is the script I go to in order to retrieve my value also created
   a file but it's empty. Thanks in advance.
  
   php example
  
   ?php
   $title=SESSION_TEST_SESSION_ONE;
 session_start();
 $_SESSION['count'] = 15;
  
   ?
  
   //head
   //title? echo $title; ?/title
   //h3? echo $count; ?/h3
   ///head
   //body
   //? echo $_SESSION['count']; ?
   //? echo   ; ?
   //a href=session_next.phpsession_next/abr
   ///body
  
  
   *session_next.php
   #!/bin/php
  
   ?php
   $title=SESSION_NEXT;
 session_start();
   ?
  
   //head
   //title? echo($title); ?/title
   //head
   //body
   //? echo ; ?
   //h3? echo $_SESSION['count']; ?/h3
   ///body
  
   _
   MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
   http://join.msn.com/?page=features/virus
 
 --
 Everything has a natural explanation. The moon is not a god but a 
great
 rock
 and the sun a hot rock.
 
 -Anaxagorus
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 _
 The new MSN 8: advanced junk mail protection and 2 months FREE*
 http://join.msn.com/?page=features/junkmail

--
If one were to take the bible seriously one would go mad. But to take the
bible seriously, one must be already mad.
-Aleister Crowley

_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: [PHP] Session Problems with 4.3.2

2003-07-22 Thread Evan Nemerson
Were you planning on incrementing $_SESSION['count'] anywhere? If not, try

?php isset($_SESSION['count']) ? echo Yes.\n : echo No.\n; ?





On Tuesday 22 July 2003 09:55 am, Joe Sheehan wrote:
 Just noticed my email was messed up because of the html. Sorry
 about that

 I've been using up until a day or so ago version 4.0.6.
 I'm moving everything now to 4.3.2 but
 having problems with sessions. I've tried a basic example
 but can't retrieve session values.
 Can anyone tell me what I'm doing wrong? I see the session file
 is created but can't retrieve its value. What is interesting
 is the script I go to in order to retrieve my value also created
 a file but it's empty. Thanks in advance.

 php example

 ?php
 $title=SESSION_TEST_SESSION_ONE;
   session_start();
   $_SESSION['count'] = 15;

 ?

 //head
 //title? echo $title; ?/title
 //h3? echo $count; ?/h3
 ///head
 //body
 //? echo $_SESSION['count']; ?
 //? echo   ; ?
 //a href=session_next.phpsession_next/abr
 ///body


 *session_next.php
 #!/bin/php

 ?php
 $title=SESSION_NEXT;
   session_start();
 ?

 //head
 //title? echo($title); ?/title
 //head
 //body
 //? echo ; ?
 //h3? echo $_SESSION['count']; ?/h3
 ///body

 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
 http://join.msn.com/?page=features/virus

-- 
Everything has a natural explanation. The moon is not a god but a great rock 
and the sun a hot rock.

-Anaxagorus


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



Re: [PHP] Session Problems with 4.3.2

2003-07-22 Thread Joe Sheehan
No, basically I'm just trying to make sure sessions are working properly. 
I'm just setting a session variable (which works fine)
and trying to retrieve it within another script which doesn't work.
No value is printed out.

thanks

From: Evan Nemerson [EMAIL PROTECTED]
To: Joe Sheehan [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Session Problems with 4.3.2
Date: Tue, 22 Jul 2003 10:01:03 -0700
Were you planning on incrementing $_SESSION['count'] anywhere? If not, try

?php isset($_SESSION['count']) ? echo Yes.\n : echo No.\n; ?





On Tuesday 22 July 2003 09:55 am, Joe Sheehan wrote:
 Just noticed my email was messed up because of the html. Sorry
 about that

 I've been using up until a day or so ago version 4.0.6.
 I'm moving everything now to 4.3.2 but
 having problems with sessions. I've tried a basic example
 but can't retrieve session values.
 Can anyone tell me what I'm doing wrong? I see the session file
 is created but can't retrieve its value. What is interesting
 is the script I go to in order to retrieve my value also created
 a file but it's empty. Thanks in advance.

 php example

 ?php
 $title=SESSION_TEST_SESSION_ONE;
   session_start();
   $_SESSION['count'] = 15;

 ?

 //head
 //title? echo $title; ?/title
 //h3? echo $count; ?/h3
 ///head
 //body
 //? echo $_SESSION['count']; ?
 //? echo   ; ?
 //a href=session_next.phpsession_next/abr
 ///body


 *session_next.php
 #!/bin/php

 ?php
 $title=SESSION_NEXT;
   session_start();
 ?

 //head
 //title? echo($title); ?/title
 //head
 //body
 //? echo ; ?
 //h3? echo $_SESSION['count']; ?/h3
 ///body

 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
 http://join.msn.com/?page=features/virus
--
Everything has a natural explanation. The moon is not a god but a great 
rock
and the sun a hot rock.

-Anaxagorus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


Re: [PHP] Session Problems with 4.3.2

2003-07-22 Thread Joe Sheehan
It echo No. Have no idea why its not set?
Even tried using session_register with register_globals on
but no luck either.
Anyone have any idea what i'm doing wrong? I'm hoping its just
a user error.
Thanks in advance


From: Evan Nemerson [EMAIL PROTECTED]
To: Joe Sheehan [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Session Problems with 4.3.2
Date: Tue, 22 Jul 2003 10:01:03 -0700
Were you planning on incrementing $_SESSION['count'] anywhere? If not, try

?php isset($_SESSION['count']) ? echo Yes.\n : echo No.\n; ?





On Tuesday 22 July 2003 09:55 am, Joe Sheehan wrote:
 Just noticed my email was messed up because of the html. Sorry
 about that

 I've been using up until a day or so ago version 4.0.6.
 I'm moving everything now to 4.3.2 but
 having problems with sessions. I've tried a basic example
 but can't retrieve session values.
 Can anyone tell me what I'm doing wrong? I see the session file
 is created but can't retrieve its value. What is interesting
 is the script I go to in order to retrieve my value also created
 a file but it's empty. Thanks in advance.

 php example

 ?php
 $title=SESSION_TEST_SESSION_ONE;
   session_start();
   $_SESSION['count'] = 15;

 ?

 //head
 //title? echo $title; ?/title
 //h3? echo $count; ?/h3
 ///head
 //body
 //? echo $_SESSION['count']; ?
 //? echo   ; ?
 //a href=session_next.phpsession_next/abr
 ///body


 *session_next.php
 #!/bin/php

 ?php
 $title=SESSION_NEXT;
   session_start();
 ?

 //head
 //title? echo($title); ?/title
 //head
 //body
 //? echo ; ?
 //h3? echo $_SESSION['count']; ?/h3
 ///body

 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
 http://join.msn.com/?page=features/virus
--
Everything has a natural explanation. The moon is not a god but a great 
rock
and the sun a hot rock.

-Anaxagorus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: [PHP] Session Problems with 4.3.2

2003-07-22 Thread Curt Zirzow
* Thus wrote Joe Sheehan ([EMAIL PROTECTED]):
 It echo No. Have no idea why its not set?
 Even tried using session_register with register_globals on
 but no luck either.
 Anyone have any idea what i'm doing wrong? I'm hoping its just
 a user error.

Are you using cookie based sessions? And if yes is your browser
accepting the cookie?

 Thanks in advance

HTH,

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 Problems with 4.3.2

2003-07-22 Thread Evan Nemerson
Try appending ?php echo SID; ? to the url (perhaps cookies are off in 
browser)

If that doesn't work, try the example at php.net/session



On Tuesday 22 July 2003 11:49 am, you wrote:
 It echo No. Have no idea why its not set?
 Even tried using session_register with register_globals on
 but no luck either.
 Anyone have any idea what i'm doing wrong? I'm hoping its just
 a user error.
 Thanks in advance



 From: Evan Nemerson [EMAIL PROTECTED]

 To: Joe Sheehan [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: [PHP] Session Problems with 4.3.2
 Date: Tue, 22 Jul 2003 10:01:03 -0700
 
 Were you planning on incrementing $_SESSION['count'] anywhere? If not, try
 
 ?php isset($_SESSION['count']) ? echo Yes.\n : echo No.\n; ?
 
 On Tuesday 22 July 2003 09:55 am, Joe Sheehan wrote:
   Just noticed my email was messed up because of the html. Sorry
   about that
  
   I've been using up until a day or so ago version 4.0.6.
   I'm moving everything now to 4.3.2 but
   having problems with sessions. I've tried a basic example
   but can't retrieve session values.
   Can anyone tell me what I'm doing wrong? I see the session file
   is created but can't retrieve its value. What is interesting
   is the script I go to in order to retrieve my value also created
   a file but it's empty. Thanks in advance.
  
   php example
  
   ?php
   $title=SESSION_TEST_SESSION_ONE;
 session_start();
 $_SESSION['count'] = 15;
  
   ?
  
   //head
   //title? echo $title; ?/title
   //h3? echo $count; ?/h3
   ///head
   //body
   //? echo $_SESSION['count']; ?
   //? echo   ; ?
   //a href=session_next.phpsession_next/abr
   ///body
  
  
   *session_next.php
   #!/bin/php
  
   ?php
   $title=SESSION_NEXT;
 session_start();
   ?
  
   //head
   //title? echo($title); ?/title
   //head
   //body
   //? echo ; ?
   //h3? echo $_SESSION['count']; ?/h3
   ///body
  
   _
   MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
   http://join.msn.com/?page=features/virus
 
 --
 Everything has a natural explanation. The moon is not a god but a great
 rock
 and the sun a hot rock.
 
 -Anaxagorus
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 _
 The new MSN 8: advanced junk mail protection and 2 months FREE*
 http://join.msn.com/?page=features/junkmail

-- 
If one were to take the bible seriously one would go mad. But to take the 
bible seriously, one must be already mad.

-Aleister Crowley


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



Re: [PHP] session problems in php 4.3.2

2003-07-10 Thread Jason Wong
On Thursday 10 July 2003 18:26, Tassos T wrote:

 I have a problem with php 4.3.2.
 I have a php code and i used sessions, that code works properly in php
 4.3.0 and now after upgrade php to 4.3.2 version not work.

 Any ideas about this.

- Read the release notes
- Read the change log
- Compare php.ini

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
I've got an IDEA!!  Why don't I STARE at you so HARD, you forget your
SOCIAL SECURITY NUMBER!!
*/


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



Re: [PHP] session problems again

2002-11-28 Thread Marek Kilimajer
Check your session files (usually in /tmp) if they are what they are 
supposed to be

Jason Romero wrote:

--when using session registered variables
--i can only get them to save as session variables for one page
--then on the next page they are gone
--far as i can tell the variables are not getting written over or unset
--and the session is not gettting destroyed
--any other ideas what it might be?

i tried the seggestions you guys had
and i came up with one more question
does the session cookie.cookie_lifetime have anything to do with the amount
of time that session variables can be stored
the session.use_cookies is on and register.globals is turned on
however session.cookie_lifetime is set to 0
so would this affect the session variable lifetime?




 



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




RE: [PHP] session problems again

2002-11-27 Thread Rich Gray
Jason

session.cookie_lifetime set to 0 means the session cookie persists until the
client browser is closed...

I'm not clear if you are still having session problems now or the advice you
got earlier sorted it?

Rich
-Original Message-
From: Jason Romero [mailto:[EMAIL PROTECTED]]
Sent: 27 November 2002 15:09
To: [EMAIL PROTECTED]
Subject: [PHP] session problems again


--when using session registered variables
--i can only get them to save as session variables for one page
--then on the next page they are gone
--far as i can tell the variables are not getting written over or unset
--and the session is not gettting destroyed
--any other ideas what it might be?

i tried the seggestions you guys had
and i came up with one more question
does the session cookie.cookie_lifetime have anything to do with the amount
of time that session variables can be stored
the session.use_cookies is on and register.globals is turned on
however session.cookie_lifetime is set to 0
so would this affect the session variable lifetime?




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

2002-11-26 Thread John W. Holmes
 when using session registered variables
 i can only get them to save as session variables for one page
 then on the next page they are gone
 far as i can tell the variables are not getting written over or unset
 and the session is not gettting destroyed
 any other ideas what it might be?

Do you have session_start() on the second page?

---John Holmes...



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




Re: [PHP] Session problems: Warning: write failed: Disk quota exceeded

2002-08-21 Thread Bob Irwin

G'day,

Most likely they haven't pointed it to the right place (or maybe
permissions?  Doubt it would give this error for that).

Session information is usually stored in /tmp on the hosting server (and on
unix servers /tmp is actually a disk partition with a set size).

There are a lot of applications on a hosting server that might use /tmp to
store temporary files, so I suppose it is possible that something has filled
/tmp up and PHP simply can't write to it because there is no where to write
to!

Call your host is my advice.

Best Regards
Bob Irwin
Server Admin  Web Programmer
Planet Netcom
- Original Message -
From: Beau Hartshorne [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Thursday, August 22, 2002 12:24 PM
Subject: [PHP] Session problems: Warning: write failed: Disk quota
exceeded


 Hi,

 Recently, my php app has started to throw these warnings:

 Warning: write failed: Disk quota exceeded (122) 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

 I narrowed it down to this code:

 ?php
 session_start();
 session_register('anything');
 ?

 (A test file containing only that will throw those two warnings.)

 The php version is 4.2.2. This script is running in a shared hosting
 environment. My guess is that the ISP has misconfigured php, and has not
 set the appropriate permissions to the /tmp directory.

 Does this make sense? Or is there something that I've missed?

 Thank you,

 Beau



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


 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/

 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/


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




Re: [PHP] Session problems with popup window

2002-07-08 Thread Jim lucas

pass the user id to the page as a url variable.  maybe set a unique cookie
name for that value that won't get destroyed when the person logs out.

Jim Lucas
- Original Message -
From: Michael Champagne [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 8:18 AM
Subject: [PHP] Session problems with popup window


 I can't seem to find an elegant solution to this and was hoping you guys
could
 offer some insight.

 We are using sessions on our webpage and one of the links on our main
page,
 launches a separate popup window which has some PHP on it and contains
some
 java applets which launch our web-based trading application.  The thing is
 that part of this page requires that we have the user ID for a database
lookup
 which is part of the user's session data.  Basically, it lets the user
refresh
 a directory to see if a file is there and available for download.  If the
user
 logs out in the main window, we lose this session data and the user ID and
the
 page chokes because it cannot find the user directory because we've lost
the
 user ID.

 Does anyone have any ideas how we can get around this?  Thanks in advance
for
 any replies -- this mailing list has been a huge help for us.

 --
 Michael Champagne, Software Engineer
 Capital Institutional Services, Inc.
 wk: [EMAIL PROTECTED]
 hm: [EMAIL PROTECTED]



 **
 This communication is for informational purposes only.  It is not
 intended as an offer or solicitation for the purchase or sale of
 any financial instrument or as an official confirmation of any
 transaction, unless specifically agreed otherwise.  All market
 prices, data and other information are not warranted as to
 completeness or accuracy and are subject to change without
 notice.  Any comments or statements made herein do not
 necessarily reflect the views or opinions of Capital Institutional
 Services, Inc.  Capital Institutional Services, Inc. accepts no
 liability for any errors or omissions arising as a result of
 transmission.  Use of this communication by other than intended
 recipients is prohibited.
 **

 --
 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 problems based on browser?

2002-06-18 Thread Chris Shiflett

I'm not sure if this might be related to the problem you're having, but 
Internet Explorer has a long history of poor cookie implementation, from 
the browser allowing anyone to read cookies from any site (versions 4.0 
- 6.0) to the browser not sending the cookie information in subsequent 
requests as it should (version 5.5 - maybe others).

In particular, there is an IE bug related to use of the Location 
header that causes some versions of IE to forget the cookies in the 
next request. Basically, when the server responds with a 304 and 
includes the Location header, the browser is supposed to submit a GET 
request for the URL specified in that header for the content. It is in 
this request that IE might be failing to include the cookie information.

If this sounds remotely similar to your problem (you have some code that 
looks something like header(Location: ...) in part of the transactions 
that fail), try to use a relative URL in the header rather than the full 
URL. This violates the standard, but it has been known to alleviate the 
bug in IE, and other browsers will gracefully handle the relative URL 
anyway.

Chris

Bob Irwin wrote:

G'day,

I'm using  scripts that are using sessions.  A user logs into a main page
with
a master list of database entries.  They go to another page, add a new
database entry and it appears on the master list.  The user adds another
database entry and upon going back to the master list, the new entry does
not exist.  It is like the database has not been updated.  Refreshing the
page does not help,  I have to go and touch the file on the server or
restart the browser to see the changes.

What I though yesterday was the problem was occuring in both netscape and IE
browsers.  However, I have since discovered that netscape does NOT have this
problem. Are there any session issues known to occur only with Internet
Explorer?  We are running PHP 4.2 on a unix box with apache.

Any ideas?
Best Regards
Bob (Coffee + Laptop = KABOOM!) Irwin
Server Admin  Web Programmer
Planet Netcom


  




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




Re: [PHP] Session problems based on browser?

2002-06-18 Thread Bob Irwin

Thanks for the info Chris.

Its causing me some serious headaches.  IE just refuses to release the old
information.

Best Regards
Bob (Coffee + Laptop = KABOOM!) Irwin
Server Admin  Web Programmer
Planet Netcom
- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Bob Irwin [EMAIL PROTECTED]
Cc: php-general [EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 11:36 AM
Subject: Re: [PHP] Session problems based on browser?


 I'm not sure if this might be related to the problem you're having, but
 Internet Explorer has a long history of poor cookie implementation, from
 the browser allowing anyone to read cookies from any site (versions 4.0
 - 6.0) to the browser not sending the cookie information in subsequent
 requests as it should (version 5.5 - maybe others).

 In particular, there is an IE bug related to use of the Location
 header that causes some versions of IE to forget the cookies in the
 next request. Basically, when the server responds with a 304 and
 includes the Location header, the browser is supposed to submit a GET
 request for the URL specified in that header for the content. It is in
 this request that IE might be failing to include the cookie information.

 If this sounds remotely similar to your problem (you have some code that
 looks something like header(Location: ...) in part of the transactions
 that fail), try to use a relative URL in the header rather than the full
 URL. This violates the standard, but it has been known to alleviate the
 bug in IE, and other browsers will gracefully handle the relative URL
 anyway.

 Chris

 Bob Irwin wrote:

 G'day,
 
 I'm using  scripts that are using sessions.  A user logs into a main page
 with
 a master list of database entries.  They go to another page, add a new
 database entry and it appears on the master list.  The user adds another
 database entry and upon going back to the master list, the new entry does

 not exist.  It is like the database has not been updated.  Refreshing the
 page does not help,  I have to go and touch the file on the server or
 restart the browser to see the changes.
 
 What I though yesterday was the problem was occuring in both netscape and
IE
 browsers.  However, I have since discovered that netscape does NOT have
this
 problem. Are there any session issues known to occur only with Internet
 Explorer?  We are running PHP 4.2 on a unix box with apache.
 
 Any ideas?
 Best Regards
 Bob (Coffee + Laptop = KABOOM!) Irwin
 Server Admin  Web Programmer
 Planet Netcom
 
 
 
 



 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/

 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/


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




Re: [PHP] Session problems based on browser?

2002-06-18 Thread Bob Irwin

Had more of a look at the server side of things.  It isn't even requesting
the page in IE (according to the server logs).  It's like once it has a copy
of the page, it is completely ignoring the server copy.  I have tested on
several different machines and on a few different networks (including the
network the server is on - no proxy server).  Again, netscape doesn't have
this problem.  The crazy thing is that if I don't use sessions (and I'm only
using 1 variable - a username), this works perfectly ok in both browsers.

*scratches head*

Any more suggestions?  I'm not using the location function at all BTW.

Best Regards
Bob (Coffee + Laptop = KABOOM!) Irwin
Server Admin  Web Programmer
Planet Netcom
- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Bob Irwin [EMAIL PROTECTED]
Cc: php-general [EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 11:36 AM
Subject: Re: [PHP] Session problems based on browser?


 I'm not sure if this might be related to the problem you're having, but
 Internet Explorer has a long history of poor cookie implementation, from
 the browser allowing anyone to read cookies from any site (versions 4.0
 - 6.0) to the browser not sending the cookie information in subsequent
 requests as it should (version 5.5 - maybe others).

 In particular, there is an IE bug related to use of the Location
 header that causes some versions of IE to forget the cookies in the
 next request. Basically, when the server responds with a 304 and
 includes the Location header, the browser is supposed to submit a GET
 request for the URL specified in that header for the content. It is in
 this request that IE might be failing to include the cookie information.

 If this sounds remotely similar to your problem (you have some code that
 looks something like header(Location: ...) in part of the transactions
 that fail), try to use a relative URL in the header rather than the full
 URL. This violates the standard, but it has been known to alleviate the
 bug in IE, and other browsers will gracefully handle the relative URL
 anyway.

 Chris

 Bob Irwin wrote:

 G'day,
 
 I'm using  scripts that are using sessions.  A user logs into a main page
 with
 a master list of database entries.  They go to another page, add a new
 database entry and it appears on the master list.  The user adds another
 database entry and upon going back to the master list, the new entry does
 not exist.  It is like the database has not been updated.  Refreshing the
 page does not help,  I have to go and touch the file on the server or
 restart the browser to see the changes.
 
 What I though yesterday was the problem was occuring in both netscape and
IE
 browsers.  However, I have since discovered that netscape does NOT have
this
 problem. Are there any session issues known to occur only with Internet
 Explorer?  We are running PHP 4.2 on a unix box with apache.
 
 Any ideas?
 Best Regards
 Bob (Coffee + Laptop = KABOOM!) Irwin
 Server Admin  Web Programmer
 Planet Netcom
 
 
 
 



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


 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/

 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/


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




Re: [PHP] Session problems based on browser?

2002-06-18 Thread Chris Shiflett

That sounds like IE is just caching the page then and showing you the 
same one previously displayed for that URL, at which time you were not 
logged in.

As a small test, you might try including this PHP code at the top of 
your scripts:

header(Expires:  . gmdate(D, d M Y H:i:s, time()) .  GMT);
header(Cache-Control: Private);

Or, as an easier test, try using shift-reload in IE to see if it tries 
to request a fresh copy. I believe that overrides the cache.

Chris

Bob Irwin wrote:

Had more of a look at the server side of things.  It isn't even requesting
the page in IE (according to the server logs).  It's like once it has a copy
of the page, it is completely ignoring the server copy.  I have tested on
several different machines and on a few different networks (including the
network the server is on - no proxy server).  Again, netscape doesn't have
this problem.  The crazy thing is that if I don't use sessions (and I'm only
using 1 variable - a username), this works perfectly ok in both browsers.

*scratches head*

Any more suggestions?  I'm not using the location function at all BTW.

Best Regards
Bob (Coffee + Laptop = KABOOM!) Irwin
Server Admin  Web Programmer
Planet Netcom
- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Bob Irwin [EMAIL PROTECTED]
Cc: php-general [EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 11:36 AM
Subject: Re: [PHP] Session problems based on browser?


  

I'm not sure if this might be related to the problem you're having, but
Internet Explorer has a long history of poor cookie implementation, from
the browser allowing anyone to read cookies from any site (versions 4.0
- 6.0) to the browser not sending the cookie information in subsequent
requests as it should (version 5.5 - maybe others).

In particular, there is an IE bug related to use of the Location
header that causes some versions of IE to forget the cookies in the
next request. Basically, when the server responds with a 304 and
includes the Location header, the browser is supposed to submit a GET
request for the URL specified in that header for the content. It is in
this request that IE might be failing to include the cookie information.

If this sounds remotely similar to your problem (you have some code that
looks something like header(Location: ...) in part of the transactions
that fail), try to use a relative URL in the header rather than the full
URL. This violates the standard, but it has been known to alleviate the
bug in IE, and other browsers will gracefully handle the relative URL
anyway.

Chris

Bob Irwin wrote:



G'day,

I'm using  scripts that are using sessions.  A user logs into a main page
with
a master list of database entries.  They go to another page, add a new
database entry and it appears on the master list.  The user adds another
database entry and upon going back to the master list, the new entry does
not exist.  It is like the database has not been updated.  Refreshing the
page does not help,  I have to go and touch the file on the server or
restart the browser to see the changes.

What I though yesterday was the problem was occuring in both netscape and
  

IE
  

browsers.  However, I have since discovered that netscape does NOT have
  

this
  

problem. Are there any session issues known to occur only with Internet
Explorer?  We are running PHP 4.2 on a unix box with apache.

Any ideas?
Best Regards
Bob (Coffee + Laptop = KABOOM!) Irwin
Server Admin  Web Programmer
Planet Netcom




  


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


Scanned by PeNiCillin http://safe-t-net.pnc.com.au/

Scanned by PeNiCillin http://safe-t-net.pnc.com.au/




  




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




RE: [PHP] Session problems based on browser?

2002-06-18 Thread César Aracena

Hi all. I'm having the same problem when developing a site with a flash
animation inside. Let's say I'm seeing the page, I change the flash
background color, save the flash animation again and refresh the page...
nothing happens.

I found out that is a problem of configuration of my IE. If I go to
Tools  Options  Temporary Internet Files and set it up to Every visit
to the page then it get refreshed well. The thing is that I don't want
to tell every visitor to change this. Isn't there a way for PHP to send
refresh header if the visit is beign made after the last update date
stored maybe in a DB or file???

 -Original Message-
 From: Bob Irwin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 18, 2002 8:57 PM
 To: php-general
 Subject: [PHP] Session problems based on browser?
 
 G'day,
 
 I'm using  scripts that are using sessions.  A user logs into a main
page
 with
 a master list of database entries.  They go to another page, add a new
 database entry and it appears on the master list.  The user adds
another
 database entry and upon going back to the master list, the new entry
does
 not exist.  It is like the database has not been updated.  Refreshing
the
 page does not help,  I have to go and touch the file on the server or
 restart the browser to see the changes.
 
 What I though yesterday was the problem was occuring in both netscape
and
 IE
 browsers.  However, I have since discovered that netscape does NOT
have
 this
 problem. Are there any session issues known to occur only with
Internet
 Explorer?  We are running PHP 4.2 on a unix box with apache.
 
 Any ideas?
 Best Regards
 Bob (Coffee + Laptop = KABOOM!) Irwin
 Server Admin  Web Programmer
 Planet Netcom
 
 
 --
 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 problems based on browser?

2002-06-18 Thread Chris Shiflett

I mentioned a couple in a previous email:

header(Expires:  . gmdate(D, d M Y H:i:s, time()) .  GMT);
header(Cache-Control: Private);

Most HTTP headers with regards to caching are more intended to dictate 
proxy behavior. For example, the header above specifying that 
cache-control be private keeps personal information sent in a POST from 
being cached. In fact, many people include that header at the beginning 
of any script receiving POST data (there are clean ways to do this with 
well-designed architectures).

I honestly don't know which HTTP headers IE will be most interested in, 
so you might want to do a tad bit of research. Here is another to try:

header(Pragma: no-cache);

Let me know if any of this does/doesn't work. I should give more 
concrete answers, but I don't have much time this evening. :)

Chris

César Aracena wrote:

Hi all. I'm having the same problem when developing a site with a flash
animation inside. Let's say I'm seeing the page, I change the flash
background color, save the flash animation again and refresh the page...
nothing happens.

I found out that is a problem of configuration of my IE. If I go to
Tools  Options  Temporary Internet Files and set it up to Every visit
to the page then it get refreshed well. The thing is that I don't want
to tell every visitor to change this. Isn't there a way for PHP to send
refresh header if the visit is beign made after the last update date
stored maybe in a DB or file???

  

-Original Message-
From: Bob Irwin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 8:57 PM
To: php-general
Subject: [PHP] Session problems based on browser?

G'day,

I'm using  scripts that are using sessions.  A user logs into a main


page
  

with
a master list of database entries.  They go to another page, add a new
database entry and it appears on the master list.  The user adds


another
  

database entry and upon going back to the master list, the new entry


does
  

not exist.  It is like the database has not been updated.  Refreshing


the
  

page does not help,  I have to go and touch the file on the server or
restart the browser to see the changes.

What I though yesterday was the problem was occuring in both netscape


and
  

IE
browsers.  However, I have since discovered that netscape does NOT


have
  

this
problem. Are there any session issues known to occur only with


Internet
  

Explorer?  We are running PHP 4.2 on a unix box with apache.

Any ideas?
Best Regards
Bob (Coffee + Laptop = KABOOM!) Irwin
Server Admin  Web Programmer
Planet Netcom


--
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 problems based on browser?

2002-06-18 Thread Bob Irwin

Till having no luck.

Expires didn't work.

I've put it on another server with the same results.

Completely stripped sessions off of the code and it works perfectly with a
normal username variable.  Perhaps the session headers are confusing IE?

We will try to update to the latest version of PHP (currenty running 4.1.2
on Apache/1.3.23).

I might also try a different version of IE.

Best Regards
Bob (Coffee + Laptop = KABOOM!) Irwin
Server Admin  Web Programmer
Planet Netcom
- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: César Aracena [EMAIL PROTECTED]
Cc: 'Bob Irwin' [EMAIL PROTECTED]; 'php-general'
[EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 1:38 PM
Subject: Re: [PHP] Session problems based on browser?


 I mentioned a couple in a previous email:

 header(Expires:  . gmdate(D, d M Y H:i:s, time()) .  GMT);
 header(Cache-Control: Private);

 Most HTTP headers with regards to caching are more intended to dictate
 proxy behavior. For example, the header above specifying that
 cache-control be private keeps personal information sent in a POST from
 being cached. In fact, many people include that header at the beginning
 of any script receiving POST data (there are clean ways to do this with
 well-designed architectures).

 I honestly don't know which HTTP headers IE will be most interested in,
 so you might want to do a tad bit of research. Here is another to try:

 header(Pragma: no-cache);

 Let me know if any of this does/doesn't work. I should give more
 concrete answers, but I don't have much time this evening. :)

 Chris

 César Aracena wrote:

 Hi all. I'm having the same problem when developing a site with a flash
 animation inside. Let's say I'm seeing the page, I change the flash
 background color, save the flash animation again and refresh the page...
 nothing happens.
 
 I found out that is a problem of configuration of my IE. If I go to
 Tools  Options  Temporary Internet Files and set it up to Every visit
 to the page then it get refreshed well. The thing is that I don't want
 to tell every visitor to change this. Isn't there a way for PHP to send
 refresh header if the visit is beign made after the last update date
 stored maybe in a DB or file???
 
 
 
 -Original Message-
 From: Bob Irwin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 18, 2002 8:57 PM
 To: php-general
 Subject: [PHP] Session problems based on browser?
 
 G'day,
 
 I'm using  scripts that are using sessions.  A user logs into a main
 
 
 page
 
 
 with
 a master list of database entries.  They go to another page, add a new
 database entry and it appears on the master list.  The user adds
 
 
 another
 
 
 database entry and upon going back to the master list, the new entry
 
 
 does
 
 
 not exist.  It is like the database has not been updated.  Refreshing
 
 
 the
 
 
 page does not help,  I have to go and touch the file on the server or
 restart the browser to see the changes.
 
 What I though yesterday was the problem was occuring in both netscape
 
 
 and
 
 
 IE
 browsers.  However, I have since discovered that netscape does NOT
 
 
 have
 
 
 this
 problem. Are there any session issues known to occur only with
 
 
 Internet
 
 
 Explorer?  We are running PHP 4.2 on a unix box with apache.
 
 Any ideas?
 Best Regards
 Bob (Coffee + Laptop = KABOOM!) Irwin
 Server Admin  Web Programmer
 Planet Netcom
 
 
 --
 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


 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/

 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/


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




Re: [PHP] session problems....

2002-06-14 Thread SenthilVelavan

-Rick
Change the owner and group of the directory to nobody.nobody to your /tmp
directory.Iam not sure here.
regards,
SenthilVelavan.P

- Original Message -
From: php [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 15, 2002 7:42 AM
Subject: [PHP] session problems


 Anyone know why php would complain about not having permission to write
 the session file in /tmp (and to check the session.save_path var in my
 php.ini file. when it does specify /tmp in the php.ini and /tmp has
 drwxrwxrwt for permissions?

 I need a resolution... even if we have to pay for it... so if anyone
 feels they are good enough to fix this we can compensate you for your
 time.

 Thanks,
 Rick

 --
 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 problems....

2002-06-14 Thread Bruce Karstedt

You should not be writing to /tmp that is a system directory. php.ini is a
file. If you need a temporary directory, use ./tmp that will be directory
in your web root directory.

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


-Original Message-
From: php [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 9:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP] session problems


Anyone know why php would complain about not having permission to write
the session file in /tmp (and to check the session.save_path var in my
php.ini file. when it does specify /tmp in the php.ini and /tmp has
drwxrwxrwt for permissions?

I need a resolution... even if we have to pay for it... so if anyone
feels they are good enough to fix this we can compensate you for your
time.

Thanks,
Rick

--
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 problems....

2002-06-14 Thread Chris Shiflett

I'm not sure what sysadmins you are talking about, but /tmp is typically 
a world-writable directory.

Also, there is no such strict Unix naming convention. The directory 
/tmp is always /tmp, so matter how lenient you want to be. There is 
simply a difference between relative paths and absolute paths.

Chris

Bruce Karstedt wrote:

I was referring to strict Unix directory naming conventions. /tmp is the
equivalent of root/tmp and no sysadmin wants you writing to his /tmp
directory. In fact you should not be allowed to write to /tmp. While I have
not checked this, I have the feeling that PHP takes care of this for you. If
you are creating a subdirectory, say for data, on your web site the Unix
path may be something like /websites/yoursitename/htdocs/subdirectory.

Since your default directory would be /websites/yoursitename/htdocs to get
to /websites/yoursitename/htdocs/subdirectory you should use ./subdirectory
which means start in my default directory and go down one level to
subdirectory.

I'm sorry if this sounds critical, but I have found that many of the problem
posted to this list are OS based, and I urge the members to learn both the
operating system that they do their development on and the box where your
site is hosted. The use of OS standard directories such as /tmp or /etc are
bad form in Unix and make error log analysis difficult at best

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


-Original Message-
From: Julie Meloni [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 10:13 PM
To: Bruce Karstedt
Cc: 'php'; [EMAIL PROTECTED]
Subject: Re[2]: [PHP] session problems


BK You should not be writing to /tmp that is a system directory. php.ini is
a
BK file. If you need a temporary directory, use ./tmp that will be
directory
BK in your web root directory.


With all due respect, I think there's a reason that /tmp is the default
session.save_path value in php.ini.  /tmp is temp.  It's where
temporary things go.

Saying you shouldn't use that is pretty much saying Hey PHP
Development Group, you've done this wrong for 2 years.  If you don't
want to write your session files to /tmp, then don't.  But please
don't say that it's wrong to do so.  That's not the answer to the
guy's particular problem.


- Julie

-- Julie Meloni
-- [EMAIL PROTECTED]
-- www.thickbook.com

Find Sams Teach Yourself MySQL in 24 Hours at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


  




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




Re: [PHP] session problems...

2002-05-13 Thread 1LT John W. Holmes

In addition to what Kevin said:

$_SESSION and $_session are not the same variables.

Use quotes in your session_register(), too: session_register(u_name),
although you don't need session_register() at all, if you are using
$_SESSION['u_name'] = value; syntax.

---John Holmes...

  Ok I think I am a little confused as to if this is working or not:  I
have
  commented in the places where I am confused... if someone could please
 point
  out why the variables u_name  p_word are not being registered that
 would
  help me out a ton... thanks in advance,
  Jas
  --- Form to log user in ---
  form name=auth method=post action=auth_done.php
input type=text name=u_namebr
input type=password name=p_wordbr
input type=submit name=login value=login
  /form
  --- checks db to see if user exists ---
  ?php
  if ((!$u_name) || (!$p_word)) {
   header (Location: index.php);
   exit;
   }
   $db_name = bignicke;
   $table_name = auth_users;
   $connection = mysql_connect(localhost,user,password) or
die(Could
  not connect to Database, please try again later);
   $db = mysql_select_db($db_name, $connection) or die(Could not select
  Database, please try again later);
   $sql = SELECT * from $table_name WHERE un = \$u_name\ AND pw =
  password(\$p_word\);
   $result = mysql_query($sql,$connection) or die(Couldn't execute
 query);
   $num = mysql_numrows($result);
   if ($num !=0) {
   $msg = p class=\content\You have been authorized to make changes
to
  the web site./p;
   session_start();
   #session_register(u_name);  //cant tell if this has been registered
with
 a
  print statement
   #session_register(p_word);  //can't tell if this is either
   $_session['u_name'] = $u_name; //this must be wrong too
   $_session['p_word'] = $p_word; //still wont register session variables
   } else {
   header ('Location: index.php');
   exit;
   }
  ?
  body bgcolor=#FF text=#00
  ?php
  echo $msg;
  print (SESSION_ID());  // the session is working right here
  print ($_SESSION['u_name']); // this will not print the registered
 variable
  print ($_SESSION['p_word']);  // this is not printing the registered
  variable either
  print ($u_name);  // this works
  print ($p_word);  // this works
  print (session_is_registered('u_name'));  // this won't work
  print (session_is_registered('p_word'));   // this isnt working either
  ?
  br
  a href=edit.phpedit more pages/a
  /body
  --- page to see if variables are being passed to edit page ---
  ?php
  session_start();
  $_session['u_name'] = $u_name; //should be registering username
  $_session['p_word'] = $p_word; //should be registering password
  ?
  body bgcolor=#FF text=#00
  success?
  ?php
  print ($_SESSION['u_name']); //does not print the variables
  print ($_SESSION['p_word']); //this doesn't either
  print (session_is_registered('u_name')); //this says variables are set
  print (session_is_registered('p_word')); //this also says variables are
 set
  ?
  /body
 
 
 
  --
  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 problems

2002-03-14 Thread Erik Price


On Thursday, March 14, 2002, at 02:15  PM, Daniel Ferreira Castro wrote:

 If it validates the user, then he creates a session called 
 login_session and
 open another file called s_proj.htm throug the line
 header(location:http://pinguim/pb/s_proj.php;);

 The problem is
 on my login.php I have the block

 session_name(login_session);
 session_start();
 session_register(login);
 session_register(pass);
 $HTTP_SESSION_VARS[login]= '$user';
 $HTTP_SESSION_VARS[pass]='$pass';
 mysql_close($link);
 header(location:http://pinguim/pb/s_proj.php;);

 and I wish to retrieve at s_proj.php the values of the session variables
 login and pass registered for my login_session session.  How can I do 
 it?

Two things:

(1) at the top you say s_proj.htm but I am assuming this is a typo and 
you mean s_proj.php
(2) you have variables in single quotes, which will prevent them from 
expanding.  You can drop the single quotes if you want.
(3) If you are using PHP 4.1.0 or greater, then there is a much easier 
way to write this script:

session_start();
$_SESSION['login'] = $_POST['user']; // use $_GET if that is the method 
you're using
$_SESSION['pass'] = $_POST['pass']; // use $_GET if you are using that 
method
mysql_close($link);
header(location: http://pinguim/pb/s_proj.php;);



HTH,
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 problems not finding my variables..

2002-01-16 Thread Jaime Bozza

Peter,
   I had a similar problem, and I believe there's a bug report already
filed about it.  PHP doesn't seem to save session variables if you use
the Location: header.  What I do in my scripts when I need to set a
location redirect is run 'session_write_close()' before I use the header
function.  This assures me that the data is written.

Jaime Bozza


-Original Message-
From: Peter Lavender [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 15, 2002 7:35 PM
To: php-general
Subject: [PHP] session problems not finding my variables..


Hi everyone,

I'm not sure what I have done wrong here.  I haven't been sucessful in
finding anything that points to what the cuase could be.

What I find interesting is that I have used session in another area of
the web site with out problems.  The only difference between it and the
way I have done it here is that I'm using the header function in this
bit of code, where as the session is started and variables registered
and the processing is done on another page.

Anyway here is the code for the log in page:

?php
session_start();
file://session_unset();

include('./connectDB.php');
include('./commonfunctions.php');
?

function checkdetails($db, $HTTPVARS) {
//check if allowed access
$user = $HTTPVARS['uid'];
$passwd = $HTTPVARS['passwd'];

$sql = select * from tbl_maxware where loginID = '$user' and
password = '$passwd';;
$result = $db-query($sql);
checkError($result, $db, Error in checkDetails);

if ($result-numrows() == 0) {
echo htmlbody;
echo h2Error Loging In/h2;
echo brNot a valid login try again or contact the adminbr;
echo a href=\./login.php\Try Again/a;
echo /body/html;
exit();
} else {
// matched in the maxware table
$result-fetchinto($success);
$UID = $success[0];
$logUID = $success[1];
$logName = $success[2];
//echo session_save_path();
session_register(UID, logUID, logName);
// send them to the main page
header(Location: ./supportau.php);
}

} // end checkdetails

if (array_key_exists( uid, $HTTP_POST_VARS ) ) {
checkdetails($db, $HTTP_POST_VARS);
} else {
login();
}
?



Code for the following main page

?php
session_start();
include( './connectDB.php' );
include('./commonFunctions.php');
?
html
head
title/title
DEFANGED_style
!--
@import url(./max.css);
@import url(./supportAU.css);
@import url(./link.css);
--
/DEFANGED_style
/head
body
h2Support Database/h2
center
table width=90% border=1
trtd rowspan=2 width=30%
!--table width=100% border=1 bgcolor=#887766
trtd --
?php
echo Name= $logName;



DEFANGED_snip

This returns an error:

 PHP Warning: Undefined variable: logName in
c:\inetpub\wwwroot\supportau\supportau.php on line 25

Thanks,

Pete




-- 
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 problems when calling within a class.

2001-08-08 Thread Sean C. McCarthy

Hi,

I got the same problem but i left it (had no more time to fumble around
with it). But try this, because it was what I was going to try:

function ccsession($userid = '1', $groupid = '1', $authid = '1',
$username = 'guest', $first_name = 'Guest', $last_name = 'Account')
{
global $HTTP_SESSION_VARS;

// Change all session variables below to
// $this-_cm_user_id = $HTTP_SESSION_VARS[userid]
// and so on..

$this-ss();// I guess this is not important for sessions
$this-_cm_user_id = $userid;
$this-_cm_group_id = $groupid;
$this-_cm_auth_id = $authid;
$this-_username = $username;
$this-_first_name = $first_name;
$this-_last_name = $last_name;
$this-_session_id = $this-set_si();

}


// Once you started the session you might be able to set it
// the way you are doing here, in the following code as long 
// as you don't send anything before this. If you do it you 
// know you will have already sent the old ID to the user.

function set_si()
{
//if (0) {
//$c_session_id = $this-get_si();
print ==.session_id().br;
if (session_id()) {
$this-_session_id = $c_session_id;
} else {
srand((double)microtime()*1132590); // make 'rand' function
truly random
$this-_session_id = md5(rand(0,999));
}
$this-is_set_si = 1;
session_id($this-_session_id);
print --.session_id().br;
return $this-_session_id;
//}
}
}



By doing this you should be able (and I say SHOULD, I haven't tested it)
to get the value from the session, but you will still have to start the
session outside the class.

Also don't forget to change the $HTTP_SESSION_VARS with the new session
information if you change it.

From my point of view the problem is with variable scope. Even with
register_globals and track_vars the code didn't work for me. If you find
out something please post it (or at least send me a message with your
findings) because actually I was doing that stuff with just functions
and not a class.

Hope it's useful for you.

Sean C. McCarthy
SCI, S.L. (www.sci-spain.com)

Mark Garcia wrote:
 
 Greetings,
 
 I'm having a puzzling time trying to figure out how to work around the issue
 of the session_id not existing after making calls to session_start and
 session_id to generate an session.  It seems that by set_si() calling
 session_id and seeing if there is a value, doesn't not work.  Hence, a new
 session_id is created but is not persistant.  If I reload the page
 sessions.test.php3 it generates a new session_id and can not detect the
 previous one set.
 
 For example, ...


-- 
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 Problems....HELP!!!!

2001-05-03 Thread Johnson, Kirk

Just move these two lines to the beginning of the file:

 session_start();
 session_register(test);

These have to be before any output is sent to the browser.

Kirk

 -Original Message-
 From: Bruno Freire [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 03, 2001 2:42 PM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP] Session ProblemsHELP
 
 
 Hi! my name is bruno, from Brazil and i'm having some problems with
 sessions.
 Look my code:
 html
head
...
/head
body
   ?php
  session_start();
  session_register(test);
   ?
/body
/html
 
 The message returned in my browser is:
 
 Warning: Cannot send session cookie - headers already sent by (output
 started at /home/httpd/html/intranet/teste.php:11) in
 /home/httpd/html/intranet/teste.php on line 12
 
 Warning: Cannot send session cache limiter - headers already 
 sent (output
 started at /home/httpd/html/intranet/teste.php:11) in
 /home/httpd/html/intranet/teste.php on line 12
 !--
 A { text-decoration: none; }
 A:hover { text-decoration: underline; }
 H1 { font-family: arial,helvetica,sans-serif; font-size: 
 18pt; font-weight:
 bold;}
 H2 { font-family: arial,helvetica,sans-serif; font-size: 
 14pt; font-weight:
 bold;}
 BODY,TD { font-family: arial,helvetica,sans-serif; font-size: 10pt; }
 TH { font-family: arial,helvetica,sans-serif; font-size: 
 11pt; font-weight:
 bold; }
 //--
 What's wrong???
 Maybe the PHP's configuration file... Or some command is 
 needed first
 
 Please, if somebody  know the solution...help me.
 Thanks.
 
 Bruno
 

-- 
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 Problems....HELP!!!!

2001-05-03 Thread Nikhil Goyal

the session_start() should be placed at the top, before the HTML

?php session_start(); ?
html
  head
...
?php
  session_register(test)
...

Nikhil

Bruno Freire [EMAIL PROTECTED] wrote in message
454D444FF5C0D211891800A0C98C7D90359A54@SERVIDOR">news:454D444FF5C0D211891800A0C98C7D90359A54@SERVIDOR...
 Hi! my name is bruno, from Brazil and i'm having some problems with
 sessions.
 Look my code:
 html
head
...
/head
body
   ?php
  session_start();
  session_register(test);
   ?
/body
/html

 The message returned in my browser is:

 Warning: Cannot send session cookie - headers already sent by (output
 started at /home/httpd/html/intranet/teste.php:11) in
 /home/httpd/html/intranet/teste.php on line 12

 Warning: Cannot send session cache limiter - headers already sent (output
 started at /home/httpd/html/intranet/teste.php:11) in
 /home/httpd/html/intranet/teste.php on line 12
 !--
 A { text-decoration: none; }
 A:hover { text-decoration: underline; }
 H1 { font-family: arial,helvetica,sans-serif; font-size: 18pt;
font-weight:
 bold;}
 H2 { font-family: arial,helvetica,sans-serif; font-size: 14pt;
font-weight:
 bold;}
 BODY,TD { font-family: arial,helvetica,sans-serif; font-size: 10pt; }
 TH { font-family: arial,helvetica,sans-serif; font-size: 11pt;
font-weight:
 bold; }
 //--
 What's wrong???
 Maybe the PHP's configuration file... Or some command is needed first

 Please, if somebody  know the solution...help me.
 Thanks.

 Bruno




-- 
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 Problems....HELP!!!!

2001-05-03 Thread Altunergil, Oktay

If you don't use output buffering, the session stuff has to be the first
thing in you script. In other words, you should not send anything to the
browser before the session functions.

In your case you are sending html tags to the browser before the session
functions.
Rewrite it as the following:
?php
 session_start();
 session_register(test);
  ?
html
   head
   ...
   /head
   body
  
   /body
   /html


-Original Message-
From: Bruno Freire [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 4:42 PM


To: '[EMAIL PROTECTED]'
Subject: [PHP] Session ProblemsHELP


Hi! my name is bruno, from Brazil and i'm having some problems with
sessions.
Look my code:
html
   head
   ...
   /head
   body
  ?php
 session_start();
 session_register(test);
  ?
   /body
   /html

The message returned in my browser is:

Warning: Cannot send session cookie - headers already sent by (output
started at /home/httpd/html/intranet/teste.php:11) in
/home/httpd/html/intranet/teste.php on line 12

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/httpd/html/intranet/teste.php:11) in
/home/httpd/html/intranet/teste.php on line 12
!--
A { text-decoration: none; }
A:hover { text-decoration: underline; }
H1 { font-family: arial,helvetica,sans-serif; font-size: 18pt; font-weight:
bold;}
H2 { font-family: arial,helvetica,sans-serif; font-size: 14pt; font-weight:
bold;}
BODY,TD { font-family: arial,helvetica,sans-serif; font-size: 10pt; }
TH { font-family: arial,helvetica,sans-serif; font-size: 11pt; font-weight:
bold; }
//--
What's wrong???
Maybe the PHP's configuration file... Or some command is needed first

Please, if somebody  know the solution...help me.
Thanks.

Bruno

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

2001-03-28 Thread Jeff Warrington

In article 99u746$gra$[EMAIL PROTECTED], "Jeff Warrington"
[EMAIL PROTECTED] wrote:

Never mind everybody. It turns out that I had to set the 
odbc_longreadline setting to make sure that the full serialized
session data was read from the DB.

Jeff


 hello all. I am attempting to register two session variables that are in
 fact class instances. As per instructions, the definitions for these
 classes are prepended to the files being loaded so the class defs are
 present when the session starts.
 If I do this on the first page:
 
 session_start();
 session_register("off");
 session_register("req");
 where "off" and "req" are actually class instances  and then try this on
 page two:
 
 header("Content-Type: text/plain");
 (session_is_registered("req")) ? print("req: yes\n") : print("req:
 no\n"); (session_is_registered("off")) ? print("off: yes\n") :
 print("off: no\n"); var_dump($req);
 var_dump($off);
 I get a response that both $off and $req are registered variables.
 however the output of var_dump for $req is null while the output for
 $off shows the frozen object.  If I reverse the order of the
 session_register on page one, then the var_dump shows values for $req
 but not $off.
 I am using DB storage for the sessions. my callback functions are
 operating - I can see the serialized data in the table for both the $req
 and the $off class instances.
 Any clues on where I need to look to solve this one?  thanks,
 Jeff
 Running Apache 1.3.17 w/ PHP4.0.4pl1
 './configure' '--with-apache=../apache_1.3.17' '--enable-track-vars'
'--with-xml' '--with-dom'
'--with-ibm-db2=/usr/IBMdb2/V6.1/'
'--with-zlib' '--with-curl'
'--with-pspell' '--with-mcrypt'
'--with-sablot'
'--enable-sablot-errors-descriptive'
'--enable-inline-optimization'
'--enable-trans-sid'
 '--with-config-file-path=/opt/gr/oas/lib/'  session data in php.ini is:
 [Session]
 session.save_handler  = user
 session.save_path = SESSION
 session.use_cookies   = 1
 session.name  = XX (removed) session.auto_start=
 0
 session.cookie_lifetime   = 0
 session.cookie_path   = /
 session.cookie_domain = .xxx.com (removed) session.serialize_handler
 = php
 session.gc_probability= 1
 session.gc_maxlifetime= 600


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

2001-02-22 Thread php3

Addressed to: Jack Davis [EMAIL PROTECTED]
  [EMAIL PROTECTED]

** Reply to note from Jack Davis [EMAIL PROTECTED] Wed, 21 Feb 2001 14:58:13 
-0600

 We have designed a web based email program that we have
 recently found a problem with...If you open up two email
 accounts in two different browser windows, the first window
 opened takes on the session that the second window is in.
 It appears that you can open up as many sessions as you
 like, but all open windows take on the session properties
 of the most recently opened session...This happens in Windows
 and Linux with either IE or Netscape...Has anyone else
 had this problem and if so how can I work around it...


I bet you are using cookies to keep track of them.  If so, all open
windows in a browser share the same set of cookies.  The fix is to move
the information that identifies which account they are working in to the
URL.




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.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 problems

2001-01-24 Thread Johannes Janson

I don't know if it'll help but here my bit of the php.ini:
session.save_handler  = files   ; handler used to store/retrieve data
session.save_path = C:\Programme\Apache
Group\Apache\cgi-bin\php4\sessiondata; argument passed to
save_handler
; in the case of files, this is the
; path where data files are stored
session.use_cookies   = 1   ; whether to use cookies
session.name  = PHPSESSID
; name of the session
; is used as cookie name
session.auto_start= 0   ; initialize session on request startup
session.cookie_lifetime   = 0   ; lifetime in seconds of cookie
; or if 0, until browser is restarted

try this test-script:
?
session_start();
session_register("SESSION");

if (! isset($SESSION)) {
$SESSION["count"] = 0;
echo "liCounter initialized, please reload this page to see it
increment";
} else {
echo "liWaking up session $PHPSESSID";
$SESSION["count"]++;
}
echo "liThe counter is now $SESSION[count] ";
?

johannes

"Jimmy Bäckström" [EMAIL PROTECTED] schrieb im Newsbeitrag
007801c0859d$8ef1e0f0$554d59d5@broder">news:007801c0859d$8ef1e0f0$554d59d5@broder...
Yeah I used a path name with '\' instead of '/' but it still does not work.
Help!

"Johannes Janson" [EMAIL PROTECTED] wrote in message
94kpfm$4cc$[EMAIL PROTECTED]">news:94kpfm$4cc$[EMAIL PROTECTED]...
 you have to set the 'session.save_path' in your php.ini.
 be careful with the slashes you use. as you can see from
 the error msg by default it's '/' but windows uses '\'.

 good luck
 Johannes


 "Jimmy Bäckström" [EMAIL PROTECTED] schrieb im Newsbeitrag
 001201c08564$f7398660$554d59d5@broder">news:001201c08564$f7398660$554d59d5@broder...
 Yo!
 I'm playing a little bit with sessions for the moment and I get a really
 scary errormessage:

 Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, O_RDWR) failed:
m
 (2) in h:\program\apache\htdocs/boa/sessionTest.php on line 5

 Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, 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

 I understand that there is a folder missing somewhere (tmp) and I tried to
 create one in the apache directory, but it still does not work. I'm using
 Win2k proffesional with an apache webserver and I don't have a clue what
 changes I should do to php.ini.
 Please help!
 /Broder B




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

2001-01-23 Thread Johannes Janson

you have to set the 'session.save_path' in your php.ini.
be careful with the slashes you use. as you can see from
the error msg by default it's '/' but windows uses '\'.

good luck
Johannes


"Jimmy Bäckström" [EMAIL PROTECTED] schrieb im Newsbeitrag
001201c08564$f7398660$554d59d5@broder">news:001201c08564$f7398660$554d59d5@broder...
Yo!
I'm playing a little bit with sessions for the moment and I get a really
scary errormessage:

Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, O_RDWR) failed: m
(2) in h:\program\apache\htdocs/boa/sessionTest.php on line 5

Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, 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

I understand that there is a folder missing somewhere (tmp) and I tried to
create one in the apache directory, but it still does not work. I'm using
Win2k proffesional with an apache webserver and I don't have a clue what
changes I should do to php.ini.
Please help!
/Broder B




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

2001-01-23 Thread Jimmy Bäckström

Yeah I used a path name with '\' instead of '/' but it still does not work. Help!

"Johannes Janson" [EMAIL PROTECTED] wrote in message 
94kpfm$4cc$[EMAIL PROTECTED]">news:94kpfm$4cc$[EMAIL PROTECTED]...
 you have to set the 'session.save_path' in your php.ini.
 be careful with the slashes you use. as you can see from
 the error msg by default it's '/' but windows uses '\'.
 
 good luck
 Johannes
 
 
 "Jimmy Bckstrm" [EMAIL PROTECTED] schrieb im Newsbeitrag
 001201c08564$f7398660$554d59d5@broder">news:001201c08564$f7398660$554d59d5@broder...
 Yo!
 I'm playing a little bit with sessions for the moment and I get a really
 scary errormessage:
 
 Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, O_RDWR) failed: m
 (2) in h:\program\apache\htdocs/boa/sessionTest.php on line 5
 
 Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, 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
 
 I understand that there is a folder missing somewhere (tmp) and I tried to
 create one in the apache directory, but it still does not work. I'm using
 Win2k proffesional with an apache webserver and I don't have a clue what
 changes I should do to php.ini.
 Please help!
 /Broder B
 
 
 
 
 -- 
 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]