How To Update Maximum Number Of Mysql Connections On Linux

There is often necessary to increase the maximum number of MySQL connections in order to prevent “Too Many Connections” error. If you’re on LAMP, you’re welcome to follow one of these ways: For a temporary solution you might want to execute the following query: SET GLOBAL max_connections = 500; This will increase max_connections directive to 500, but will… Read More »

How To Find The Version of Linux You Are Using

Sometimes you need to know what version of the Operating system is installed on your server. This is extremely useful when you order a dedicated server and want to know what is the version of OS on it. A simple command will help you as usual: cat `ls /etc/*{-,_}{release,version} 2>/dev/null | head -n 1` This will show you… Read More »

PHP Deletes Angle Brackets While Parsing HTML: How to Solve

Today I’ve faced a problem that was quite strange. One of my WordPress installations refused to understand posted angle brackets. This was especially related to tags and the encoded symbols like > < and so on. I started to think what I did before :). The issue is described at PHP Bugs.  There is no exact solution there… Read More »

Roundcube Bug Found in Directadmin: How to Fix

An urgent message came from my hosting service provider. They’re telling me that a vulnerability has been found in Directadmin, and it is related to Roundcube. Since there is no patch available yet, they recommend to do the following to prevent your server going down: # cd /var/www/html # rm -rf roundcubemail-* roundcube # mkdir roundcube # echo… Read More »

How to Parse All Links From a Page With PHP Using DOM Technology

Today I will share a simple script that may be used to extract all URLs from a single page. You don’t have to deal with regular expressions anymore, if you don’t like them. DOM technology that is integrated in PHP5 allows you to do this in just some strings of your code without any specific knowledge. Here is… Read More »

How to Enable Socket Support In PHP

In order to add socket support with PHP you need just to include it into your configure string: there is no need to install any third-party applications or software. All you need is to recompile PHP, and it can be done in some minutes. First of all you need to know where your PHP installation is located. I… Read More »

How to Open a Javascript Pop Up With Fixed Size

Modern browsers in their default settings are blocking pop up windows. A simple window.open will not open a pop-up as most probably it will be blocked. But what to do if you need to show a special offer or something like this? I’d suggest you to open a window on user action, e.g. clicking a button or moving… Read More »