Category: Nginx

Simple Nginx configuration for Symfony application

I guess somebody of your could ask for: “How to configure Nginx for Symfony application?”. Here small template to start from:


Read more

Random byte generation in PHP

Here is my small 5 minute php script for random byte generation.

Could be useful for checking your random numbers quality. 🙂

Read more

Wait for MySQL service in loop

I have no mysql client except php mysql driver on application node, that’s why small mysql ping script have to be done. Small sample here :

You can set execution bit by:  chmod +x mysql_ping.php Let’s run mysql_ping in loop: while ! `./mysql_ping.php`; do sleep 1; done && echo 'MySQL is alive' Results when MySQL server is down:

Successful Results:


Read more