I have a strange problem. I recently migrated my application from my local xampp installation to a SUSE Enterprise Server 11 and everything is working but this one thing dri
Try $_REQUEST
instead of $_GET
and/or $_POST
An example at the link prints Array ( [0] => 52.447529 )
every time even no variables were passed. So, seems that you have problem in code that is not linked with this code:
`
$test="latmin[]=52.447529&latmin[]=22&lonmin=23&lonmax=22.16";
parse_str($test);
print_r($latmin);
phpinfo();
`
The most likely cause of this bug is that someone set "max_input_vars" to 0 or 1 in php.ini. "max_input_vars" defaults to 1000, and can be overridden in php.ini.
I encountered the same behavior recently with a different cause -- a security patch someone backported to a PHP 5.2 installation partially implemented "max_input_vars", but missed some important bits. Different cause, same outcome.
Relevant php source code can be found in main/php_variables.c. In php 5.3.8, the rubber was hitting the road in the php_register_variable_ex function.
There's a SAPI "treat_data" hook which php uses when parsing strings like "foo=bar&asdf[]=1&asdf[]=2" -- A different SAPI might have its own implementation of this.
Tested on my server and it works fine for me:
_GET["latmin"]
Array
(
[0] => 52.447529
[1] => 22
)
Look in your php.ini in the Data Handling section and see what the values are. Reset everything to default, restart the webserver and try again. PHP.ini Data Handling defaults
Well my System Admin did a system update and reboot and the issue is now fixed. No configuration files were changed.
Hmm.. maybe its somehow related to that critical vulnerability bug ? Does your XAMPP has same PHP version as production? I know there might be similar issues if you post too much data (both in terms of file/post size and param quantity). How about upgrading to 5.3.10 ?