You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be great to provide terminatur.mamp.inc to get this to work on MAMP/MAMP PRO. Looks like checking to see if the user is running MAMP and adding vhosts to OSX Apache is easy enough: http://foundationphp.com/tutorials/vhosts_mamp.php
Then want to provide some sort of identification function into _terminatur_get_environment() in terminatur.drush.inc presumably just checking whether the app exists or not?
I'm not sure how to detect if MAMP or MAMP PRO is in operation on the user's system.
This is impactful, because while both versions point to the same binaries, each has their own config files for Apache, and this will determine how the vhosts get created.
We should just hammer both with our own include in httpd.conf and write to that:
Include /path/to/our/httpd-termintur.conf
We can likely use this same file outside of MAMP too.
ports
The user can configure quite a bit in the App, such as the user/group running services (myuser/mygroup or www/mysql) and the ports they run on (Apache/MySQL/SSL: 8888/8889/8890, 80/3306/443, or custom with PRO only)
default webroot
Default MAMP webroot is
/Applications/MAMP/htdocs
but there is no default for MAMP PRO, the user can navigate the file system
we may need to parse the httpd.conf file
Apache
It's not trivial to get either flavor of mamp to restart via the command line. This should, but does not work:
I've tried over the years to get command-line control of apache to work, but it never really took. MySQL is no problem; it's just Apache that's problematic. We could prompt the user to restart MAMP services via the control panel once the vhost is created.
MAMP stores its config in a writeable file at
/Applications/MAMP/conf/apache/httpd.conf
but MAMP PRO uses templates
will let you connect to MySQL, but if the user has changed the root password (this is encouraged by the UI), we'll want to make the prompt clear
PHP & Drush support in MAMP
While we want to assume that the user has their Drush set up under MAMP, this can prove tricky.
These are paths to the multiple PHP binaries. MAMP can switch between these through the UI. There are different versions of PHP depending on the version of MAMP.
Drush, and by extension Terminus and Termintur will want to find the webserver's PHP binary. The command line won't connect there for the user unless declared in their $PATH.
Would be great to provide terminatur.mamp.inc to get this to work on MAMP/MAMP PRO. Looks like checking to see if the user is running MAMP and adding vhosts to OSX Apache is easy enough:
http://foundationphp.com/tutorials/vhosts_mamp.php
Can use https://github.com/kalamuna/terminatur/blob/master/environment/terminatur.default.inc as a template. Just need to replace default with mamp and edit the constants appropriately. Can probably copy the etc/hosts and server restart commands from kalastack.inc and model after the vhost ones but adapted for the above link.
Then want to provide some sort of identification function into _terminatur_get_environment() in terminatur.drush.inc presumably just checking whether the app exists or not?
@andrewmallis might want to give it a shot?
The text was updated successfully, but these errors were encountered: