Troubleshoot Postfix Spam

RE: http://kb.parallels.com/en/114845 [stextbox id=”info”]Symptoms: Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix?[/stextbox] [stextbox id=”warning”]Note:  This article is for Postfix.  If you are using the Qmail mail server, see this: http://geekdecoder.com/troubleshoot-qmail-spam/[/stextbox] Resolution Many email messages are sent from … Read more

Fastcgi Error

[stextbox id=”warning”]Connection reset by peer: mod_fcgid: error reading data from FastCGI server[/stextbox] Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Jul 31 13:05:21 2014] [error] [client 99.xxx.xx.xx] Premature end of script headers: cron.php Edit fastcgi.conf and add the following:

PHP Spam Scripts

PHP Spam Scripts I finally decided this topic deserves its own page. To find the script sending spam Plesk Ver -11.0 Ver 11.5+ WHM cPanel View the results Joomla This file often appears in /tmp/sysNNNNNNNN.php file 1. /tmp is 777 2. the sysNNNNNNNN.php is usually accompanied by a .zip file 3. .php and .zip are … Read more

Zero Out Log File

or if you want to be more eloquent, will empty logfile (actually they will truncate it to zero size). You can also use to be perfectly explicit or, if you don’t want to, (applications usually do recreate a logfile if it doesn’t exist already). However, since logfiles are usually useful, you might want to compress … Read more

Curl Error

[stextbox id=”warning”]Error: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104[/stextbox] Getting a curl error from a php script. Try to run curl without php. ssh to the server find the script cd /var/www/vhosts/path/to/script nano script.php Find the call and execute from a command line Output: It looks like the connection is being refused by the remote server. Curl the … Read more

Optimize only fragmented tables in MySQL

When you are using MySQL, you will (likely) have tables that can be fragmented. In MySQL terms this is called “OPTIMIZE”. You could simply OPTIMIZE every table in every database, but during an OPTIMIZE, the tables are locked, so writing is not possible. To minimize the time that MySQL will be locked (and results cannot … Read more

Mysql Report

Another tool of a similar nature is the MySQLReport tool which can be found at http://hackmysql.com. Information can be found here about how to read and analyse the report that is produces from this link http://hackmysql.com/mysqlreportguide. You can load it up remotely and build it on your server in a similar way making use of … Read more

Using Mysqltuner

Download/Installation Simple You can download the entire repository by using ‘git clone’ followed by the cloning URL above. The simplest and shortest method is: Change the permissions you can execute it without calling perl directly. [stextbox id=”warning”]——– Recommendations —————————————————–[/stextbox] General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 … Read more

Mysql Check/Repair Database

Check a Specific Table in a Database If your application gives an error message saying that a specific table is corrupted, execute the mysqlcheck command to check that one table. The following are some of the key options that you can use along with mysqlcheck. -A, –all-databases Consider all the databases -a, –analyze Analyze tables -1, –all-in-1 Use … Read more