Blog

We offer the articles below in the hope that they will be useful, but we cannot accept liability for any problems caused by the instructions that they contain. If you have a problem, question or feedback relating to one of our articles, please post a comment so that other readers can benefit. We regularly review comments and reply or update the articles, to ensure their continued usefulness. All articles are provided free, without any advertising or tracking, for the benefit of the technical community.

If you require paid commercial support, please contact us for assistance.

How to disable autocomplete for email input in HTML forms

Recently I was making a simple web form to allow admins of a site to create accounts for new users. The admin enters the email address of the new user. When the form is submitted, a random password is generated and emailed to the user. (This is for privacy/security: it prevents the admin from knowing another user’s password.) However, the admin needs to enter their own password when submitting the form. In other words, the email address and password fields in the form are for two different accounts.

How to add custom configuration options to phpMyAdmin on Debian/Ubuntu

By default, phpMyAdmin is missing a number of useful configuration options. When you install it from source, you can set these options by editing /path/to/phpmyadmin/config.inc.php. However, Debian and Ubuntu package up phpMyAdmin and store things in a slightly different place. This makes installation, update and maintenance much more convenient, but does make things slightly more confusing when you want to set custom options.

Syntax checking PHP, JavaScript, Python automatically with Git

When reviewing code, a simple first step in checking that it doesn’t include any errors is to run a syntax check. In this post, I outline how to set up tools to scan all the code in a directory for syntax errors, and how to run this scan automatically when committing your code to git. For simplicity’s sake I am assuming that you are running Ubuntu, but the principles apply to any development environment.

PHP

The command line version of PHP (package php7.x-cli) allows you to syntax check a single file:

Filtering email by country using SpamAssassin on Debian

In this post, I describe how to set up spam filtering rules based on the country that an email was sent from, using SpamAssassin. These notes are based on Debian Bookworm, but the principles are very similar for other versions of Debian and Ubuntu. If you run a mail server that primarily only receives mail from a few countries, this guide should be very helpful to you in the fight against spam.

PHP 7 backwards compatibility library for mysql and ereg functions

The very commonly used mysql_* and ereg* PHP functions were removed in PHP 7. For very large codebases, refactoring the code to remove them just isn't practical. To that end, we have developed a compatibility library to enable existing websites and PHP scripts to keep running under newer PHP versions.