Re: [PHP] Problem with sessions.

2008-01-13 Thread Jochem Maas

Balasubramanyam A schreef:

Could someone help with this code? It is a search and delete program. I'm
executing bunch of code within if-else statement. After searching the
records in else block the code is redirecting to if block. I'm not able
delete the records in else block. How do avoid the control move to if block?


1. your problem description is pretty useless - apart form being seemingly
incoherent you also mention an 'if block' and an 'else block' in such a way as
to imply that there is only one of each (there are plenty of each in the code 
provided).

2. your code is not properly indented at all which makes reading it
and trying to figure out what it does (and what it is supposed to do)
too much bother.

3. your doing alsorts of things wrong aside from any flawed logic that
the script apparently contains.

e.g.

1. why set the following session value unconditionally each time?
why not just use the POST value?

$_SESSION['voucher_value'] =  $_POST['voucher_to'];


2. I assume that k1 is not a constant you have defined elsewhere...

if($_SESSION['voucher_value'] == k1)


3. you have big SQL injection holes in the script, also you make blind
assumptions about incoming request data:

$array= $_POST['checkbox'];
foreach ($array as $key=>$value) {
$sql1 = "DELETE FROM $tbl_name WHERE voucher_number='$array[$key]'";




 IIA, Kodaikanal  Observatory
 KODAIKANAL - 624 103";
$hosakote = "Scientist in-charge  CREST Campus  HOSAKOTE - 562
114";
$leh_ladakh = "Engineer in-charge  IAO-HANLE Fort Road.SKARA P.O.Box No.100LEH-LADAKH - 194 101  (J & K)";
$kavalur = "Resident Scientist  Vainu Bappu Observatory  KAVALUR
- 635 701";

$_SESSION['voucher_value'] =  $_POST['voucher_to'];
if($_SESSION['voucher_value'] == k1)
{
$add_val =  $kodaikanal;
}
elseif($_SESSION['voucher_value'] == h1)
{
$add_val =  $hosakote;
}
elseif($_SESSION['voucher_value'] == l1)
{
$add_val =  $leh_ladakh;
}
elseif($_SESSION['voucher_value'] == k2)
{
$add_val =  $kavalur;
}

if ( !(isset ($_POST['delete']) ) ) {
$_SESSION['name_voucher']= $_POST['search_name'];
}
$search_temp = $_SESSION['name_voucher'];


if(isset($_POST['delete'])){
//$checkboxID= $_POST['checkbox'];
$array= $_POST['checkbox'];
foreach ($array as $key=>$value) {
$sql1 = "DELETE FROM $tbl_name WHERE voucher_number='$array[$key]'";
$result1 = mysql_query($sql1);
}


}
$sql="SELECT * FROM $tbl_name where name='$search_temp' &&
address='$add_val'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);

if ($count == 0)
{
include('header.php');
print "";
print "";
print "Search does not find any such records";
print "";
exit();
include('footer.php');
}
include('ser_mis.php');
}




else
{

$tbl_name = "voucherb";
if ( !(isset ($_POST['delete']) ) ) {
$_SESSION['name_voucher']= $_POST['search_name'];
}
$search_temp = $_SESSION['name_voucher'];


if(isset($_POST['delete'])){
//$checkboxID= $_POST['checkbox'];
$array= $_POST['checkbox'];
foreach ($array as $key=>$value) {
$sql1 = "DELETE FROM $tbl_name WHERE voucher_number='$array[$key]'";
$result1 = mysql_query($sql1);
}
if(!(mysql_affected_rows() == 1))
{
include('header.php');
print "";
print "";
print "Records has not been deleted. Please contact administrator";
include('footer.php');
exit();
}else
{
include('header.php');
print "";
print "";
print "The record(s) has been successfully deleted from database";
print "";
exit();
include('footer.php');
}
}
$sql="SELECT * FROM $tbl_name where name='$search_temp'";// &&
address='$add_val'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);

/*if ($count == 0)
{
include('header.php');
print "";
print "";
print "Search does not find any such records";
print "";
exit();
include('footer.php');
}*/
include('ser_misb.php');
}

?>



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



Re: [PHP] Problem with Sessions

2006-01-24 Thread Richard Correia
upgrade to 4.4.X

4.2 has known problems in session handling.

Thanks,
Richard

On 1/24/06, Barry <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I got a very funny problem.
> I wonder if anyone else encountered that.
>
> I start a Session at Shop startpage to keep some arrays and such.
> Stuff you need for the Cart and so. so fine so good.
>
> But when the customer goes through that Page some session vars just get
> NULL.
> Not the whole session dies. nah just a few vars O_o
>
> I dont understand that.
> It happens not often, but at least 2 times a week.
>
> I have no var overwriting them.
>
> I wonder if anyone has an issue for that.
>
> Btw its PHP 4.2-2 running on a Red Hat system under GNu linux.
>
>
> really no idea what that is >_>
>
> Thanks
> Barry
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Problem with Sessions

2006-01-24 Thread Richard Lynch
On Tue, January 24, 2006 10:30 am, Barry wrote:
> I got a very funny problem.
> I wonder if anyone else encountered that.
>
> I start a Session at Shop startpage to keep some arrays and such.
> Stuff you need for the Cart and so. so fine so good.
>
> But when the customer goes through that Page some session vars just
> get
> NULL.
> Not the whole session dies. nah just a few vars O_o
>
> I dont understand that.
> It happens not often, but at least 2 times a week.
>
> I have no var overwriting them.
>
> I wonder if anyone has an issue for that.
>
> Btw its PHP 4.2-2 running on a Red Hat system under GNu linux.
>
>
> really no idea what that is >_>

Something as infrequent as that is very difficult to debug, because by
the time you start looking at the data, you've already forgotten what
the data was the last time the bug ocurred.

Start logging the error to a separate file or database table.

Log all the variables you THINK should have a value that are NULL.

Look for patterns in the variables.

Also consider logging all the other variables, and their values, to
see if there is a pattern.

Hopefully, gathering the data into an ordered format will make the bug
more clear.

You should also go ahead and time-stamp it, so you can refine the 2
times per week, and possibly log successful page-hits so you have some
idea of the percentage of error.

Possibly log load as well, in some manner -- count # of active
sessions, or OS "load" on the box, or...

Perhaps it only happens under very heavy load?  Or does it simply
increase linearly with load, but still happens under light load?

-- 
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] Problem with Sessions

2006-01-24 Thread Jochem Maas

Barry wrote:

Hi!

I got a very funny problem.
I wonder if anyone else encountered that.

I start a Session at Shop startpage to keep some arrays and such.
Stuff you need for the Cart and so. so fine so good.

But when the customer goes through that Page some session vars just get 
NULL.


are you sticking references to things in the session array sometimes?
(as opposed to sticking things in the session array and then referencing
that?)

do you have a frameset in use? (where more than one page in the frameset may
use/start the session?) - i.e. one page overwrites the values set by another
becuase either your session logic is not 'watertight' or your using a session
handler mechanism that does not do do 'locking' of the session.



Not the whole session dies. nah just a few vars O_o


wtf is 'O_o'?



I dont understand that.
It happens not often, but at least 2 times a week.

I have no var overwriting them.

I wonder if anyone has an issue for that.

Btw its PHP 4.2-2 running on a Red Hat system under GNu linux.


upgrade php to 4.4.x atleast is one thing to consider




really no idea what that is >_>


wtf is '>_>'?
I realise you may not know what it is either (and that you are asking the list) 
-
but that wasn't clear to me either. and if the last couple of sentences are 
anything
but clear as mud then I'll be darned ;-)



Thanks
Barry



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



Re: [PHP] Problem with sessions

2004-08-28 Thread gregosh
Yes, that indeed was a typo but only in my message above. It's not the
problem with the script

Uzytkownik "Andre Dubuc" <[EMAIL PROTECTED]> napisal w wiadomosci
news:[EMAIL PROTECTED]
> Hi,
>
> Looking at your code, I noticed that either you're missing the closing
double
> quote to close off the Location expression, or you're ending it early with
a
> double quote at http://";.
>
> Shouldn't it read:
>
>  header("Location: http://' . $_SERVER['HTTP_HOST']
> ^
>  . dirname($_SERVER['PHP_SELF'])
>   . '/b.php?'.SID'");
>   ^^
>
> Perhaps that's the problem. I'm no expert . . .
> Hth,
> Andre
>
>
> On Friday 27 August 2004 07:47 am, gregosh wrote:
> > > you sure the cookie is being set?  try this
> > >
> > > header("Location: http://"; . $_SERVER['HTTP_HOST']
> > >  . dirname($_SERVER['PHP_SELF'])
> > >  . '/b.php?'.SID);
> >
> > I had tried this before - no result. The cookie is set in the \temp dir
> > where it is intended. And that's where the other cookie with new session
is
> > located too. This really is a strange problem.


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



Re: [PHP] Problem with sessions

2004-08-27 Thread Andre Dubuc
Hi, 

Looking at your code, I noticed that either you're missing the closing double 
quote to close off the Location expression, or you're ending it early with a 
double quote at http://";.

Shouldn't it read:

 header("Location: http://' . $_SERVER['HTTP_HOST']
^
 . dirname($_SERVER['PHP_SELF'])
  . '/b.php?'.SID'");
  ^^

Perhaps that's the problem. I'm no expert . . .
Hth,
Andre


On Friday 27 August 2004 07:47 am, gregosh wrote:
> > you sure the cookie is being set?  try this
> >
> > header("Location: http://"; . $_SERVER['HTTP_HOST']
> >  . dirname($_SERVER['PHP_SELF'])
> >  . '/b.php?'.SID);
>
> I had tried this before - no result. The cookie is set in the \temp dir
> where it is intended. And that's where the other cookie with new session is
> located too. This really is a strange problem.

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



Re: [PHP] Problem with sessions

2004-08-27 Thread gregosh
>
> you sure the cookie is being set?  try this
>
> header("Location: http://"; . $_SERVER['HTTP_HOST']
>  . dirname($_SERVER['PHP_SELF'])
>  . '/b.php?'.SID);

I had tried this before - no result. The cookie is set in the \temp dir
where it is intended. And that's where the other cookie with new session is
located too. This really is a strange problem.

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



Re: [PHP] Problem with sessions

2004-08-26 Thread Matt M.
> but when I use PHP's header("location: b.php"); expression a new session is
> created and the data from the previous one is lost. Anyone familiar with
> this problem? Any known solutions? It's been really driving me nuts!

you sure the cookie is being set?  try this

header("Location: http://"; . $_SERVER['HTTP_HOST']
 . dirname($_SERVER['PHP_SELF'])
 . '/b.php?'.SID);

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



RE: [PHP] problem with sessions - IE working after session.use_trans_sid enabled.

2003-08-18 Thread Ford, Mike [LSS]
On 17 August 2003 12:38, anders thoresson wrote:

> Hi,
> 
>  I've had some problems with Internet Explorer not working on the
> site I'm building at the moment. At my local system it worked, but
> not on my ISP. After comparing the session settings, only
> use_trans_sid differed: enabled at my local system, disabled at
> remote. 
> 
>  Before I changed anything IE worked only when accessing the site at
> my local host, while Opera managed to access it both local and from
> my ISP. After enabling session.use_trans_sid in my .htaccess on my
> ISP, Internet Explorer can be used even there.
> 
>  Ok. I've solved my problem, but don't really understand how
> session.use_trans_sid made the difference?

Just a wild guess -- but has your IE got cookies blocked, whilst Opera is accepting 
them?

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Problem with sessions

2003-07-17 Thread John W. Holmes
Peda wrote:
Warning: session_start(): open(tmp/sess_41e301350c11c38d0249bc8c72ffb2ec,
O_RDWR) failed: Permission denied (13) in
/home2/pena/public_html/listing1.php on line 3
Can anyone tell me what is wrong?
PHP is trying to save session data in /tmp by writing a file there, but 
permission is denied. So, either give /tmp the right permissions so PHP 
can access it or set another save location in php.ini.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





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


Re: [PHP] Problem with sessions expiring?

2003-03-14 Thread CPT John W. Holmes
Session files will be cleaned up after 24 minutes by default. So if they
take longer than that, and the garbage collection deletes their session
file, then they are no longer logged in. Increase the session.gc_maxlifetime
parameter in php.ini

---John Holmes...

- Original Message -
From: "Mallen Baker" <[EMAIL PROTECTED]>
To: ">" <<[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 10:59 AM
Subject: [PHP] Problem with sessions expiring?


Hi

I have a process for people to apply for awards online. The login is
controlled using sessions, with a basic session variable set with the
username of the person logged in. In PHP ini the session cookie lifetime is
set to 0 - ie. until the browser session finishes.

Manyof the applicants are using the system, and it is fine.

But a significant minority are having the same problem. They log in, spend
some time entering data into the fields on the form, and when the hit the
button to either save or submit the entry they get a 'you are not logged in'
message and - worse - lose the data they have so far inputted. One user
experienced this after an hour and a half's work - but others have had
problems after considerably shorter periods of time.

As far as I can tell, the problem is not restricted to one platform, and I
haven't yet been able to locate anything that applies to them that wouldn't
apply to others who have successfully used the system.

Is there any known problem - perhaps in relation to certain kinds of
firewall - that would explain this behaviour? Any thoughts on the workaround
I might do short term (above and beyond encouraging people to write their
applications in Word before submitting them) that might alleviate the
problem?

Deadline for the award is two weeks and traffic is getting quite high. Any
help you can give me before it gets worse would be gratefully received!

Thanks - Mallen



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.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] Problem with sessions

2003-02-18 Thread Larry E. Ullman
This work very well, but when i open twice mozilla browsers and login 
with diferent users, i always keep the same session id, and sessions 
vars for two browsers...
i don't know how to resolve this problem...

Use two different browsers, for example, both Mozilla and Netscape. The 
session cookie (with the session ID) is being shared by the two windows 
of your one Mozilla browser. Hence the confusion.

Larry


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



Re: [PHP] Problem with sessions.

2002-12-19 Thread Jason Wong
On Friday 20 December 2002 07:43, Mike Hillyer wrote:
> Hello All;
>
> Please forgive me if I am repeating an often asked question, but I am
> having a problem with sessions. I simply cannot get them to work.
>
> The sample code I provide works on another server perfectly, this is the
> first page:

So what's the difference between the two servers?

> My PHP.ini file is standard to a RedHat RPM install, but I will include it
> as an attachment.

I don't think you can send attachments to the list. Examine the php.ini on 
both servers and play "spot the difference" :)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Nezvannyi gost'--khuzhe tatarina.
[An uninvited guest is worse than the Mongol invasion]
-- Russian proverb
*/


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




RE: [PHP] Problem with sessions.

2002-12-19 Thread Philip Olson

For the record, variables are case sensitive so it's
$_SESSION not $_session.

And if you're going to use $_SESSION (which you should),
do not use session_register().

Regards,
Philip


On Thu, 19 Dec 2002, Mike Hillyer wrote:

> I have recieved a private response, it appears my system had
> register_globals off and the other server would have had it turned on. The
> proper usage was actually $_session["name"] and I shall be using that.
> 
> This was my first use of the PHP mailing list and I am very impressed and
> pleased with all the quick and helpful responses. Thank you all.
> 
> Mike Hillyer
> 
> -Original Message-
> From: Quentin Bennett [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 19, 2002 5:24 PM
> To: PHP GENERAL LIST
> Subject: RE: [PHP] Problem with sessions.
> 
> 
> Hi,
> 
> Is your 'other server' identical (Web Server, PHP Version, register_globals
> setting)?
> 
> Quentin
> 
> -Original Message-
> From: Mike Hillyer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 20 December 2002 12:43 p.m.
> To: PHP GENERAL LIST
> Subject: [PHP] Problem with sessions.
> 
> 
> Hello All;
> 
> Please forgive me if I am repeating an often asked question, but I am having
> a problem with sessions. I simply cannot get them to work.
> 
> The sample code I provide works on another server perfectly, this is the
> first page:
> 
>  
>  session_start();
>  session_register("name","pass");
>  $name = "hilde";
>  $pass = "mypassword";
>  echo "Session variables set!";
>  echo "go to next page";
> 
> ?>
> 
> When called, the following file arrives in /tmp:
> 
> sess_f9c5e87b35ae66eac64a9a346321b269
> 
> name|s:5:"hilde";pass|s:10:"mypassword";
> 
> 
> 
> So obviously the session file is being created.
> However, when I go to page2.php?PHPSESSID=f9c5e87b35ae66eac64a9a346321b269
> Which has this code:
> 
>   session_start();
>  echo "The password of $name is $pass ";
> 
> ?>
> 
> I get "The Password of  is "
> 
> As a response. Both pages work perfectly on another server, so I am having
> trouble finding the problem, especially since the session file is actually
> created in /tmp
> 
> My PHP.ini file is standard to a RedHat RPM install, but I will include it
> as an attachment.
> 
> Any help would be greatly appreciated!
> 
> Mike Hillyer
> 
> The information contained in this email is privileged and confidential and
> intended for the addressee only. If you are not the intended recipient, you
> are asked to respect that confidentiality and not disclose, copy or make use
> of its contents. If received in error you are asked to destroy this email
> and contact the sender immediately. Your assistance is appreciated.
> 
> --
> 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] Problem with sessions.

2002-12-19 Thread Mike Hillyer
I have recieved a private response, it appears my system had
register_globals off and the other server would have had it turned on. The
proper usage was actually $_session["name"] and I shall be using that.

This was my first use of the PHP mailing list and I am very impressed and
pleased with all the quick and helpful responses. Thank you all.

Mike Hillyer

-Original Message-
From: Quentin Bennett [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 5:24 PM
To: PHP GENERAL LIST
Subject: RE: [PHP] Problem with sessions.


Hi,

Is your 'other server' identical (Web Server, PHP Version, register_globals
setting)?

Quentin

-Original Message-
From: Mike Hillyer [mailto:[EMAIL PROTECTED]]
Sent: Friday, 20 December 2002 12:43 p.m.
To: PHP GENERAL LIST
Subject: [PHP] Problem with sessions.


Hello All;

Please forgive me if I am repeating an often asked question, but I am having
a problem with sessions. I simply cannot get them to work.

The sample code I provide works on another server perfectly, this is the
first page:

Session variables set!";
 echo "go to next page";

?>

When called, the following file arrives in /tmp:

sess_f9c5e87b35ae66eac64a9a346321b269

name|s:5:"hilde";pass|s:10:"mypassword";



So obviously the session file is being created.
However, when I go to page2.php?PHPSESSID=f9c5e87b35ae66eac64a9a346321b269
Which has this code:

The password of $name is $pass ";

?>

I get "The Password of  is "

As a response. Both pages work perfectly on another server, so I am having
trouble finding the problem, especially since the session file is actually
created in /tmp

My PHP.ini file is standard to a RedHat RPM install, but I will include it
as an attachment.

Any help would be greatly appreciated!

Mike Hillyer

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you
are asked to respect that confidentiality and not disclose, copy or make use
of its contents. If received in error you are asked to destroy this email
and contact the sender immediately. Your assistance is appreciated.

--
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] Problem with sessions.

2002-12-19 Thread Quentin Bennett
Hi,

Is your 'other server' identical (Web Server, PHP Version, register_globals setting)?

Quentin

-Original Message-
From: Mike Hillyer [mailto:[EMAIL PROTECTED]]
Sent: Friday, 20 December 2002 12:43 p.m.
To: PHP GENERAL LIST
Subject: [PHP] Problem with sessions.


Hello All;

Please forgive me if I am repeating an often asked question, but I am having
a problem with sessions. I simply cannot get them to work.

The sample code I provide works on another server perfectly, this is the
first page:

Session variables set!";
 echo "go to next page";

?>

When called, the following file arrives in /tmp:

sess_f9c5e87b35ae66eac64a9a346321b269

name|s:5:"hilde";pass|s:10:"mypassword";



So obviously the session file is being created.
However, when I go to page2.php?PHPSESSID=f9c5e87b35ae66eac64a9a346321b269
Which has this code:

The password of $name is $pass ";

?>

I get "The Password of  is "

As a response. Both pages work perfectly on another server, so I am having
trouble finding the problem, especially since the session file is actually
created in /tmp

My PHP.ini file is standard to a RedHat RPM install, but I will include it
as an attachment.

Any help would be greatly appreciated!

Mike Hillyer

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you 
are asked to respect that confidentiality and not disclose, copy or make use 
of its contents. If received in error you are asked to destroy this email 
and contact the sender immediately. Your assistance is appreciated.

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




Re: [PHP] Problem with sessions and Internet Explorer

2002-11-22 Thread Andreas Otto
Hi Ernest,

On Friday 22 November 2002 16:11, Ernest E Vogelsinger wrote:
> Is it possible to have SiteShield log what its doing?
>
> >The question is now: Has anyone heard about or had problems with the
> >combination of PHP SiteShield and InternetExplorer?
>
> I don't know anything about SiteShield - can anyone else chime in please?
> I'd also try to holler at the guys at Tempest...

I have been trying that, but it looks like I have to run the query through our 
office in NewYork where the servers are hosted. My colleagues in NewYork will 
have the right support details.


Cheers,
Andreas

-- 
Andreas Otto <[EMAIL PROTECTED]>
Using PHP on Windows? www.php4win.de


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




Re: [PHP] Problem with sessions and Internet Explorer

2002-11-22 Thread Ernest E Vogelsinger
At 15:35 22.11.2002, Andreas Otto spoke out and said:
[snip]
>Well, guess what I did before writing this eMail ;-)

That's what I have feared...

>Every request to the server I experience this strange problem at has to pass 
>the SiteShield server.

Is it possible to have SiteShield log what its doing?

>The question is now: Has anyone heard about or had problems with the 
>combination of PHP SiteShield and InternetExplorer?

I don't know anything about SiteShield - can anyone else chime in please?
I'd also try to holler at the guys at Tempest...


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] Problem with sessions and Internet Explorer

2002-11-22 Thread Andreas Otto
Hi Ernest,

On Friday 22 November 2002 15:05, Ernest E Vogelsinger wrote:
> The message you see looks disturbing to me - is the session.save_path value
> actually set to /home/globstag/tmp? Does Apache (or else) have all
> necessary rights to this directory?
>
> _MAYBE_ you're using some mod_rewrite rules on the target server, depending
> on the user agent, so IE's would end up in a defunct installation?
>
> I'd check for this inn the first place.

Well, guess what I did before writing this eMail ;-)

At the end of my original eMail I said:
On Friday 22 November 2002 14:24, Andreas Otto wrote:
> The main difference between the other servers and the server in NewYork is
> that only the server in NewYork is protected with SiteShield. Which leads
> me to the conclusion that there might be a problem related to the
> combination of SiteShield, IE and PHP.

So what we have is a set of web servers to which access is controlled by a 
(proxy) server. The software that is used to manage access rights is called 
SiteShield and is developed by a company called Tempest.

Every request to the server I experience this strange problem at has to pass 
the SiteShield server.

The question is now: Has anyone heard about or had problems with the 
combination of PHP SiteShield and InternetExplorer?


Cheers,
Andreas 

-- 
Andreas Otto <[EMAIL PROTECTED]>
Using PHP on Windows? www.php4win.de


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




Re: [PHP] Problem with sessions and Internet Explorer

2002-11-22 Thread Ernest E Vogelsinger
At 14:24 22.11.2002, Andreas Otto spoke out and said:
[snip]
>We have added some new features to a SiteShield protected website which makes 
>it neccessary to use sessions. Although creating the session and the 
>appropriate variables is a server side process there seem to be problems with 
>IE (tested with version 6 on Win2000 Pro and WinXP Pro).
>
>If I access the site with IE I will see the following error message at the 
>bottom of the page:
>
>Warning: Failed to write session data (files). Please verify that the current 
>setting of session.save_path is correct (/home/globstag/tmp) in Unknown on 
>line 0
>
>However if I access the site with any other browser writing the session data 
>works.
[snip] 

Hi,

I don't see how this behaviour could be related to a browser version - all
browsers behave (should behave?) identically when requesting a page... they
simply issue a MIME request, like
GET /?PHPSESSIONID=aasdasdasdasdasdasd HTTP/1.0
Host: www.yourhost.com

The message you see looks disturbing to me - is the session.save_path value
actually set to /home/globstag/tmp? Does Apache (or else) have all
necessary rights to this directory?

_MAYBE_ you're using some mod_rewrite rules on the target server, depending
on the user agent, so IE's would end up in a defunct installation?

I'd check for this inn the first place.


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] Problem with sessions

2002-11-12 Thread rija
maybe you should remove the dot before the session path or do like this :

session.save_path = C:\PHP\sessions\tmp

- Original Message -
From: "Charlie Fowler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 10:19 AM
Subject: [PHP] Problem with sessions


> Hi all,,
>
> Can some one help me with this little issue ... I am trying out some
> prewritten scripts curtesy of SAMS PHP and MYSQL Web Development, Ch24 -
> User Authenication & Personalisation on my server setup
>
> The Configuartion for my development environment is Apache 2.39, Win
> 2000, PHP 4.2.3
>
> The Ini file has the following session settings (as taken from
PHPInfo.php):
>
>
> session
>
> Session Support enabled
>
>
> Directive Local Value Master Value
> session.auto_start
> Off Off
> session.cache_expire
> 180 180
> session.cache_limiter
> nocache nocache
> session.cookie_domain
> no value no value
> session.cookie_lifetime
> 0 0
> session.cookie_path
> / /
> session.cookie_secure
> Off Off
> session.entropy_file
> no value no value
> session.entropy_length
> 0 0
> session.gc_maxlifetime
> 1440 1440
> session.gc_probability
> 1 1
> session.name
> PHPSESSID PHPSESSID
> session.referer_check
> no value no value
> session.save_handler
> files files
> session.save_path
> .c:/php/sessions/tmp .c:/php/sessions/tmp
> session.serialize_handler
> php php
> session.use_cookies
> On On
> session.use_trans_sid
> 0 0
>
>
> The error occurs after the registration page is submitted with the
> following using the function session_start() on the register page.:
>
> Warning:
> open(.c:/php/sessions/tmp\sess_fa42372dcdbde0e457309f134d71827f, O_RDWR)
> failed: Invalid argument (22) in C:\Program Files\Apache
> Group\Apache2\htdocs\SAMS\Chapter24\member.php on line 5
>
> I believe the problem is in my PHP setup and not the script. The Invalid
> arguement is the trigger for the config error to be initaited but I am
> not sure how to edit the php.ini file. I want to ensure that session are
> started when the server is started. I am also unsure of  the function
> and terminology of
>
> session.save_handler
> files files
>
>
> with the use of "files". Is this the correct default. Also is this the
> correct session save path:
>
> session.save_path
> .c:/php/sessions/tmp .c:/php/sessions/tmp
>
>
> What is wrong, please help.
>
> Charlie
>



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




Re: [PHP] Problem with sessions

2002-11-12 Thread Ernest E Vogelsinger
At 00:19 13.11.2002, Charlie Fowler said:
[snip]
>.c:/php/sessions/tmp .c:/php/sessions/tmp
>
>open(.c:/php/sessions/tmp\sess_fa42372dcdbde0e457309f134d71827f, O_RDWR) 
>failed: Invalid argument (22) in C:\Program Files\Apache 
>Group\Apache2\htdocs\SAMS\Chapter24\member.php on line 5
[snip] 

I believe the dot before the "c:" is the culprit. Remove it, restart Apache
and retry.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] Problem with sessions.

2002-03-17 Thread Carlos Costa Portela

On Mon, 18 Mar 2002, Tom Rogers wrote:

> Hi
> As you had not started a session at that point there was none to destroy or
> unregister :)

Ok!!!. Thank you very much,
Carlos.

  http://www.tertulandia.com : sea cual sea tu tema... allí está tu sitio!

 ___Carlos Costa Portela_
| e-mail:  [EMAIL PROTECTED] | home page: http://casa.ccp.servidores.net |
|_Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|


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




Re: [PHP] Problem with sessions.

2002-03-17 Thread Tom Rogers

Hi
As you had not started a session at that point there was none to destroy or 
unregister :)
Tom

At 11:53 PM 17/03/2002, Carlos Costa Portela wrote:
>On Sun, 17 Mar 2002, Tom Rogers wrote:
>
> > hi
> > If you put:
> >
> >  > session_start();
> >
> > as the first line on your page it will behave as you want I think.
>
> Thank you very much. It runs now ok :-). But I don't understand
>why, if I call session_destroy(), the system remember the value of the
>variable.
>
> The system running at...
>http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.php and
>http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.phps you
>have the web page and the code, respectively.
>
>
> Thank you very much,
> Carlos.
>
>  ___Carlos Costa Portela_
>| e-mail:  [EMAIL PROTECTED] | home page: http://casa.ccp.servidores.net |
>|_Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|


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




Re: [PHP] Problem with sessions.

2002-03-17 Thread Carlos Costa Portela

On Sun, 17 Mar 2002, Tom Rogers wrote:

> hi
> If you put:
>
>  session_start();
>
> as the first line on your page it will behave as you want I think.

Thank you very much. It runs now ok :-). But I don't understand
why, if I call session_destroy(), the system remember the value of the
variable.

The system running at...
http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.php and
http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.phps you
have the web page and the code, respectively.


Thank you very much,
Carlos.

 ___Carlos Costa Portela_
| e-mail:  [EMAIL PROTECTED] | home page: http://casa.ccp.servidores.net |
|_Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|


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




Re: [PHP] Problem with sessions.

2002-03-17 Thread Tom Rogers

hi
If you put:

On Sat, 16 Mar 2002, Edward van Bilderbeek - Bean IT wrote:
>
> > maybe you better use:
> >
> > session_unregister("counter");
> >
>
> I've put that, but it doesn't run. As you can see in the URLs
>below, my code is:
>
>if ($id == "logout") { // the user wants logout :(
> session_unregister("counter");
>   }
>   else { // user is navigating through our links
> session_register("counter"); // why I recover the previous value here,
> // even I've clicked logout?
> $counter++;
> print "counter: $counter\n";
>   }
>}
>
> > > http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.php and
> > > http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.phps you
> > > have the web page and the code, respectively.
>
> Tom says that I must create a new session with a different name
>(now I only start a new session implicitly via session_register()).
>Perhaps I am confused with the 'session' term. I thought that if I do
>session_destroy() the session forget all the info, but if I check
>session_id() before and after session_destroy() I see that the value is
>the same.
>
> Thanks for your help,
> Carlos.
>
>  ___Carlos Costa Portela_
>| e-mail:  [EMAIL PROTECTED] | home page: http://casa.ccp.servidores.net |
>|_Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|


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




Re: [PHP] Problem with sessions.

2002-03-17 Thread Carlos Costa Portela

On Sat, 16 Mar 2002, Edward van Bilderbeek - Bean IT wrote:

> maybe you better use:
>
> session_unregister("counter");
>

I've put that, but it doesn't run. As you can see in the URLs
below, my code is:

if ($id == "logout") { // the user wants logout :(
session_unregister("counter");
  }
  else { // user is navigating through our links
session_register("counter"); // why I recover the previous value here,
// even I've clicked logout?
$counter++;
print "counter: $counter\n";
  }
}

> > http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.php and
> > http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.phps you
> > have the web page and the code, respectively.

Tom says that I must create a new session with a different name
(now I only start a new session implicitly via session_register()).
Perhaps I am confused with the 'session' term. I thought that if I do
session_destroy() the session forget all the info, but if I check
session_id() before and after session_destroy() I see that the value is
the same.

Thanks for your help,
Carlos.

 ___Carlos Costa Portela_
| e-mail:  [EMAIL PROTECTED] | home page: http://casa.ccp.servidores.net |
|_Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|




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




Re: [PHP] Problem with sessions.

2002-03-16 Thread Edward van Bilderbeek - Bean IT

maybe you better use:

session_unregister("counter");

Greets,
Edward


- Original Message -
From: "Carlos Costa Portela" <[EMAIL PROTECTED]>
To: "php-general mailing list" <[EMAIL PROTECTED]>
Sent: Saturday, March 16, 2002 4:49 PM
Subject: [PHP] Problem with sessions.


> Hello all:
>
> I am playing with sessions and I have a problem with the
> session_destroy() function. If I do a session_register() after calling it,
> the session recover the previous values (values that I supposed forgot by
> the session).
>
> At
> http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.php and
> http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.phps you
> have the web page and the code, respectively.
>
> The problem is that the "counter" variable maintains the value
> even after click "logout".
>
> If you go to the web page, press:
>
> login -> counter=0
> other link -> counter=1
> other link -> counter=2
> other link -> counter=3
> logout
> other link -> counter=4
>
> I suppose that the problem is that I call
> session_register("counter"). How must I solve this problem?
>
> Best regards and thanks in advance,
> Carlos.
>
> [ all about php+web : http://www.improveyourweb.com ]
>
>  ___Carlos Costa
Portela_
> | e-mail:  [EMAIL PROTECTED] | home page:
http://casa.ccp.servidores.net |
> |_Tódalas persoas maiores foron nenos antes, pero poucas se
lembran__|
>
>
> --
> 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] Problem with sessions.

2002-03-16 Thread Tom Rogers

Hi
When you create the new session give it a different name.
Tom

At 01:49 AM 17/03/2002, Carlos Costa Portela wrote:
> Hello all:
>
> I am playing with sessions and I have a problem with the
>session_destroy() function. If I do a session_register() after calling it,
>the session recover the previous values (values that I supposed forgot by
>the session).
>
> At
>http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.php and
>http://casa.ccp.servidores.net/tutorials/php/sessions/sessions.phps you
>have the web page and the code, respectively.
>
> The problem is that the "counter" variable maintains the value
>even after click "logout".
>
> If you go to the web page, press:
>
>login -> counter=0
>other link -> counter=1
>other link -> counter=2
>other link -> counter=3
>logout
>other link -> counter=4
>
> I suppose that the problem is that I call
>session_register("counter"). How must I solve this problem?
>
> Best regards and thanks in advance,
> Carlos.
>
> [ all about php+web : http://www.improveyourweb.com ]
>
>  ___Carlos Costa Portela_
>| e-mail:  [EMAIL PROTECTED] | home page: http://casa.ccp.servidores.net |
>|_Tódalas persoas maiores foron nenos antes, pero poucas se lembran__|
>
>
>--
>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