php.ini variable always_populate_raw_post_data should not set to 0
Closed this issue · 3 comments
I see that right now used next configuration /etc/php5/cli/php.ini
, instead of configuration defining in the roles/ansible-role-php/templates/php.ini.j2
CLI configuration do not have value for always_populate_raw_post_data
, and using reinstall.yml
for drupal 8 with rest
module, we can see error:
exception 'Drupal\Core\Installer\Exception\InstallerException' with [error]
message 'always_populate_raw_post_data PHP setting: Not set to -1.
The always_populate_raw_post_data PHP setting should be set to -1 in
PHP version 5.6. Please check the <a
href="https://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data">PHP
manual</a> for information on how to correct this.' in
/var/www/docroot/core/includes/install.core.inc:2173
This happen because module rest
has requirements in the install file.
@Sanchiz know how to fix this issue on the server for dev builds.
@DmitryDrozdik this is already fixed within latest version https://github.com/propeoplemd/cibox/blob/master/contrib/ansible-role-php/templates/php.ini.j2#L88
The contrib role taking care about web config only... Not about a cli
This is what helped me:
vagrant@precise64:~$ php -i | grep php\.ini
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
vagrant@precise64:~$ cd /etc/php5/cli/
vagrant@precise64:/etc/php5/cli$ sudo chmod 666 php.ini
vagrant@precise64:/etc/php5/cli$ vi php.ini
(find and uncomment the always_populate_raw_post_data option, save)
vagrant@precise64:/etc/php5/cli$ sudo chmod 644 php.ini