
Mon-Code
159 FOLLOWERS
Personal tech blog about software development with PHP language and Symfony Framework using Mysql, Elasticsearch or RabbitMQ but also Linux Debian usage.
Mon-Code
1y ago
I recently updated my server to run last Debian version and faced an error I never encountered before with Nginx and PHP-FPM. Because of the mass update in software version, I suspected something really nasty and used everything I can to fix a simple typo, thanks to unexplicit error message ..read more
Mon-Code
1y ago
Brut force or enumeration attack are not limited to login form. An easy way to fix this is to rate limit usage of your application. There are many solution out there to achieve that, in this post I show you how to do it with Symfony rate limiter component. I will also show you how to protect your server with long running task to avoid server overwhelming ..read more
Mon-Code
1y ago
In this article I present you a config which allows to put the client MySQL / MariaDB in color to facilitate the reading of the results of your SQL queries ..read more
Mon-Code
1y ago
There are several ways to store dates in database, the choice is not so simple, especially if you need the timezone. In this article I explain the different solutions with their advantages and disadvantages ..read more
Mon-Code
1y ago
No need to remember your password to connect to a linux server, SSH keys provide authentication. We can have the same thing on MySQL and MariaDB. With a plugin, the database server trusts the credentials of the linux system, you only need mysql account with the same name as the linux account and the password disappears from the connection. It is ideal on a development server with multiple users and it greatly facilitates the management of accounts, even if we forget to delete the mysql account, deletion of the linux account is enough ..read more
Mon-Code
1y ago
Behat is a well known test behavior framework, used on many project. I always used it to validate webpage or API behavior. In this blog post, I will show you how to setup Behat to use it for testing Symfony command ..read more
Mon-Code
1y ago
Writing unit or functional tests on code has almost become a standard. Having a server that automates the verification of these tests and deploys the code is the goal of many development teams. Despite this, these good practices are rarely implemented for database schema migrations. In this article, I'll show you how with a little bash and Jenkins, I test and automate my SQL migrations ..read more
Mon-Code
1y ago
One of my first articles on this blog dealt with backing up MySQL databases on a production server. Today, I offer you a variation of this article and the script to save your PC or development server (mysql, svn, git ..read more
Mon-Code
1y ago
In previous post, I show how to manage indices in Elasticsearch using elasticsearch-php library. In this post, I will show how to index document with this library ..read more
Mon-Code
1y ago
Sometimes the processing of a message causes an error. In this case, it is common to move this message to another queue to try to process it later. All this, can be automated in RabbitMQ with the DLX / DLK option and the application of a TTL. But be careful not to create an infinite loop of attempted treatment, in this article I will introduce x-death header to control the number of retries ..read more