Problem/Motivation
Drupal 8 fails to install, despite passing the Verify requirements check, if PHP 5.6.x is being used in any configuration other than Apache with mod_php5 if the PHP configuration always_populate_raw_post_data is not set to -1 in php.ini (the default is 0). When the install fails it gives the appearance of having stalled while initializing the Install Site stage of the installation, no errors or other messages indicating the failure or underlying cause are visible to the user without checking the PHP error logs.
In order to reproduce this problem do a clean install of D8 on Nginx or Apache with PHP being run as a FastCGI or regular CGI and with the PHP configuration directive always_populate_raw_post_data unset in php.ini or set to something other than -1.
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal-install_fails_on_PHP-5.6.x_when_not_using_mod_php-2485847-8-8.0.0-dev.patch | 1.31 KB | Beanjammin |
#2 | Screen Shot 2015-06-29 at 15.57.42.png | 294.29 KB | Anonymous (not verified) |
Comments
Comment #1
RobLoachComment #2
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedComment #3
cilefen CreditAttribution: cilefen commentedYou have got something wrong because the root .htaccess in Drupal 8 sets this very thing:
I am on 5.6.10 and I do not see this error on install.
Comment #4
cilefen CreditAttribution: cilefen commentedThis is a duplicate of #2456025: PHP warnings in PHP 5.6 because of always_populate_raw_post_data ini setting.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedI don't think these issues are same. It looks same, but in the previously linked issue when the user changes the php.ini value to explicitly set
always_populate_raw_data_post_data -1
it fixes the issue. But here while installation it doesn't fix the issue even after changing the php value.Moreover I got this while using Nginx, and that .htaccess is of no use to me.
Comment #6
cilefen CreditAttribution: cilefen commented@rajibmp Hi. You are saying that there is a warning message on install but that is different from, and not fixed by #2456025: PHP warnings in PHP 5.6 because of always_populate_raw_post_data ini setting?
By the way, if you are not already following the nginx group, here it is https://groups.drupal.org/nginx.
Comment #7
Beanjammin CreditAttribution: Beanjammin at emedia.ca commentedI believe the issue is that the .htaccess setting only works on Apache and only when using mod_php (because the setting is inside an
<IfModule mod_php5.c>
tag.I think it is important that the Verify Requirements stage of the install process warn users who are not using Apache and mod_php and who have not already configured php.ini to set always_populate_raw_post_data to -1 as the install will fail otherwise.
Comment #8
Beanjammin CreditAttribution: Beanjammin at emedia.ca commentedThe patch tests the always_populate_raw_post_data setting during the Verify Requirements step of the installation process and provides the user with information on how to edit the php.ini file if they are running PHP 5.6.0 or newer and always_populate_raw_post_data is not already set to -1.
The existing .htaccess file provides a work around for Apache with mod_php5, as noted above, however this does not work for other web servers, such as Nginx, or when PHP is used through a different interface, such as CGI. Using ini_set() in settings.php to set the value is not an available option during the install process.
Note: I believe this issue qualifies for the 'rc eligible' tag as it improves testing during the Verify Requirements stage of installation (though admittedly not in the test bot sense). I also believe this issue will catch up quite a few people as it will effect everyone who is not using mod_php5 on Apache who have not already changed always_populate_raw_post_data from its default setting in php.ini. The proposed solution does not effect any functionality or compatibility and should not be disruptive.
Comment #9
Beanjammin CreditAttribution: Beanjammin at emedia.ca commentedComment #10
Beanjammin CreditAttribution: Beanjammin at emedia.ca commentedLooking at the PHP 5.6 test failures it looks like the next step is to update the BrokenSetUpTest.php test so that it works with the patch.
Comment #11
devurandom CreditAttribution: devurandom commentedThis causes the symptoms of issue #2501851: Install Fails on WAMP (Drupal\Core\Config\UnmetDependenciesException: Configuration objects) to appear on my Lighttpd 1.4 installation with PHP-FPM 5.6.14.
Comment #12
Beanjammin CreditAttribution: Beanjammin at emedia.ca commentedCould someone with more test bot knowledge have a look at what's needed to get this patch to pass under PHP 5.6? Tests seem to be working for me locally.
Comment #13
cilefen CreditAttribution: cilefen commented@Beanjammin It seems like the 5.6 bots simply need the setting set!
Comment #14
kenorb CreditAttribution: kenorb commentedTested and the patch works fine.
Comment #24
quietone CreditAttribution: quietone at PreviousNext commentedPHP 5.6 is no longer supported and Drupal 8 is EOL.
Closing as outdated.