0
votes

I have installed nginx via puphpet and i am using laravel 4.1 with centos6.4. Laravael needs php apc module which i have included on puphpet congig.yaml file. after i do a vagrant up and I go to my site I get: connect() to unix:/var/run/php5-fpm.sock failed (111: Connection refused) while connecting to upstream error. I changed my nginx $fastcgi_pass = "/var/run/php5-fpm.sock" which didn't work. Then i did vagrant ssh and I ran service php-fpm restart after that it works. But I don't want to configure anything after i run vagrant up thats the purpose of puppet. Now my question is any way i can restart php-fpm when i do vagrant up or any other way to solve php apc problem. thanks in advance.

solution: after hours of researching i am able to solve the problem. I added this code:

 exec { "restart php-fpm":
    command    => "service php-fpm restart"
  }

in mainfeast.pp at the end of the php-fpm class. for me the line number is 485 or after the service.

1

1 Answers

1
votes

I'd much rather you submit an issue via github @ https://github.com/puphpet/puphpet/issues

That said, you can run any arbitrary code on $ vagrant up and $ vagrant provision via the exec-once and exec-always features mentioned on the frontpage.

That also said, this is a bug I'd love to fix, please submit a ticket!