php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28471 empty variable in url causes all other values to be lost
Submitted: 2004-05-21 14:03 UTC Modified: 2004-05-22 11:27 UTC
From: nico at kamensek dot de Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.6 OS: Linux Kernel 2.4.26-grsec #1 SMP
Private report: No CVE-ID: None
 [2004-05-21 14:03 UTC] nico at kamensek dot de
Description:
------------
This problem does not seem to be php 4.3.6 specific as I was able to successfully replicated it with php 4.3.4.
The problem is, that a call like http://url/script.php?action=test works fine. If I add &var1= to the url, everything else is lost. The script acts as if I have called just script.php. But this problem only occurs in case I add a variable(var1 here) with no value.

A test for that can be found at http://kamensek.de/test/test.php

Try
- test.php?action=test
- test.php?action=test&var1=
- test.php?action=test&var1=y
and finally test.php?action=&var1=y which is no problem.

The code is at http://kamensek.de/test/test.txt which is just a little example. PHP-config to that is located at http://kamensek.de/phpinfo.php


This is *not* a register_globals problem. register_globals is on.

Reproduce code:
---------------
Please see the links mentioned below.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-21 17:26 UTC] nico at kamensek dot de
I don't know if it is important, but I guess I should also mention that I am running php an an Apache 1.3.26 Webserver(Debian stable) with suPHP. The config is like I always do it and I never had any problems. That's why I think this might be a bug which only occurs because of some tiny detail in my configuration.
 [2004-05-21 18:39 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

When you try to replicate the problem make sure that you 
are working with stock PHP without any extra modules or 
utilities such as suPHP 
 [2004-05-21 19:41 UTC] nico at kamensek dot de
Done. Still the same problem(phpinfo is the same url).
 [2004-05-21 20:10 UTC] nico at kamensek dot de
Now I have tested with PHP running as an apache module with no errors. Seems if suPHP does cause this problem.
 [2004-05-22 11:27 UTC] derick@php.net
This is a known bug, it was reported here before IIRC. As it's not a bug in PHP we set the status to Bogus.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 03 20:00:01 2025 UTC