Does anyone know how to edit the mail setting in the php.ini file by using Vagrant.
so I would ssh in terminal like so:
cd myapp
vagrant ssh
then what>?
Does anyone know how to edit the mail setting in the php.ini file by using Vagrant.
so I would ssh in terminal like so:
cd myapp
vagrant ssh
then what>?
Depending on your box, it might be
sudo nano /etc/php5/apache2/php.ini
then adopt you changes and restart with
sudo service apache2 restart
Without knowing what specific setting you want and what you want it changed to, you could try adding a shell script to the end of your Vagrantfile (in the "Local Scripts" area) to do a search and replace on the ini file.
#!/usr/bin/env bash
sed -i.bak s/STRING_TO_REPLACE/STRING_TO_REPLACE_IT_WITH/g /etc/php5/apache2/php.ini
Failing that, you can use ini_set in your project (preferably in a bootstrap) to change mail settings on a per-project basis.
In my case where I'm using scotchbox on vagrant, changing the php.ini
file won't reflect changes in phpinfo()
function output so I changed /etc/php5/apache2/conf.d/user.ini
file which could be a bare file or a file with few lines declaring php error display, I add my configurations here e.g. upload_max_filesize = 64M
Save the change and issue sudo service apache2 restart
. Viewed the phpinfo page and I can see the updated filesize.