Doc #73270 [NEW]: php.ini says wrong default settings for arg_separator.output

From: Date: Sun, 09 Oct 2016 11:55:02 +0000
Subject: Doc #73270 [NEW]: php.ini says wrong default settings for arg_separator.output
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14002@lists.php.net to get a copy of this message
From: labs at undef dot name Operating system: Linux PHP version: 7.0.11 Package: Documentation problem Bug Type: Documentation Problem Bug description:php.ini says wrong default settings for arg_separator.output Description: ------------ --- From manual page: http://www.php.net/function.http-build-query --- The php.ini file says: ; The separator used in PHP generated URLs to separate arguments. ; PHP's default setting is "&". ; http://php.net/arg-separator.output ; Example: ;arg_separator.output = "&" So "&" should the default setting, but the result of http_build_query() is with "&". $data = array( 'secret' => 'value_secret', 'response' => 'value_response', ); echo http_build_query($data) ."\n"; Results into "secret=value_secret&response=value_response" echo http_build_query($data, null, '&') ."\n"; Results into "secret=value_secret&response=value_response". Also the phpinfo() function output for "arg_separator.output" is "&" but is displayed in the generated HTML-Page as simple "&" which is confusing. This is also at the default php.ini settings at "arg_separator.input". -------- If i set "arg_separator.output" to "&" or '&' in the php.ini, then i also get "&" with http_build_query(). ini_get('arg_separator.output') also returns "&" then. Test script: --------------- $data = array( 'secret' => 'value_secret', 'response' => 'value_response', ); echo ini_get('arg_separator.output') ."\n"; echo http_build_query($data) ."\n"; echo http_build_query($data, null, '&') ."\n"; -- Edit bug report at https://bugs.php.net/bug.php?id=73270&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73270&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73270&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73270&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73270&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73270&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73270&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73270&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73270&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73270&r=support Expected behavior: https://bugs.php.net/fix.php?id=73270&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73270&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73270&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73270&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73270&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73270&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73270&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73270&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73270&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73270&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73270&r=mysqlcfg

« previous php.doc.bugs (#14002) next »