RE: [PHP] set global working??

2004-02-21 Thread electroteque
you can turn register globals off using htaccess, i dont have an example for
you but that should fix it.

-Original Message-
From: Terry Romine [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 22, 2004 10:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP] set global working??


Not quite a mystery, but I wondered if anyone could throw a couple of
suggestions my way.

My client's websites were moved last year from an old php server to a
newer one. At that time, I had to upgrade all her scripts because
set_globals were off on the new server, and so I went to using
$_SESSION variables. All seemed to be doing fine until sometime last
week when the scripts on a new website I am working on, being hosted on
her server, started flaking out. Variables were becoming persistent,
retaining previous values and refusing to change.

I checked the php settings and found that the version running on the
sever is 4.1.2 with globals on. That surprised me. I don't have admin
access and would be cautious about trying to change this and possibly
messing up someone else's site.

Anyway, to test my theory, I created a simple script that turns
session_start on and off. If session_start is off, variables work fine.
With session_start on, variable will change once, and then refuse to
change. I've attached the script.

Does this indeed mean that I have to go through all my scripts and
comment out session_start and convert my $_SESSION defines back??
Yeachh!!

Terry





Switch
Persistence 

Livermore
Modesto
Fremont
San Lorenzo
Berkeley



--
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] set global working??

2004-02-21 Thread Terry Romine
Not quite a mystery, but I wondered if anyone could throw a couple of 
suggestions my way.

My client's websites were moved last year from an old php server to a 
newer one. At that time, I had to upgrade all her scripts because 
set_globals were off on the new server, and so I went to using 
$_SESSION variables. All seemed to be doing fine until sometime last 
week when the scripts on a new website I am working on, being hosted on 
her server, started flaking out. Variables were becoming persistent, 
retaining previous values and refusing to change.

I checked the php settings and found that the version running on the 
sever is 4.1.2 with globals on. That surprised me. I don't have admin 
access and would be cautious about trying to change this and possibly 
messing up someone else's site.

Anyway, to test my theory, I created a simple script that turns 
session_start on and off. If session_start is off, variables work fine. 
With session_start on, variable will change once, and then refuse to 
change. I've attached the script.

Does this indeed mean that I have to go through all my scripts and 
comment out session_start and convert my $_SESSION defines back?? 
Yeachh!!

Terry


		
		
		Switch 
Persistence 
		
		Livermore
		Modesto
		Fremont
		San Lorenzo
		Berkeley

	

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