Here is how to fix high physical memory usage for cPanel users without any running processes. Memory Usage cPanel In cPanel graphs on the right sidebar “Physical Memory Usage” contains “Cached” memory in its calculation which...
By far MySQL is the most popular Relational database management system and knowing which MySQL version you are running can be important in some situations. Here are different ways to check the version of the MySQL server installed on your WHM/...
In plain English: PHP handlers are Apache modules that interpret and run PHP code. Using right PHP handler on your website can have a huge impact on the overall performance. In cPanel you can have different PHP versions with different handlers for...
wget not working? Add user/agent, for example: Mozilla/5.0 wget -U Mozilla/5.0 or wget -U mozilla By default wget uses an uncommon user-agent Wget/VERSION, which due to various security policies some servers are blocking. To solve this, specify the...
To create a named session use: screen -S testsession to list all session: # screen -ls There is a screen on: 19415.something (Detached) 1 Socket in /var/run/screen/S-root. to rename an active session use -X sessionname screen -S 19415.something -X...
ncdu / du and df show different sizes: du is reading information from the directory tree, it is more accurate than df but slower.df reads meta data of the file system therefore it is faster, but not that accurate because it works with blocks...
From the terminal (SSH): grep -Ril "find /home/username/public_html/ -type f -mtime -2" From a .php file: <?php $last=shell_exec('grep -Ril "find /home/username/public_html/ -type f -mtime -2"'); echo "<pre>$last</pre>"; ?> The...
Content Security Policy (CSP) is a security layer that can help you detect and mitigate Cross Site Scripting (XSS) and data injection attacks. If your web application displays and stores custom HTML/CSS from user input, then you most...
Here in how to change the default Time Zone permanently in cPanel using the .htaccess file Step 1. First, check you current time yone settings using a simple .php script like this: <?php echo "Today is " . date("Y/m/d") . "<br>"; echo "The...
Here is a simple PHP script that you can use to test if a port is open on the server or not. <?php $host = $_SERVER['SERVER_ADDR']; $ports = array(21, 25, 80, 81, 110, 443, 3306); foreach ($ports as $port) { $connection = @fsockopen($host...