?
avatar RichardPillay
RichardPillay
10 Dec 2017

Near the end of installation, you are presented with the Recommended Settings. The value presented for Output Buffering is incorrect. The starting point for tracing this would be near Line 376 of installation\model\setup.php - search for $setting->label = JText::_('INSTL_OUTPUT_BUFFERING');

This value presented is simply the setting from the main PHP config file, and does not represent the current local value. Because of the incorrect value presented, it causes a major waste of time while you search for an issue that does not exist.

Steps to reproduce the issue

This relates to Apache running under Linux. I'm running a standard installation of 16.04 LTS.

In the main PHP settings (for me this is /etc/php/7.0/apache2/php.ini ), my value for output_buffering is 4096. This is the value I prefer for general use.

Since Joomla prefers the Output Buffering to be off, I have used the Apache2 .htaccess file to turn it off for the Joomla scripts. Running phpinfo() from Joomla's index.php confirms the value is off.

Expected result

The installation script should supply the current value of the setting, not the the value taken from the main PHP settings file.

Actual result

The installation script says Output buffering is On, even though phpinfo() run from both the root and installation folders of the Joomla installation says it is off.

Possible fix

Rather than reading the setting from the config file, you could try checking the state of the buffer as in the code below:

    // Check for output buffering.
    $setting = new stdClass;
    $setting->label = JText::_('INSTL_OUTPUT_BUFFERING');
    //$setting->state = (bool) ini_get('output_buffering');
    $setting->state = (bool) ob_get_length();
    $setting->recommended = false;
    $settings[] = $setting;

System information (as much as possible)

Ubuntu 16.04 LTS, kept updated.
Apache2, PHP7.0 running as an Apache module, and Postgres, all installed using the standard package manager.
I don't believe the version numbers would affect the issue, so I haven't bothered looking them up.

avatar RichardPillay RichardPillay - open - 10 Dec 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Dec 2017
avatar RichardPillay RichardPillay - change - 10 Dec 2017
The description was changed
avatar RichardPillay RichardPillay - edited - 10 Dec 2017
avatar brianteeman
brianteeman - comment - 22 Dec 2017

Can you confirm that if you run phpinfo from the installation folder it also says it is off?

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Dec 2017
Status New Information Required
avatar brianteeman
brianteeman - comment - 23 Dec 2017

Sorry I just saw that you already stated that

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Dec 2017
Status Information Required Discussion
avatar zero-24
zero-24 - comment - 8 Feb 2018

@RichardPillay @brianteeman I have just opend two PR's fixing that problem in 3.8: #19611 & 3.9: #19612 please test and report. Thanks.

As there are PR's I'm going to close here.

avatar zero-24 zero-24 - change - 8 Feb 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-02-08 06:12:31
Closed_By zero-24
avatar zero-24 zero-24 - close - 8 Feb 2018

Add a Comment

Login with GitHub to post a comment