How to automatically enable php extensions in Homestead on vagrant up

前端 未结 3 1182
难免孤独
难免孤独 2021-02-02 17:26

Im using Laravel 5.3 in Homestead with Vagrant 1.8.7 running on VirtualBox.

I have need to enable some php extensions.

I know that I could ssh into the box and

3条回答
  •  粉色の甜心
    2021-02-02 18:00

    you should first log onto Homestead server using ssh ( probably you know this already - "vagrant ssh").

    then go to "/etc/php/7.0/fpm/" there is also for cli on this location "/etc/php/7.0/cli/" edit it with "sudo vi php.ini" ( esc and :wq to save changes ).

    then you should restart nginx: "sudo nginx -s reload"

    and after that, restart php-fpm: "sudo service php7.0-fpm restart"

    if you are not sure if it is php 5.x or 7.x on your homestead, use "find / -name php.ini" to find php.ini, you will probably get 2 or 3 results.

提交回复
热议问题