Can't find php.ini on mac VVV setup

358 views Asked by At

I've just started using VVV with virtualbox. I'm trying to run npm build on the woocoomerce development plugin but it's failing with Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)

This is expected as mentioned on their github page, the solution is to increase the memory_limit but I'm having a lot of trouble trying to find the right file.

So if I take a look at the phpinfo, it tells me that the Loaded Configuration File is /etc/php/7.2/fpm/php.ini but this file doesn't exist. The php directory does not exist inside of my /etc folder.

Am I missing something? Can't seem to solve this, I've edited a few other files and reloaded vagrant, but no luck. Would appreciate any help with this. Thanks.

2

There are 2 answers

0
dylzee On

In case any other Vagrant newbs find themselves in a this situation. The memory limit obviously needs to be changed on the vagrant container. Here is the information from the Vagrant documentation on how to access with SSH.

SSH You can SSH into the VM via the vagrant user with the command vagrant ssh. Running vagrant ssh-config will dump out an SSH config you can use to SSH directly into that VM without use of the vagrant command.

Otherwise it is enough to run this command:

ssh [email protected]

host = vvv.test username = vagrant password = vagrant

Also be sure to restart the server as suggest by PatricNox, but for me it was sudo service nginx restart not apache2.

4
PatricNox On

Running php --ini will show the path of the configuration file.

Do remember that this should be run inside the Virtualbox container.

cd project && vagrant ssh

$ php --ini 

For me, it's

$ sudo nano /etc/php5/apache2/php.ini

then adopt you changes and restart with

$ sudo service apache2 restart