How to create virtual hosts in MAMP?

While googling, I found these steps to easily create virtual hosts on MAMP: Open your console in mac and edit your hosts file like this sudo vim /etc/hosts This opens a system file that contains the following line: 127.0.0.1 localhost add your desired host name after local host: 127.0.0.1 localhost mysite.loc press ESC, then :wq! … Read more

PHP files are downloaded by browser instead of processed by local dev server (MAMP)

I’ve had a similar issue a couple times and renaming the file did not work for me. With OS X Lion I found the right configuration is this: <IfModule php5_module> AddType application/x-httpd-php .php <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> AddType application/x-httpd-php-source .phps <IfModule dir_module> DirectoryIndex index.php index.html </IfModule> </IfModule> The magic that made it work for … Read more

Having problems while try to install OAUTH with PECL in MAMP on mac OS lion

I know this is old but I found this question while having a similar issue. MAMP doesn’t ship with a bunch of the PHP sources Download MAMP components and configure URL: http://www.mamp.info/en/downloads/index.html (i.e. MAMP_components_2.0.2.zip) Unpack your MAMP_components_2.0.2.zip Identify your php-5.x.x.tar.gz file (where 5.x.x is your version of PHP) If you are using php > 5.4.10 … Read more