MySQL: Got Packet Bigger Than max_allowed_packet bytes

We might face error like "ERROR 1153 (08S01) at line 25247: Got a packet bigger than 'max_allowed_packet' bytes" while importing database in MySQL/MariaDB. Sometimes error message may be like "ERROR 2006 (HY000) at line 25247: MySQL server has gone away". It happens when the database dump file is having SQL INSERT statements with long lines of data.

PHP: Output Error Messages to Standard Error Stream

Sometimes we will come to situations where we want to print error messages directly to stderr (Standard Error stream). Most probably when we are writing CLI applications. Users can direct program output to a text file but we need to show the error messages always in terminal.

Drupal 8: Use Custom Submit Handler for Theme Settings Form

In Drupal 8, adding an extra submit handler for a theme settings form is not that straight forward as for normal forms. The extra submit handler put in normal way will not get called and PHP warning messages may get thrown. Fortunately there is an easy trick to overcome that issue that I show in this post.

subscribe via RSS