Re: Register globals and ini_set
| From: | Terry Romine | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Register globals and ini_set | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-218346@lists.php.net to get a copy of this message | ||
I'm having a serious pain with globals.. maybe someone can help.
My major client moved her service from one server to another, and with it, PHP went from 4.1 to
4.2+.
Register Globals was turned off, and when everything failed to work, tech support turned them back
on via .htaccess. I'm planning to update the hundreds of scripts over the next weekend or so,
but for right now,
my $_SESSION['variable'] seem to be failing sporatically. It doesn't seem to make a
difference whether I have session_start() at the top of the file or not.
Shouldn't something like this work?
<?php
session_start();
$my_local=$_SESSION['global_var'];
echo($my_local);
?>
where $global_var is set in one file and then used in another?
Thanks for any help
Terry
-----Original Message-----
From: Sebastian <sebastian@broadbandgaming.net>
Sent: Jul 8, 2005 6:42 AM
To: virtualsoftware@gmail.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] Register globals and ini_set
if you have php <= 4.2.3 yes, otherwise no.
it has to be set in php.ini, .htaccess, or httpd.conf
virtualsoftware@gmail.com wrote:
>Hi,
>
>If i use, at the beginning of my scripts, ini_set('register_globals', 0), register
>globals will be turned off?
>
>Thanks
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php