Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended Settings Output Buffering is incorrect #19033

Closed
RichardPillay opened this issue Dec 10, 2017 · 3 comments
Closed

Recommended Settings Output Buffering is incorrect #19033

RichardPillay opened this issue Dec 10, 2017 · 3 comments

Comments

@RichardPillay
Copy link

RichardPillay commented Dec 10, 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.

@brianteeman
Copy link
Contributor

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

@brianteeman
Copy link
Contributor

Sorry I just saw that you already stated that

@zero-24
Copy link
Contributor

zero-24 commented Feb 8, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants