Vagrant-LAMP-Stack icon indicating copy to clipboard operation
Vagrant-LAMP-Stack copied to clipboard

there's an error during vagrant up for a new environment. php5.conf modified

Open scourgen opened this issue 10 years ago • 6 comments

==> projectname: Configuration file `/etc/apache2/mods-available/php5.conf'
==> projectname:  ==> Modified (by you or by a script) since installation.
==> projectname:  ==> Package distributor has shipped an updated version.
==> projectname:    What would you like to do about it ?  Your options are:
==> projectname:     Y or I  : install the package maintainer's version
==> projectname:     N or O  : keep your currently-installed version
==> projectname:       D     : show the differences between the versions
==> projectname:       Z     : start a shell to examine the situation
==> projectname:  The default action is to keep your current version.
==> projectname: *** php5.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing libapache2-mod-php5 (--configure):
==> projectname:  EOF on stdin at conffile prompt
==> projectname:
==> projectname: Creating config file /etc/php5/cgi/php.ini with new version
==> projectname: Errors were encountered while processing:
==> projectname:  libapache2-mod-php5
==> projectname: E: Sub-process /usr/bin/dpkg returned an error code (1)
==> projectname: ---- End output of apt-get -q -y install php5-cgi=5.4.33-1~dotdeb.0 ----
==> projectname: Ran apt-get -q -y install php5-cgi=5.4.33-1~dotdeb.0 returned 100
==> projectname: [2014-10-13T17:47:54+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

scourgen avatar Oct 13 '14 17:10 scourgen

I have exactly the same problem! Also with updated VMs which worked before...

LeKlex avatar Oct 13 '14 22:10 LeKlex

Same here.

sanitz avatar Oct 19 '14 12:10 sanitz

Same here with a fresh install of VB, Vagrant, and ChefDK. Has anyone been able to resolve it?

grocky avatar Dec 05 '14 16:12 grocky

same here :(

tlartaud avatar Dec 12 '14 13:12 tlartaud

Same here...

ravbetsky avatar Mar 11 '15 09:03 ravbetsky

Possible fix. In this serverfault post someone recommends re-ordering the recipes in their cookbook. I tried editing the web_server.rb recipe and moved mod_php5 to after the php recipe. I needed to destroy and recreate the vagrant instance before this worked.

I also manually set the MySQL version in the Berksfile to get around the other issue that stopped install on MySQL. I also specified a version for PHP as well. However I don't think either of those fixed this particular issue.

Here is the git diff for the web_server.rb recipe.

diff --git a/site-cookbooks/app/recipes/web_server.rb b/site-cookbooks/app/recipes/web_server.rb
index 9aa61b6..4000775 100644
--- a/site-cookbooks/app/recipes/web_server.rb
+++ b/site-cookbooks/app/recipes/web_server.rb
@@ -8,14 +8,14 @@
 # Install Apache
 include_recipe "openssl"
 include_recipe "apache2"
-include_recipe "apache2::mod_php5"
 include_recipe "apache2::mod_rewrite"
 include_recipe "apache2::mod_ssl"

 # Install PHP
 include_recipe "dotdeb"
 include_recipe "dotdeb::php54"
 include_recipe "php"
+include_recipe "apache2::mod_php5"

 # Install PHP5 packages
 node['app']['php_packages'].each do |a_package|

cimocimocimo avatar Jun 11 '15 01:06 cimocimocimo