Changing a MySQL/MariaDB variable in my.cnf has no effect?

The MySQL/MariaDB Server settings tweaked in /etc/mysql/my.cnf will go live only after you restart it – but sometimes a simple service mysql restart just won’t do it. Instead, try: service mysql reload service mysql stop service mysql start If there’s some e.g. unrelated error in your config, restart will actually do nothing (apparently to ensure… Continue reading Changing a MySQL/MariaDB variable in my.cnf has no effect?

Get the current plugin name in CakePHP

If you need the current plugin name in e.g. config/routes.php or config/bootstrap.php, and don’t want to hardcode it by hand, you can use $this->getName() instead. Example: Router::plugin($this->getName(), function (RouteBuilder $routes) { $routes->fallbacks(DashedRoute::class); }); The above is effectively the same as: Router::plugin('MyPlugin', function (RouteBuilder $routes) { $routes->fallbacks(DashedRoute::class); });

CakePHP plugin: None of the currently connected routes match the provided parameters

If you want your plugin to have and use routes, you need to configure it first – otherwise, None of the currently connected routes match the provided parameters. Add a matching route to config/routes.php Start by enabling routes and bootstrapping when you load the plugin in your src/Application.php: $this->addPlugin(‘MyPlugin’, [‘bootstrap’ => true, ‘routes’ => true]);… Continue reading CakePHP plugin: None of the currently connected routes match the provided parameters

What’s up with “PHP Unknown: INTL_IDNA_VARIANT_2003 is deprecated”?

Here’s how the error may look like: PHP Unknown: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated PHP Unknown: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated The cause is the 2003 version got deprecated and you’re supposed to be using UTS46. Most likely though, you were today years old when you first learned about these. PHP is picking one by default, and… Continue reading What’s up with “PHP Unknown: INTL_IDNA_VARIANT_2003 is deprecated”?

Hosting mission critical DNS on Godaddy may not be a good idea

We have a domain name registered via Godaddy well over a decade ago, and historically the DNS was being hosted with Godaddy also. Looking back, I guess we should have moved it to some other DNS hosting, but at the time, keeping it with Godaddy didn’t seem like such a bad idea: what can possibly… Continue reading Hosting mission critical DNS on Godaddy may not be a good idea

Changing the Node.js inspector port in phpStorm

You can launch the Node.js debugger when working with Node.js inside phpStorm /bin/node –inspect-brk=0.0.0.0:50407 /var/www/example.js Debugger listening on ws://0.0.0.0:50407/49a2d585-05b1-438e-a53c-6b2943c684df For help, see: https://nodejs.org/en/docs/inspector Debugger attached. This also starts the node inspector you can open in Google Chrome, but it uses a random port every time you relaunch the debugger. This may be an issue if… Continue reading Changing the Node.js inspector port in phpStorm

Samsung monitor not working with Raspberry PI over HDMI

I use my Raspberry PI with a Samsung SyncMaster SA650, and once in a while it would stop receiving signal. The cable and the monitor both work. Only when I connected to the RPi over VNC I had realised it has the wrong screen resolution. So the solution is to set the resolution back to… Continue reading Samsung monitor not working with Raspberry PI over HDMI