PhP QUERY_STRING not being carried over ??
I just installed a newer Ubuntu Distro and my dataBase readouts stopped working.
I tried a simple test URL/TestForDb.php?dBase=RENJ&Name=Test without success
and also tried the same as a FORM with both GET and POST
Any ideas why php would stop accepting data sent to it ?
Nickalf. . .
They changed the default settings of "register_globals" in newer versions of PHP. It's usually safer to have it off, but lots of old scripts stop working.
Edit the file: /etc/php5/apache2/php.ini
register_globals = Off
register_globals = On
Then restart Apache. When register_globals is off, you find the posted values in _GET or _POST, or you can use _REQUEST which is a merge of the two.
That was it - thanks much. . .
Nick. . .
If you don't have to update a few thousand source files, consider using e.g. $_GET['dBase']
Wasn't register_globals one of the security issues and wouldn't it be much more useful NOT to set them on?
With a short script, it really doesn't matter wether or not you've got a few thousand files. (And usally just a handful handles requests directly anyway depending on your architecture...)
|All times are GMT -5. The time now is 08:17 AM.|