[PHP-BUG] Bug #74322 [NEW]: HTTP://
[email protected] ("admin at angosso dot net")
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
From: admin at angosso dot net
Operating system: Linux
PHP version: 7.0.17
Package: Apache2 related
Bug Type: Bug
Bug description: HTTP://
Description:
------------
array apache_response_headers ( void )
Test script:
---------------
<?php
print_r(apache_response_headers());
?>
Expected result:
----------------
<?php
$headers = apache_request_headers();
foreach ($headers as $header => $value) {
echo "$header: $value <br />\n";
}
// If no header has been sent, send it
If (! Headers_sent ()) {
Header ('Location: http://www.example.com/');
Exit;
}
// Here is an example of using the optional file and line parameters
// available since PHP 4.3.0. Note that $ filename and $ linenum are
// transmitted for later use. Do not assign them before using them.
If (! Headers_sent ($ filename, $ linenum)) {
Header ('Location: http://www.example.com/');
Exit;
// You will probably trigger an error here
} Else {
Echo "The headers have already been sent from the $ filename
file to the $ linenum \ n" line.
"It is therefore impossible to redirect
automatically, so please
Click <a href=\"http://www.example.com\"> here
</a>. \ N ";
Exit;
}
?>
--
Edit bug report at https://bugs.php.net/bug.php?id=74322&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74322&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74322&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74322&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74322&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74322&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74322&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74322&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74322&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74322&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74322&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74322&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74322&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74322&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74322&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74322&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74322&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74322&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74322&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74322&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74322&r=mysqlcfg