Open dkingofpa opened 12 years ago
Need to do more testing with some current projects before closing the issue.
The php cookbook adds a cli php.ini that we can change. There are php.ini files for apache2 and cgi that we don't have any control over. The workaround of adding a cgi.php.ini file to the ext_conf_dir doesn't actually work because the ext_conf_dir is scanned by apache2, cgi, and cli. We don't want cgi.php.ini to be included with the cli environment. Need to try another approach.
@pearcec mentioned that placing a vagrant.php.ini would probably be the best solution as that is the standard way to override the package provided php.ini files. The fact that it would be included by the apache2, cgi, and cli environments isn't something to be concerned about in this project.
I've been trying to come up with a better solution to at least directly expose some php.ini directives in a Vagrantfile. In most cases, it would be nice to control php.ini besides the cli version which seems to be the default in this cookbook. Here is an attempt at generalizing the conf type of the php.ini file which is to be used (on debian for now).
I feel like this gives better control of directives over COOK-543 :
https://github.com/bensweet/php/commit/578f7f567ad40660b623039a2f8f8e0d42bde6b4
We can't override any of the php directives in Opscode's php cookbook because all the php.ini templates are hard-coded. But what we can do, is place our own php.ini in the ext_conf_dir with overridden values. Config files placed in that directory are loaded by php. For example, there are times we need to bump up php's memory_limit.
See opscode ticket COOK-543 and one attempt at a fix.