|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-02 22:18 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 08:00:01 2025 UTC |
Description: ------------ (Note: This was originally posted in combination with a segfault bug, which got prematurely closed) PHPs virtual() does not behave quite like the apache #include virtual="": When virtual() is used to call another php script, the query string in the virtual() call is ignored. For example, if you call virtual("/file?x=y"), the variable "x" will not be set in the included php script. An example of this is posted at: http://staging.karmak.org/2003/php-virtual-bug/a1 The source for the two files used in this example are at: http://staging.karmak.org/2003/php-virtual-bug/a1-php.txt http://staging.karmak.org/2003/php-virtual-bug/a2-php.txt However, if you call the first script as "a1?x=y", the variable "x" will be set to "y" in the second script. This is not the way the Apache virtual function behaves: With Apache, the query string in the virtual call is passed to the script, as can be seen in the following shtml file: http://staging.karmak.org/2003/php-virtual-bug/a3 The source to this file is at: http://staging.karmak.org/2003/php-virtual-bug/a3-shtml.txt Furthermore, all query string variables are reset when the virtual call is issued. This can be seen by calling the shtml file: http://staging.karmak.org/2003/php-virtual-bug/a4?x=y With the corresponding source code at: http://staging.karmak.org/2003/php-virtual-bug/a4-shtml.txt Note that the x=y declaration is not passed to the php script. Reproduce code: --------------- See Description for URLs Expected result: ---------------- See Description Actual result: -------------- See Description