Tag Archives: debug

Connect to localhost MySQL from Docker container

To test connection to MySQL/MariaDB server running on localhost from Docker container try: docker run –rm -it –net=host mariadb mysql -u root -h 127.0.0.1 –rm Automatically remove the container when it exits https://docs.docker.com/engine/reference/run/#clean-up-rm -i Keep STDIN open even if not … Continue reading

Posted in docker | Tagged , , | Leave a comment

Debugging duplicate query exec in WordPress

During debugging a plugin malfunction I had duplicate option update SQL queries and after som thinking I came up with the following debug line to catch the trace of duplicate function call: error_log(var_export(debug_backtrace(), true)); I placed it above the return … Continue reading

Posted in Uncategorized, wordpress | Tagged | Leave a comment

Compiling Xdebug for PHP

While I’m not sticking to Arch Linux’s PHP (it’s version 7 by default a long time) so I had to compile Xdebug for my PHP version. Great thing at xdebug’s site is that they provide a wizard which parses the … Continue reading

Posted in php, Uncategorized | Tagged , , , , | Leave a comment