does phpinfo(32) show the $action variable anywhere? If so just use the
global array variable it shows up under. Personally I'd just use the
$_GET['action'] alias.

You can safely turn register_globals on if you're the only guy that runs
scripts on that server and your scripts will never have to run on a server
where it is off. If not you should do it for yourself in .htaccess or with
ini_set(). Just be sure you are careful to initialize all internal variables
that don't come directly from user input.

----- Original Message -----
From: "Joe Kupiszewski" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Wednesday, March 26, 2003 12:56 PM
Subject: php.ini question

> I didn't do the installation, but the phpinfo() shows the following:
> version - 4.2.3
> ./configure' '--with-apxs=/usr/local/sbin/apxs'
> '--with-config-file-path=/usr/local/etc' '--enable-versioning'
> '--with-regex=system' '--without-gd' '--without-mysql' '--with-zlib'
> '--with-mysql=/usr/local' '--prefix=/usr/local' 'i386-portbld-freebsd4.7'
> and the php path info is listed as
> /usr/local/etc
> I do have root access as this is not a production machine, but for the
> of me cannot seem to get it to read the php.ini file.  I believe php and
> apache are interacting properly, or I wouldn't get the phpinfo() to work.
> The root of my real problem is that in trying to pass variable values from
> php scripts to reinvocations of the same script using
> http://pathtofile.php?action=3
> I realize that this is a register_globals thing and that I can access it
> one of two ways:
> 1)  Turning register_globals on (which many tell me is a security risk)
> 2)  Using $_REQUEST["action"]
> 3)  $HTTP_POST_VARS and $HTTP_GET_VARS -> with ["action"]
> However, using the second (haven't tried the 3rd) method and trying to
> incorporate this variable value into an sql statement it bombs.  This may
> more appropriate for an sql post, but thought I would throw it up here and
> see if anyone can shed some light as to how php is interpreting 2) and 3)
> One workaround I have started with was just assigning the
> $_REQUEST["action"] value to a new local variable and just using that, but
> it seems like there would be an easier way and that this method is just a
> lot of wasted work.
> Thanks for any thoughts and I am happy to post add'l script details.
> Joe...

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to