Reply to Re: [PHP] Register globals and ini_set

Your name:

Reply:


Posted by Terry Romine on 07/08/05 16:27

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация