Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
April 4, 2008, 5:08 pm
rate this thread
But it does not work, I don't know what makes it wrong.
Please help..!! what should I do ?
Here is my index.php, and script.php:
$allow_script = true;
$allow_script = false;
Here is my php.ini contents:
register_globals = on
allow_url_fopen = on
expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
- =?iso-8859-1?Q?=C1lvaro?= G. V?=
April 4, 2008, 8:18 pm
First, you store in session data the value of (non-existant) variable
$allow_script. Then you asign a value to $allow_script. You should do it
the other way round.
It seems you are following the typical PHP tutorial written a gazillion
years ago. There's not point in using all thouse overcomplicated
session_blah() functions. Just do session_start() and then read and write
values from the $_SESSION associative array:
$_SESSION['allow_script'] = TRUE;
And I suggest you disable register_globals. Apart from being a potential
security hole, it just makes PHP programming more complicated than it
should. Variables pop in from nowhere, they interfere each other... That's
pure chaos IMHO.
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
to be executed by a browser, the browser has to be able to fetch the
Perhaps you could be more specific about what you're trying to do.
Tim Roberts, email@example.com
Providenza & Boekelheide, Inc.