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 <[EMAIL PROTECTED]>
Sent: Jul 8, 2005 6:42 AM
To: [EMAIL PROTECTED]
Cc: [email protected]
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
[EMAIL PROTECTED] 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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php