iPhone cannot send MMS message?

If your iPhone complains “Cannot Send Message – MMS Messaging needs to be enabled to send this message”, there is a fix in the settings that is both very unintuitive and very likely to work.

Use USB drive as apt-get cache for frequent Raspberry PI reinstalls

I work on a configuration script for a Raspberry Pi, and as I debug it, more often than not I need to run reinstall over and over. On a metered connection it may be a problem, as not only it’s slow, it also uses your data plan. A way around this would be having a… Continue reading Use USB drive as apt-get cache for frequent Raspberry PI reinstalls

FreeBSD gets unresponsive on commands touching disk

Imagine your server hangs even on simple, seemingly unrelated commands such as cat file, ps aux or top. This is the issue I’ve been dealing with today. Short version: it was MySQL/MariaDB server clogging the VPS I/O. Important: even though a terminal window with an established SSH connection would freeze, I could always open a… Continue reading FreeBSD gets unresponsive on commands touching disk

Clone a Raspberry Pi OS image from one Micro SD card onto another

Find your Micro SD card identifier diskutil info -all You’re looking for something like this: ********** Device Identifier: disk2 Device Node: /dev/disk2 Whole: Yes Part of Whole: disk2 Device / Media Name: SD Card Reader Volume Name: Not applicable (no file system) Mounted: Not applicable (no file system) File System: None Content (IOContent): FDisk_partition_scheme OS… Continue reading Clone a Raspberry Pi OS image from one Micro SD card onto another

Custom file extensions (e.g. .env): routing and rendering serialized responses

It is fairly common to add json handler to a CakePHP route and have it automatically respond with formatted JSON. Consider this example. In your route: $routes->prefix(‘Api’, function (RouteBuilder $routes) { $routes->setExtensions([‘json’]); $routes->fallbacks(DashedRoute::class); }); In your controller: public function initialize(): void { parent::initialize(); $this->addViewClasses([\Cake\View\JsonView::class]); $this->viewBuilder()->setOption(‘serialize’, true); } So now when you request actions in that… Continue reading Custom file extensions (e.g. .env): routing and rendering serialized responses

Deploying a simple CakePHP app to Render.com using Docker

Render doesn’t have a ā€œnative PHP runtimeā€ like it does for Node/Python, but it does have Docker. So we can use a Docker image that will set up the PHP runtime for us. To make it happen, we will have to add these two files to our application: Dockerfile that imports and uses a prebuilt… Continue reading Deploying a simple CakePHP app to Render.com using Docker

Connection to Sqlite not established, unable to open database file

The problem You created a new CakePHP application and you try to visit its homepage. You get a database error. Missing Database Connection Cake\Database\Exception\MissingConnectionException Connection to Sqlite could not be established: SQLSTATE[HY000] [14] unable to open database file The (potential) reason Check your composer.json and see if your application uses cakephp/debug_kit: “require-dev”: { … “cakephp/debug_kit”:… Continue reading Connection to Sqlite not established, unable to open database file