Bulk update your code to run with PHP 7.0+

Migrating from PHP 5.x to PHP 7.x is a hassle when youre dealing with a large website or multiple websites on a server. So, Ive made some improvements to an existing a shell script to recursively modify directories of PHP pages that load in 4 or 5 but will no longer run in PHP 7.

Continue reading Bulk update your code to run with PHP 7.0+

Last updated on

Quick email forwarder in Shell

I’m always create new forwarding emails for different websites – helps me track down if and when their email list is hacked… To save logging into cPanel or WHM, I’ve created a little script to quickly add new forwarding emails.

Continue reading Quick email forwarder in Shell

Last updated on

How to clone a website in cPanel

Would you like to clone any website in cPanel? There is a pretty fool-proof way to clone a website and change the references to URLs, paths and database details. There isn’t one perfect catch-all method, but you can cover most bases using this short guide. Continue reading How to clone a website in cPanel

Server White Listing for Clients

ConfigServer Firewall has been great at keeping unwanted users at bay on my web servers, but it also causes plenty of problems – notably when the SMTP authentication fails multiple times. This is usually caused by an email account trying to send an email and repeatedly using bad credentials to login. After a short period of time, CSF or cPHulk kicks in and blocks all communication with their website.

Managing this is a pain as there is no way (as far as I can tell) to allow clients to white list themselves when this happens. So, I’ve put up a page on a different server that handles requests for white listing.

Continue reading Server White Listing for Clients

Last updated on

Bulk update scripts to PHP 5.4+

I’ve written a shell script to bulk update PHP pages, replacing ereg, eregi with preg_match, ereg_match with preg_match, split with preg_split and changing the $HTTP globals to their modern versions. I haven’t seen this anywhere else, so I’d thought I should post something here.

Continue reading Bulk update scripts to PHP 5.4+

Last updated on