Re: Apache + php: url arguments empty
On Sun, Jun 11, 2006 at 10:40:22PM +0200, Johan de Jong wrote:
> The document root contains an index.php:
>
> <?php
> printf("mytag has value: %s\n", $mytag);
> ?>
>
> My problem is that when I load the page using:
>
> http://localhost/?mytag=a
>
> the value of mytag is empty. I stumbled on this problem when migrating
> an existing and working webpage.
Yes. This is because the default behaviour of PHP changed to disable
this by default, as a security improvement.
(I love the way things change between "stable" releases of PHP. Makes
using it a lot more difficult.)
If you *must* use it change 'register_globals' to be 'On' in the
file /etc/php4/apache2/php.ini - and restart Apache by running
'/etc/init.d/apache2 restart'.
Note this may open your server to security holes if you have buggy
scripts installed...
Steve
--
Debian GNU/Linux System Administration
http://www.debian-administration.org/
Reply to: