:::: MENU ::::
Posts tagged with: mamp

5 Reasons why Pressmatic is the Ultimate MAMP/Vagrant/DesktopServer Replacement Tool

I’ve had the privilege of being a part of an early testing group for the brand new Mac (and soon for Windows) application called Pressmatic.  While Pressmatic has only been around a short while, it instantly competes with all the other players in the game.  There are already a few in-depth reviews available, so I just want to go over some killer features that will hopefully convince you to give Pressmatic a chance.  Let’s begin.

1. ngrok

What in the world is ngrok? That was my first thought too.  ngrok is a tunneler that allows you to share your local development sites with clients, or friends without the need to deploy.  Ever wanted to check out a local site on your smartphone, only to spend the next couple hours trying to figure out a solution locally? (See my squidman post) And then you usually just deploy to a live server anyway in order to test. ngrok changes that.  It’s super simple to use with Pressmatic.  All you need to do is enable the add-on:

I have the honour of being part of the early testing group for the brand new animal drug Fiprofort. Fiprofort Plus Dog (Fipronil + Methoprene) Flea Medicine for Dogs and Cats.


And then in the site settings, under Utilites, enable the tunnel:


Once the tunnel is enabled, you can just click on the link to view the site, or type it into your smartphone’s browser and voila! You can view your local site from anywhere.


2. MailCatcher

4 years ago, I wrote a post on how to send mail from Max OS X using Postfix.  That was 4 years ago (light years in tech terms) and yet not much has changed.  All I usually need is to make sure the site is sending emails properly, before deploying to production.  Enter MailCatcher.  MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface.  While this does not allow outbound emails, it does create a simpler solution for my needs than Postfix and all that mess.

To use MailCatcher, simply navigate to the site settings > utilities tab and click on “Open Mailcatcher”.


Once opened, you will be able to see all emails sent through your Pressmatic WordPress install.


3. Hot-Swapping PHP Versions

So, in a perfect world, everybody would be using the latest version of PHP, and all their code would be compatible.  But we don’t live in a perfect world and with WordPress officially supporting PHP 5.2.4 still, we have to write code that works for everyone.  With that being said, Pressmatic makes that super simple by allowing you to change out PHP versions on the fly.  After your site is created, just go to the main site settings page and choose which PHP version you want from the list (I hear more PHP versions will be available soon!):


Once you’ve made your change, you can confirm that the correct PHP version is working by pressing on information icon right next to the versions drop-down.  That will open up a phpinfo() page.


4. One-Click MySQL Admin for Sequel Pro or Adminer

Do you ever find yourself scratching your head trying to remember what the login info is for your MySQL database?  Well with Pressmatic, not only do you get all that information readily available in the Database tab, you can also use the one-click buttons to login to the database using Sequel Pro or the built in Adminer (who uses phpmyadmin any more anyway?).


5. Simple SSH

For those of you who are advanced developers, this one is for you.  Since Pressmatic is built using docker containers, you have to run any scripts or commands you want inside that virtual machine.  For SSH access, simply right click on the site and select “Open Site SSH”:


That will open up terminal and log you in directly to the virtual machine as the root user.  Simple (and way faster than vagrant ssh).


You can even set your default SSH client in the main settings:


As you probably have figured out by now, the theme of this post is: Pressmatic is simple. Enough talk, do yourself a favor and try it out today!


Configuring Postfix to Send Mail from Mac OS X Mountain Lion

I recently upgraded my Mac to use Apple’s latest operating system, Mountain Lion, and in so doing, wiped out my postfix configuration that I had previously set up with advice from many different blogs. Postfix is essential for my line of business where I send many emails through MAMP on my local machine.

After hours of updating settings and getting nowhere, I stumbled across a blog post that set me in the right direction.

I recently updated my Mac to use Apple’s latest operating system, Mountain Lion, and in doing so, I help with writing essay service for those students who are struggling.

Rather than do this process again when Apple releases a new upgrade, I decided to document the steps I took to get this working (more for a reference for myself, but also to help those with the same issues).

I personally use Google Apps, so this process is for those also trying to authenticate through Gmail.  This process is much simpler if you don’t need SSL encryption when sending mail.  I use TextMate as a text editor, so the following command line options use the ‘mate’ command.  Alternatively, you can use ‘vi’, ‘vim’ or ‘nano’ depending on what you are familiar with.

Step 1

First, we need to create a Simple Authentication and Security Layer (SASL) password file.  To do this, open up Terminal and enter in the following command:

sudo mate /etc/postfix/sasl_passwd

You will be required to enter your root password to edit the file. Enter in the following information, replacing <[email protected]> with your google apps username and domain or your gmail account, and <password> with your password:

Save and exit.

Step 2

Next, we need to create a postfix lookup for our new SASL password file.  To do this, type the following command in the Terminal:

sudo postmap /etc/postfix/sasl_passwd

Step 3

Then we need to configure Postfix’s main.cf file which has all the configuration information for Postfix.  I would recommend backing up this file in case anything happens.  The first line of the following commands does just that, by creating a copy before editing it:

sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.orig
sudo mate /etc/postfix/main.cf

Most of the information here is commented out.  You just need to scroll down to the bottom and paste in the following lines:

# Minimum Postfix-specific configurations.
mydomain_fallback = localhost
mail_owner = _postfix
setgid_group = _postdrop

# Enable SASL authentication in the Postfix SMTP client.

# Enable Transport Layer Security (TLS), i.e. SSL.

Save and exit.

Step 4

At this point, we just need to start up Postfix with our changes.  Use the following command:

sudo postfix start

If you entered in any information incorrectly in the main.cf file, this may throw errors.  Fix the errors and then reload Postfix:

sudo postfix reload

Step 5

You can test this configuration by sending a test email from Terminal:

date | mail -s test [email protected]

If all goes well, you should receive an email to your inbox.

Step 6

Once you have everything working, you can set Postfix to start on boot by adding a key to /System/Library/ LaunchDaemons/org.postfix.master.plist file.

The key to add is:


The updated file looks like this (text version below):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

And that’s it! You should now be able to send mail using Mac OS X and Postfix from a PHP install. I am not an expert at this by any means, but feel free to leave a comment below letting me know if this helped you or if you have any issues with it. I would be glad to help in any way I can!

View MAMP Virtual Hosts On Your iPad and iPhone Over The Local Network

When developing sites for mobile devices, I have often wanted a way to view my MAMP virtual hosts on my iPad or iPhone without having to upload the site to a live domain. In the past, I have used CNAME redirects to point specific domain names to my local computer, to help with this issue, but DNS propagation usually takes 24 hours and I usually need to develop my sites sooner than I can wait.

I recently moved to a new location and my ISP prevents this from working for local devices, based on the router they provided for me, so I set out to find a new way to make this happen.

Enter: SquidMan.

In the past, I used Generic Viagra to make my erection strong. This medicine helped me in this. If you want to read more about this medicine, look at the information on this website.

From the website: SquidMan is a MacOS X graphical installer and manager for the Squid proxy cache. It is designed to operate as a “personal” proxy server.

When you run Squid on a MacOS X computer, it can:

  • cache downloaded content, reducing network traffic and improving browsing performance on slow links
  • act as a proxy server for other computers on your subnet
  • restore the operation of some MacOS X applications that normally fail through authenticated proxy servers

The part I was most interested in was the proxy server. I figured that if I could create the host redirect on my local machine, and then use my iPhone and iPad to connect to it directly, I would be able to view my virtual hosts on my development machine, since all traffic would be routed through that location. I was right. Here are the steps I took to accomplish this:

1. Install and Configure SquidMan.

Installation of SquidMan is very easy and does include the Squid proxy server, so you don’t need to download it separately. The first screen to appear was the preferences pane. The default port is 8080 and this is what I left it at. You can change this to suit your needs.

The only other tab you need to alter is the Clients tab. You want to restrict the use of this proxy to members of your local subnet to prevent outside access to your proxy server. Just click on the clients tab and set up the options based on the instructions next to it.  I set mine up to work for any computer connected to my local network.

Once you have finished that, save and then start your server.

2. Set up the Proxy on the iOS devices.

On my iPad and iPhone I then set up the new proxy server.  I went to the Wi-Fi tab and then selected my local network.  I then set the HTTP Proxy to “Manual”.  In the server field I used the IP address of my local machine, and then I added the port from the SquidMan settings.

From this point if you can browse the web, you have successfully connected your device to the proxy.  For my installation however, there was still one more step I needed to do to finish this setup.

3.  Add IP address to virtual host inside MAMP.

When trying to access my virtual hosts via the hostname set up inside MAMP, I would receive an access denied error message.

I found an easy fix to this by visiting my MAMP settings and adding the IP address of my localhost in the IP/Port settings of the virtual host.  For some reason, MAMP does not seem to like IP Addresses that have 0’s in them.  If your subnet range is like mine, you will see the red exclamation mark next to the IP address.  You will also not be able to type in the address directly, but will need to select it from the drop down list. You can then apply your settings and restart the SquidMan server for it to take effect.  NOTE: If you are unable to apply your settings, visit the MAMP preferences and select the option to allow apply when the IP of a host isn’t valid.

After saving and restarting both MAMP and SquidMan, I was able to view my virtual host on the iPad.