? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
8 Feb 2018

Pull Request for Issue #19033

Summary of Changes

In case output_buffering is set to Off we should show it set off currently we show it to be enabled.

Testing Instructions

  • upload joomla to the server
  • set php_value output_buffering Off via htaccess
  • check the output_buffering values showed in the installer and in the backed.

Expected result

Showed as off

Actual result

showed as on

Documentation Changes Required

none

avatar zero-24 zero-24 - open - 8 Feb 2018
avatar zero-24 zero-24 - change - 8 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2018
Category Administration com_admin Installation
avatar zero-24
zero-24 - comment - 8 Feb 2018

Here is a forward port into 3.9 as there is a additional check for that value: #19612

avatar sandewt
sandewt - comment - 8 Feb 2018

I have tested this item successfully on 712dfdd

XAMPP
PHP Version 7.1.9
Joomla! 3.8.5-rc

SEE ALSO COMMENT


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19611.

avatar sandewt sandewt - test_item - 8 Feb 2018 - Tested successfully
avatar sandewt
sandewt - comment - 8 Feb 2018

BEFORE:
screen shot 2018-02-08 at 20 55 53
screen shot 2018-02-08 at 20 55 49

AFTER:
screen shot 2018-02-08 at 20 58 25
screen shot 2018-02-08 at 20 55 59

AAN = ON
UIT = OFF


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19611.

(I did not change the php.ini)

avatar Quy
Quy - comment - 9 Feb 2018

It can be simplified as: is_numeric(ini_get('output_buffering'))

avatar zero-24 zero-24 - change - 10 Feb 2018
Labels Added: ?
avatar sandewt
sandewt - comment - 11 Feb 2018

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?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19611.

avatar zero-24
zero-24 - comment - 12 Feb 2018

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.

avatar Quy
Quy - comment - 12 Feb 2018

Yes. Possible values are On, Off and integer.

In the initial report, here is the suggested solution: setting->state = (bool) ob_get_length();

avatar zero-24
zero-24 - comment - 12 Feb 2018

Please check the last commit.

avatar sandewt
sandewt - comment - 13 Feb 2018

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.

avatar sandewt
sandewt - comment - 13 Feb 2018

I have tested this item successfully on 1882603

Joomla! 3.8.6-dev
PHP Version 7.1.9
XAMPP


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19611.

avatar sandewt sandewt - test_item - 13 Feb 2018 - Tested successfully
avatar zero-24
zero-24 - comment - 13 Feb 2018

Thanks @sandewt ?

avatar Quy
Quy - comment - 13 Feb 2018

I have tested this item successfully on 1882603

The round brackets are not necessary ($outputBuffering === 'On').


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19611.

avatar Quy Quy - test_item - 13 Feb 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Feb 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Feb 2018

Ready to Commit after two successful tests.

avatar mbabker mbabker - change - 26 Feb 2018
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: ?
avatar mbabker mbabker - close - 26 Feb 2018
avatar mbabker mbabker - merge - 26 Feb 2018
avatar ggppdk
ggppdk - comment - 26 Feb 2018

@zero-24
@mbabker

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

avatar zero-24
zero-24 - comment - 26 Feb 2018

PR is done here: #19791

Add a Comment

Login with GitHub to post a comment