environment variables - The data in php://input is not equal to the data parsed and placed in $_POST -
environment variables - The data in php://input is not equal to the data parsed and placed in $_POST -
i'm working out odd bug in wordpress, , don't know how wordpress works, ran around hr trying isolate problem , see root of issue comes from.
turns out problem thing isn't updating because $_post not have info beingness requested.
at top of file i'm accessing browser, before other code, did following:
echo file_get_contents("php://input"); print_r($_post); exit();
i see wordpress uses $_post catch-all global , writes well. thought maybe wordpress kicks info out somewhere couldn't find that. @ top of file anyways, before else happens @ all.. don't think it's possible variables modified before that
the output
widget-text%5b3%5d%5btitle%5d=test&widget-text%5b3%5d%5btext%5d=thisisatest&sidebar=sidebar-1&sidebar-1_position=1&sidebar-2_position=&sidebar-3_position=&sidebar-4_position=&sidebar-5_position=&savewidget=save+widget&widget-id=text-3&id_base=text&multi_number=3&_wpnonce=36852083b6&_wp_http_referer=%2fwp-admin%2fwidgets.php%3fmessage%3d0%26editwidget%3dtext-3%26sidebar%3dsidebar-1%26key%3d0 array ( [widget-text] => array ( [3] => array ( [title] => test ) ) [sidebar] => sidebar-1 [sidebar-1_position] => 1 [sidebar-2_position] => [sidebar-3_position] => [sidebar-4_position] => [sidebar-5_position] => [savewidget] => save widget [widget-id] => text-3 [id_base] => text [multi_number] => 3 [_wpnonce] => 36852083b6 [_wp_http_referer] => /wp-admin/widgets.php?message=0&editwidget=text-3&sidebar=sidebar-1&key=0 )
url_decoded:
widget-text[3][title]=test&widget-text[3][text]=thisisatest&sidebar=sidebar-1&sidebar-1_position=1&sidebar-2_position=&sidebar-3_position=&sidebar-4_position=&sidebar-5_position=&savewidget=save widget&widget-id=text-3&id_base=text&multi_number=3&_wpnonce=36852083b6&_wp_http_referer=/wp-admin/widgets.php?message=0&editwidget=text-3&sidebar=sidebar-1&key=0array
note how in raw data, widget-text[3][text]=thisisatest
exists. $_post['widget-text']['3']['text']
undefined.
i looked through phpinfo , can't find relevant settings. on php version 5.3.8, apache 2, i'm running suse on aws.
does have ideas on how create $_post parse raw info correctly?
this indeed weird. bug in php or issue configuration/extension.
try changing configuration variables max_input_nesting_level
, max_input_vars
, max_input_time
. if you're unsure values seek default ones. check php documentation page default values , meaning.
if you're running suhosin
extension, seek disabling , see if helps. suhosin.post.*
configuration keys interesting.
googling reveals similar problems: one, two.
try accessing through $_request
- $_request['widget-text']['3']['text']
anyway, after googling seems happens in php 5.3.8. upgrading may option.
php environment-variables
Comments
Post a Comment