[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Apache form question
In message <1055277400.1802.124.camel [at] elsol.zwan>
"Mr. Adam ALLEN" <adam [at] dynamicinteraction.co.uk> wrote:
> On Tue, 2003-06-10 at 20:13, Ruth Gunstone wrote:
[snip]
> > I'm guessing that there's a configuration problem somewhere, but can find
> > no reference in the config file (commonhttpd.conf?).
[snip]
> Making a few assumptions about your computers ;-) RH 7.3 or earlier on the
> desktop based on your desktop RH 8.0 as I recall on the laptop.
Both Mandrake distros - 8.2 on the PC and 9.1 on the laptop
>
> Any chance that this form is with PHP?
Absolutely correct!
> There were changes in PHP (though I can't remember the version of PHP, but
> the change was around the time RH moved over to Apache 2). The problem is
> in early version of PHP an option "register_vars" was enabled by default-
> in which a variable on a form named "test", then it would be avaialble
> $test. The other subtle change was $HTTP_POST_VARS{"test"} and
> $HTTP_GET_VARS{"test"} changed to $_POST["test"] or $_GET["test"].
This looks very promising. Many thanks.
...(passage of time music)...
O.k., I've changed the PHP configuration (took ages to find it!). I
couldn't find "register_vars", but "register_globals" seemed to be relevant.
Changed the setting to "On", but it didn't seem to work (also tried stopping
and restarting httpd.) I read a bit (lot!) more of the How To's -
particularly the comments regarding the security implications of global
variables, and found the reference to adding the directive "php_flag
register_globals" to an .htaccess file. THIS did the trick!
The security implication is quite interesting (although not very relevant in
my case), so I intend to re-write the PHP to use the $_POST method. I just
hope the goalposts don't move /again/ before I've finished!!! (This project's
been on the go for a year!)
Thanks again.
TTFN!
--
Ruth Gunstone (ruth at bolsterstone dot demon dot co dot uk)
/====================================================\
|| "That's the trouble with Time Travel - I can ||
|| remember tomorrow as if it were yesterday." ||
|| The Doctor ||
|| "Death Comes to Time" ||
\====================================================/
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.