PHP contact form returns 504 gateway error after moving to Digital Ocean

This one had me scratching my head for a while – using php7.0-fpm and the latest nginx on Debian 8 Jessie I was seeing our PHP contact form working correctly but returning a Gateway 504 error upon submission, which was resulting in a great deal of resubmitted forms and error notifications from users.   This […]

How to pass through a USB device to a Windows Virtualbox VM

Running a Mac with Windows running in a Virtualbox virtual machine? Here’s how to pass through a USB device so that whenever the VM (Virtual Machine) is running and the USB device is plugged into a USB port it appears in the Windows VM and not in Mac OS X. Open up Virtualbox and make […]

Owncloud Nine: How to reset the admin password

Well, about ten minutes after installing the new Owncloud Nine we found out that we had typo’d the admin password. Fortunately, it’s an easy fix. Run the following (this worked on Debian with a fresh Owncloud 9 install):   cd /path/to/owncloud sudo -u webserveruser php occ user:resetpassword adminaccountname   In our case the command was: […]

Adding products to Woocommerce

First, log into your website at:   yourwebsiteurl.com/wp-admin/   Enter your username and password and you should be directed to your WordPress dashboard.   First, we’ll upload some images to go with the products you’re adding today. On the left you will see Media:   Hover over it and you should see “Library” and “Add […]

Checking whether nginx cache is working

Just set up nginx caching and wondering whether it’s working properly? You can check it pretty easily:   curl -I URL.goes.here That should return a bunch of information, but the important bit is: X-Proxy-Cache: MISS   Well, in this case it’s not working. If it’s working you’ll see a HIT there.

Drupal 8: Configure block or Place Block do nothing

In short, clicking on “Place Block” results in a brief loading icon and then nothing, and Configure Block results in a “This website encountered an unexpected error” message. The fix was found here:   https://www.drupal.org/node/2597506   Edit the following file – the “core” directory should be in your Drupal 8 root directory:   [drupal root]/core/lib/Drupal/Core/Annotation/Translation.php […]

Drupal 8 – How to enable multi image upload

One of the great things about Drupal 8 is that it has multi-image uploading capabilities built-in, unlike Drupal 7. By default, however, it’s a single image at a time.   To enable multiple image upload for articles, for example, navigate to:   siteurl/admin/structure/types/manage/article/fields   Click “edit” next to the Image field type, and you’re taken […]

apt-add-repository: command not found on Ubuntu

Following a tutorial where you’re supposed to add a repository with apt-add-repository but the command isn’t found? You can install it by doing the following:   sudo apt-get install software-properties-common python-software-properties   Then re-run the apt-add-repository command and it should work!

How to caption an image – HTML5

How do you caption an image in HTML? One way is using figure tags. Without them, you might use the following:   <img src=”image.jpg” align=”center” />   …to create this: So, you have an image using the above. How do you make it into an image with a caption? <figure> <img src=”image.jpg” align=”center”/> <figcaption><center>Caption goes […]

SEO: How many words long to make image alt text?

Image alt text purpose When looking at making sure your image alt text works for your SEO purposes, don’t forget that one of the main purposes of alt text is to provide visually impaired people a description of the content they’re looking at. It can be easy to get carried away filling it up with […]