Author Archives: Randy

Now Playing code example

Now Playing Live Example Now Playing HTML Code <iframe src=”http://http://199.58.163.11/rr/now_playing.php” width=”325″></iframe> Requests Popup HTML Code

Categories: Uncategorized. Comments Off on Now Playing code example

Syncing User Filesystems Between Two Cpanel Servers

After doing a WHM multi-account copy, you may want to refresh the users home directories (including email and web files). This one liner uses rsync over SSH to do a quick sync of only changed files, emails, and website files. Run these commands on the NEW server. First you need to create a list of […]

Categories: Uncategorized. Comments Off on Syncing User Filesystems Between Two Cpanel Servers

Syncing All MySQL Databases Between two Cpanel Servers

After you do a WHM multi-site transfer, you may want to resync all the MySQL databases before doing a DNS change. Here’s a quick and easy way to sync each Cpanel user’s databases on the new Cpanel server. After manually setting up a remote mysql root user on the original server (and opening a firewall […]

Categories: Uncategorized. Comments Off on Syncing All MySQL Databases Between two Cpanel Servers

MySQL Relationships (JOIN explained)

The visual diagrams still confuse me after so many years and I always forget…so here it is: INNER JOIN gets all records from one table that have some related entry in a second table LEFT JOIN gets all records from the LEFT linked table but if you have selected some columns from the RIGHT table, […]

Categories: Uncategorized. Comments Off on MySQL Relationships (JOIN explained)

Remount read/write in single user mode

If /etc/fstab is correct, you can simply type: # mount -n -o remount / If /etc/fstab is wrong, you must give the device name and possibly the type, too: e.g. # mount -n -o remount -t ext4 /dev/sda3 /

Categories: Uncategorized. Comments Off on Remount read/write in single user mode

Pacemaker / Corosync / DRBD Cheatsheet

Monitor the status: crm_mon Migrate all resources to another node: crm resource migrate rg_main <fqdn_node_name> Take node offline and online (be careful, this sets a ‘prefer’ to the other node to force a transition, which may or may not get removed afterwards): crm node standby crm node online Start and stop all resources (warning, this […]

Exchange 2012 Allow Relay from IP

Enable mail relaying from a specific IP or range of IPs. 1. Exchange Management Console -> Server Configuration -> Hub Transport 2. New Receive Connector * Set remote network to the IP or range you want to allow relay from (default is any IP so watch out here) * “Externally Secured” authentication * “Exchange Servers” […]

Categories: Uncategorized. Comments Off on Exchange 2012 Allow Relay from IP

Increasing max files or folders per directory on Linux EXT filesystem

If a (poorly coded) app reaches the maximum number of files or folders per directory in Linux, you may see errors like this: Error happened when generating Download Link. Please try again or Contact administrator. (ERROR:mkdir) A quick and dirty way to increase the limit (and overall performance of the system) is to add the […]

Categories: Uncategorized. Comments Off on Increasing max files or folders per directory on Linux EXT filesystem

Strong Password Encryption in PHP

Don’t try to reinvent a complex and highly refined wheel, especially when customer data is involved. Please use phpass on any PHP project. (that’s PH-Pass) http://www.openwall.com/phpass/ Good reading for password hashing in general. http://www.openwall.com/articles/PHP-Users-Passwords

Categories: Uncategorized. Comments Off on Strong Password Encryption in PHP