A TEXT POST

WHMCS on PHPFog with MailGun

So here we’ll hook up mail to WHMCS on PHPFog using MailGun. After seeing the MailGun interface, if you haven’t before, you’ll be like Grate Monkey what? I was.

This is the part when you should read the last 2 WHMCS & PHPFog Articles, if you haven’t already.

So if you know what PHPFog is I assume you know your way around the interface. So once you’ve enabled the MailGun Addon you’ll get some pretty convenient Environment Variables. This is the quickest way to your SMTP details:

So I took these…

 

… and put them here (in WHMCS)…

Yes that’s right. I blurred some stuff out of the email address. Just because my little testing WHMCS can’t afford to send money to Nigerian Princes, doesn’t mean they’re going to stop emailing and asking.

Yay, you have outbound mail. The inbound mail is just as easy.

In PHPFog, under Addons, click manage MailGun and you’ll get to the MailGun admin interface.

Here you can add mailboxes for all your WHMCS departments…

… and then create your WHMCS departments with those settings…

 

You’ll also notice this…

You will have to add that second line to a cronjob like in the “WHMCS on PHPFog II” article

The End

Donations accepted in beer ONLY! :)

A TEXT POST

WHMCS on PHPFog II, The Cron

I completely forgot to mention how to sort out the cron job required by WHMCS.

As per the PHPFrog documentation cron jobs can be done using two providers:

The latter didn’t load for me, probably just my fantastic internet connection.

So I went and got an account at mywebcron-com.loopiasecure.com. Fantastically simple signup, just linked it to my Google account (but they have other linking options too).

The system is really everything you need. Nothing flashy, it works and it’s free.

So…

WHMCS’s “cron.php” is located at “WHMCSROOT/admin/cron.php”. So the URL would be like “http://app.phpfrog.com/admin/cron.php” and set it to run once a day.

… and you’re done.

A TEXT POST

New WHMCS Freeradius Template

The custom WHMCS Freeradius Server module always starts from a template and the features you need are added.

I’ve got a new template with updated code and this:

Let you customers choose their own bandwidth & speed limits

-

Drop me a line if you’re curious. steven@secondimpression.net or on skype: “steven_eksteen_si3”

A TEXT POST

WHMCS on PHPFog

Well, this is how I did it…

PHPFog makes me almost like PHP again or rather like working with PHP. Managing  infrastructure is, for me at least, like sitting in a room full of Man United fans after they have just won a game, painful. Maybe PaaS has just made me lazy.

With WHMCS & PHPFog you can get going for about $16 for WHMCS & $30 for PHPFog Per Month. You could use PHPFog’s free shared cloud for testing.

-

I’ve created my app…

Before cloning your assigned git repo and while you’re still on the PHPFog interface, just add the WHMCS permissions quick. Like so…

You can now clone your repo.

Once you have a local copy delete the “index.php” and copy the WHMCS files in.

Rename the “configuration.php.new” file to “configuration.php”. Yes, it’s supposed to be a blank file.

You can now go ahead and send the files to your app…

$ git .

$ git commit -am “Fresh WHMCS install files”

$ git push origin master

You will now need your MySQL settings that PHPFog created for you with your app

You can now just goto your app URL and install WHMCS like normal.

Once installed you will be prompted to delete the install directory. You can delete or rename it, it doesn’t matter.

Done? Then you will need to make sure your blank “configuration.php” file does not overwrite your configured on on the server.

$ touch .gitignore

$ vi .gitignore

You can then add configuration.php to the file and save. My file looks like this…



You will then have to tell git to stop tracking the configuration.php file, and the others

git rm —cached configuration.php

You can now push again to remove/rename the install directory on the server

$ git add .

$ git commit -am “Rename install directory”

$ git push origin master

-

The local copy

The following is not at all a requirement. I just find it most helpful.

Since the “configuration.php” in you local copy is still blank. You could rename the install directory back to install, or copy it in again and run a local WHMCS install. Just don’t push your changes until you’re done and removed/renamed the install directory again.

With a working local copy of WHMCS you can create your templates and modules and just push your repo to send then to the server having tested them first instead of doing it blind. Remember, there is no FTP access to your files so you will have to use git to push and pull files.

A TEXT POST

WHMCS modules

The ‘ready to use’ WHMCS Freeradius Modules have been scraped in favour of a ‘per case’ model.

Please drop me a line if you came here looking for the modules. We can always arrange something.

steven@secondimpression.net