Req #52555 [Com]: Headers_List not returning HTTP Status Code
Edit report at https://bugs.php.net/bug.php?id=52555edit=1 ID: 52555 Comment by: dragoonis at gmail dot com Reported by:dragoo...@php.net Summary:Headers_List not returning HTTP Status Code Status: Closed Type: Feature/Change Request Package:*Web Server problem PHP Version:5.3.3 Assigned To:dragoonis Block user comment: N Private report: N New Comment: Hey jorrit at ncode dot nl, If you see the following link, the current implementation of the function http_response_code is the following: /* {{{ proto long http_response_code([int response_code]) 284Sets a response code, or returns the current HTTP response code */ http://lxr.php.net/opengrok/xref/PHP_5_4/ext/standard/head.c#283 Hope this helps. Regards, Paul Dragoonis. Previous Comments: [2011-09-27 08:29:49] jorrit at ncode dot nl It would be nice if the status code could also be set using this function. As mentioned in another comment, the current method of using header() is kind of a hack and the developer needs to provide the irrelevant HTTP version in order to set the response code. [2010-12-11 14:58:08] marc-bennewitz at arcor dot de Why it's not committed to a branch ? When it will be available ? [2010-12-11 14:47:55] paj...@php.net It is committed in trunk (svn trunk). [2010-12-11 13:37:05] marc-bennewitz at arcor dot de Hi, I can't find the function http_response_code within 5.3.4 and no documentation about it or a message on changelog of 5.3.4. What does it mean Committed to 5.3.99 ? How many years we have to wait :/ It would be very helpful to have some publish time/version. Greetings, Marc [2010-08-09 15:11:17] ka...@php.net Committed to 5.3.99 The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=52555 -- Edit this bug report at https://bugs.php.net/bug.php?id=52555edit=1
#48719 [NEW]: parse_ini_file scanner more sanitation
From: dragoonis at gmail dot com Operating system: Linux (all affected) PHP version: 5.3.0RC4 PHP Bug Type: Unknown/Other Function Bug description: parse_ini_file scanner more sanitation Description: The sanitation on the new parse_ini_file parameter names scanner mode doesn't check if a valid scanner mode has been passed. The patch has been applied below the if() for if (filename_len == 0) {. The fix can be found here: http://digiflexdev.com/php/parse_ini_file_fix.txt The .phpt file for this is below http://digiflexdev.com/php/parse_ini_file_test.txt I realise the .phpt file is wrong somewhat this is my first bug report and the .phpt file just shows. The same issue applies to parse_ini_string, respectively. Reproduce code: --- ?php print_r(parse_ini_file('file.ini', false', INVALID_SCANNER_MODE)); Make a file named file.ini with the following in it. data = 2 Expected result: I'd expect to see a notice. and default to ZEND_INI_SCANNER_NORMAL which is what my fix does. Actual result: -- Warning: parse_ini_file() expects parameter 3 to be long, string given in /home/pdragoonis/php-5.3.0/sapi/cli/pd/parse_ini_file_test.php on line 3 -- Edit bug report at http://bugs.php.net/?id=48719edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48719r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48719r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48719r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48719r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48719r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48719r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48719r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48719r=needscript Try newer version: http://bugs.php.net/fix.php?id=48719r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48719r=support Expected behavior: http://bugs.php.net/fix.php?id=48719r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48719r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48719r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48719r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48719r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48719r=dst IIS Stability: http://bugs.php.net/fix.php?id=48719r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48719r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48719r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48719r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48719r=mysqlcfg
#48719 [Opn]: parse_ini_file scanner more sanitation
ID: 48719 User updated by: dragoonis at gmail dot com Reported By: dragoonis at gmail dot com Status: Open Bug Type: Unknown/Other Function -Operating System: Linux (all affected) +Operating System: All PHP Version: 5.3.0RC4 New Comment: Changed OS to 'All' Previous Comments: [2009-06-29 13:13:02] dragoonis at gmail dot com Description: The sanitation on the new parse_ini_file parameter names scanner mode doesn't check if a valid scanner mode has been passed. The patch has been applied below the if() for if (filename_len == 0) {. The fix can be found here: http://digiflexdev.com/php/parse_ini_file_fix.txt The .phpt file for this is below http://digiflexdev.com/php/parse_ini_file_test.txt I realise the .phpt file is wrong somewhat this is my first bug report and the .phpt file just shows. The same issue applies to parse_ini_string, respectively. Reproduce code: --- ?php print_r(parse_ini_file('file.ini', false', INVALID_SCANNER_MODE)); Make a file named file.ini with the following in it. data = 2 Expected result: I'd expect to see a notice. and default to ZEND_INI_SCANNER_NORMAL which is what my fix does. Actual result: -- Warning: parse_ini_file() expects parameter 3 to be long, string given in /home/pdragoonis/php-5.3.0/sapi/cli/pd/parse_ini_file_test.php on line 3 -- Edit this bug report at http://bugs.php.net/?id=48719edit=1
#48719 [Asn]: parse_ini_file scanner more sanitation
ID: 48719 User updated by: dragoonis at gmail dot com Reported By: dragoonis at gmail dot com Status: Assigned Bug Type: Unknown/Other Function Operating System: All PHP Version: 5.3.0RC4 Assigned To: kalle New Comment: Firstly, the original reproduce code has a syntax error in it however heres what happens if you pass a valid constant to the function which isn't ZEND_INI_SCANNER_NORMAL and ZEND_INI_SCANNER_RAW ?php error_reporting(E_ALL); defie('MODE', 3); print_r(parse_ini_file('file.ini', false, MODE)); The fix outputs the following. Notice: parse_ini_file(): Invalid scanner mode supplied. Defaulting to INI_SCANNER_NORMAL in /home/pdragoonis/php-5.3.0/sapi/cli/file.php on line 5 Array ( [data] = 2 ) Previous Comments: [2009-06-29 13:15:59] dragoonis at gmail dot com Changed OS to 'All' [2009-06-29 13:13:02] dragoonis at gmail dot com Description: The sanitation on the new parse_ini_file parameter names scanner mode doesn't check if a valid scanner mode has been passed. The patch has been applied below the if() for if (filename_len == 0) {. The fix can be found here: http://digiflexdev.com/php/parse_ini_file_fix.txt The .phpt file for this is below http://digiflexdev.com/php/parse_ini_file_test.txt I realise the .phpt file is wrong somewhat this is my first bug report and the .phpt file just shows. The same issue applies to parse_ini_string, respectively. Reproduce code: --- ?php print_r(parse_ini_file('file.ini', false', INVALID_SCANNER_MODE)); Make a file named file.ini with the following in it. data = 2 Expected result: I'd expect to see a notice. and default to ZEND_INI_SCANNER_NORMAL which is what my fix does. Actual result: -- Warning: parse_ini_file() expects parameter 3 to be long, string given in /home/pdragoonis/php-5.3.0/sapi/cli/pd/parse_ini_file_test.php on line 3 -- Edit this bug report at http://bugs.php.net/?id=48719edit=1
#48719 [Asn]: parse_ini_file scanner more sanitation
ID: 48719 User updated by: dragoonis at gmail dot com Reported By: dragoonis at gmail dot com Status: Assigned Bug Type: *General Issues Operating System: * PHP Version: 5.3.0RC4 Assigned To: kalle New Comment: After more learning of how things work i've made the ZendEngine2 .patch file and uploaded it to the following location. http://digiflexdev.com/php/48719.patch Previous Comments: [2009-06-29 13:44:40] dragoonis at gmail dot com Firstly, the original reproduce code has a syntax error in it however heres what happens if you pass a valid constant to the function which isn't ZEND_INI_SCANNER_NORMAL and ZEND_INI_SCANNER_RAW ?php error_reporting(E_ALL); defie('MODE', 3); print_r(parse_ini_file('file.ini', false, MODE)); The fix outputs the following. Notice: parse_ini_file(): Invalid scanner mode supplied. Defaulting to INI_SCANNER_NORMAL in /home/pdragoonis/php-5.3.0/sapi/cli/file.php on line 5 Array ( [data] = 2 ) [2009-06-29 13:15:59] dragoonis at gmail dot com Changed OS to 'All' [2009-06-29 13:13:02] dragoonis at gmail dot com Description: The sanitation on the new parse_ini_file parameter names scanner mode doesn't check if a valid scanner mode has been passed. The patch has been applied below the if() for if (filename_len == 0) {. The fix can be found here: http://digiflexdev.com/php/parse_ini_file_fix.txt The .phpt file for this is below http://digiflexdev.com/php/parse_ini_file_test.txt I realise the .phpt file is wrong somewhat this is my first bug report and the .phpt file just shows. The same issue applies to parse_ini_string, respectively. Reproduce code: --- ?php print_r(parse_ini_file('file.ini', false', INVALID_SCANNER_MODE)); Make a file named file.ini with the following in it. data = 2 Expected result: I'd expect to see a notice. and default to ZEND_INI_SCANNER_NORMAL which is what my fix does. Actual result: -- Warning: parse_ini_file() expects parameter 3 to be long, string given in /home/pdragoonis/php-5.3.0/sapi/cli/pd/parse_ini_file_test.php on line 3 -- Edit this bug report at http://bugs.php.net/?id=48719edit=1