GUID stands for Globally Unique Identifier. It is a string of letters and numbers and useful to allow website visitors to access a site without needing a username and password because although the probability that a GUID will be duplicated is not zero, it is close enough to zero to be negligible.
In fact Wikipedia says that you would have to generate 2.71 Quintillion (an 18 digit number) GUIDs to have a 50% probability of a collision.
However a GUID isn’t pretty, they look like 204FA460-65C6-DAB0-C69E-013ECE71F5D0 which can be scary to non-technical users when used in a URL.
Continue reading “Alternatives to GUID with PHP”
WordPress WooCommerce SagePay Form extension https://woocommerce.com/products/sage-pay-form/ requires the PHP mcrypt extension to operate.
If your site uses this extension and one day stops going through the full checkout process be aware of the following:
mcrypt has been deprecated as of PHP 7.1.0 and will be moved to PECL as of PHP 7.2.0 – this is because it relies upon libmcrypt which is dead and unmaintained since 2007 http://php.net/manual/en/intro.mcrypt.php.
Your host may have disabled the mcrypt extension.
I’ve heard that the WooCommerce SagePay Form extension is currently being updated to use openssl_encrypt so there may be an update soon to rectify this.
Ubuntu provides phpMyAdmin as a package so it is very easy to get this installed on a server. The config file is stored in /etc/apache2/conf-enabled/phpmyadmin.conf.
If you are running Ubuntu 16 with PHP 7 then the PHP directives contained in this config file may not be working. This is a known bug: https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/1637911.
Continue reading “Ubuntu 16.04 phpMyAdmin config bug”
MailCatcher is a Ruby gem that acts as a sendmail/postfix replacement and displays outgoing emails in a friendly web GUI. It is useful if you want to run someone else’s code and be sure of what emails are being sent.
Here’s how to use it with PHP and Laravel Homestead.
Continue reading “Installing MailCatcher in Laravel Homestead”
You may want to add a default configuration file to Git so that if someone else picks up the code they only have to enter their particular details – however once you’ve configured it yourself you don’t want those changes tracked.
The solution is to use:
git update-index --assume-unchanged path/to/file
To check which files in your repo are marked in that way use:
git ls-files -v | grep ^[a-z]