php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24401 register globals does not work correctly??!!
Submitted: 2003-06-30 03:38 UTC Modified: 2003-07-21 12:47 UTC
Votes:23
Avg. Score:4.8 ± 0.6
Reproduced:19 of 21 (90.5%)
Same Version:16 (84.2%)
Same OS:12 (63.2%)
From: eero at jlug dot org Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.0.0b2-dev OS: Linux
Private report: No CVE-ID: None
 [2003-06-30 03:38 UTC] eero at jlug dot org
Description:
------------
Compiled php5 on my machine, and setted register_globals=On
and this kind of urls does not work

http://server.foo/ilmoitustaulu.php?action=foo
$action is not visible in ilmoitustaulu.php.




Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-30 04:39 UTC] eero at jlug dot org
ilmoitustaulu.php contains like that:

if($action == "add") do_something();
else do_something2();

But $action contains is not passed to to ilmoitustaulu.php
 [2003-06-30 05:23 UTC] petrich at tronic-media dot com
Hi, 
on my machine  (linux 7.2 / Kernel 2.4.9-21) with php5b1 the same Problem.

In php.ini 
register_globals = On

and in .htaccess also
php_flag register_globals on

phpinfo() says:
register_globals On On 

Configured with:
'./configure' '--prefix=/usr' '--with-mysql=/usr' '--with-prefix=/usr' '--with-zlib' --enable-force-cgi-redirect

Perhaps that will help...

Greetings
Hans-J?rgen Petrich
 [2003-06-30 05:25 UTC] petrich at tronic-media dot com
Upsss, 
>on my machine  (linux 7.2 / Kernel 2.4.9-21) with php5b1 the same

linux 7.2 == Red-Hat 7.2 

Hans-J?rgen Petrich
 [2003-06-30 05:34 UTC] eero at jlug dot org
php5 compiled with following on Linux,
Linux lnx 2.4.18-18.7.x with athlon 1400 processor

export CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer"

./configure  --with-mysql --with-bz2 --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-gettext --enable-inline-optimization \
--with-apxs=/home/apache/bin/apxs --with-pgsql --with-zlib-dir=/usr/lib --enable-ftp --enable-sockets --with-ming --with-mm --with-pdflib \
--enable-mime-magic --enable-dio --enable-calendar --enable-bcmath --enable-wddx --with-xmlrpc --with-expat --with-dom --with-unixODBC \
--with-freetype --enable-gd-native-ttf --with-gettext --with-gmp --enable-mbstring --enable-mbregex --enable-xslt --with-xslt-sablot \
--with-sablot-js --enable-shmop --enable-versioning

And register_globals is on and showing in phpinfo()
 [2003-06-30 05:43 UTC] eero at jlug dot org
and following settings are also on:

register_globals = On
register_long_arrays = On
register_argc_argv = On


echo $QUERY_STRING also stops working and so.
 [2003-06-30 06:01 UTC] sniper@php.net
1. Drop this:
  export CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer"

2. Using /usr/lib as path to ANY php configure option is incorrect (use /usr instead)

3. Remove following configure options:
  --enable-versioning
  --enable-inline-optimization

4. Try this configure line instead:

  # rm config.cache
  # ./configure --disable-all --with-apxs=home/apache/bin/apxs

 [2003-06-30 06:22 UTC] eero at jlug dot org
Now compiled with ./configure  --with-mysql --with-apxs=/home/apache/bin/apxs and problems still exists.
 [2003-06-30 06:34 UTC] petrich at tronic-media dot com
Hi,
still have the problem;

(register_globals = On in php.ini are ignored, ServerApi = Apache2)

Configure String:
./configure --disable-all --with-apxs2=/mnt/60giga/samba/public/www/apache2/bin/apxs

Hans-J?rgen Petrich
 [2003-06-30 08:59 UTC] philippe dot nonn at cgeyDOT dot com
Hi,

it seems that register_globals don't even work on the Windows version.

When I call a php form which call phpinfo() with parameters (like phpinfo.php?foo=test), there is non global variable $foo. 

The only way to get the $foo variable is to use get['foo']

Philippe
 [2003-07-03 03:41 UTC] fuhaha at seoul dot com
php5.0b1 on linux machine. (redhat 9.0)
setted register_globals=On
and phpinfo() check result is register_globals On On

it has problem.

do not recognize GET values, and POST values.

why happend this problem ? 
help me plz.
 [2003-07-03 15:38 UTC] Colin_Witt at baylor dot edu
Same issue here with PHP 5.0.0b1 running on Mac OS X 
10.2.6.

php.ini file says register_globals = On

phpinfo() says register_globals On On

http://localhost/index.php?id=1234 should create $id 
with value 1234, but it does not. If I add a check at 
the top of the script like this, it works:

if ($id == "") { $id = $_GET['id']; }

But there are other GET variables being passed elsewhere 
in the app, and they too are not properly registered.
 [2003-07-04 01:53 UTC] sniper@php.net
Try the latest PHP 5 snapshot from http://snaps.php.net/

 [2003-07-04 02:26 UTC] eero at jlug dot org
Tested with latest cvs-version (php5-200307040530 ),
5.0.0b2-dev sama bug still exists.
 [2003-07-04 11:42 UTC] magnus@php.net
Bug #24498 was marked as bogus as it is the same issue. 
Verified it here. 
 [2003-07-07 09:03 UTC] sniper@php.net
Making this "Critical", globals are not registered at all,
regardless what register_globals is set to.

 [2003-07-07 14:02 UTC] dlunn at mts dot net
Isn't register_globals dangerous?  Or has that been changed with PHP 5?
 [2003-07-11 12:05 UTC] php at nexornet dot com
It's NOT DANGEROUS by itself.  If you use register globals, it depends on your programming if it is insecure or not.

I'm having this exact issue on php5.0.0b1 on redhat 7.3 with apache2, waiting patiently for it to be fixed.

Viva Register Globals!
 [2003-07-21 12:47 UTC] zeev@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Aug 18 20:01:29 2024 UTC