User tests: Successful: Unsuccessful:
Pull Request for Issue #19033
In case output_buffering
is set to Off
we should show it set off currently we show it to be enabled.
php_value output_buffering Off
via htaccessShowed as off
showed as on
none
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_admin Installation |
I have tested this item
XAMPP
PHP Version 7.1.9
Joomla! 3.8.5-rc
SEE ALSO COMMENT
AAN = ON
UIT = OFF
(I did not change the php.ini)
It can be simplified as: is_numeric(ini_get('output_buffering'))
Labels |
Added:
?
|
When I apply the patch and do the test, the result is as indicated above.
But when I set then the output buffering in the .htaccess from Off to On.
The result is as follows:
See: System Information > PHP Settings
The output buffering stays Off, while I would expect On.
Seems wrong to me. (!?)
See: System Information > PHP Information
The output buffering changes from Off to On (local value).
This seems correct to me.
Additional note:
I have to change the setup.php file manually. Because Joomla! is not yet installed. So I can not use the patch tester.
Is there a simple way to test?
See: System Information > PHP Settings
The output buffering stays Off, while I would expect On.
Seems wrong to me. (!?)
Was that also the case before last changes to the patch?
Is there a simple way to test?
If you install a dev version of joomla (!= stable; Like the nighly builds or a staging zip) you are not required to delete the install folder (just skip the warning) so you can patch files there too with the patchtester ;) Just remove the configuration.php to restart the install.
Yes. Possible values are On
, Off
and integer.
In the initial report, here is the suggested solution: setting->state = (bool) ob_get_length();
Please check the last commit.
See: System Information > PHP Settings
The output buffering stays Off, while I would expect On.
Seems wrong to me. (!?)
I did a new test.
Strange, I can not repeat this now !!!???
Oops, I tested with the new patch.
So it's OK.
I have tested this item
Joomla! 3.8.6-dev
PHP Version 7.1.9
XAMPP
I have tested this item
The round brackets are not necessary ($outputBuffering === 'On')
.
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-26 03:15:25 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
This PR is wrong, any non_numeric (non-integer) value returned by
ini_get('output_buffering')
means that output buffering is OFF
If it returns an non-integer text , like
'On'
'on'
'Onf'
'Offff'
then it means that output buffering is OFF
e.g. setting via .htaccess
php_value output_buffering 4096
var_dump(ini_get('output_buffering')) . '<br>';
you get
string(4) "4096"
Boolean setting
php_flag output_buffering on
you get
string(1) "1"
Boolean setting
php_flag output_buffering off
you get
string(1) "0"
Finnally to see that any non-numeric (text value) returned by ini_get('output_buffering')
means output buffering is OFF
Do the following test
Bad text value, so that ini_get('output_buffering')
returns 'On'
php_value output_buffering On
Create file test.php and run it
<?php
echo 'test';
header("Location: http://www.php.net");
exit;
If output buffer is ON you get to redirected to new location, if it is OFF you get error headers already sent
Here is a forward port into 3.9 as there is a additional check for that value: #19612