Find number of concurrent Apache connection by IP

Some time web server response very slow due to multiple concurrent connection to Apache. As we know that each web server has different Apache configuration depends upon its hardware (Processor and RAM). Maximum allowed Apache concurrent connection can be configured by ServerLimit directive in apache2.conf file. After exceeding this limit new apache connection goes in queue. Thus web server response very slow.

Continue reading “Find number of concurrent Apache connection by IP”

Linux copy remote file to local over SSH

When uploading your website to new server or migrating a website to different server then you are require to copy some file from one machine to another. There are various ways to do this like web-base uploading and FTP etc. But in this article I will introduce you with two more Linux command to copy files between two Linux server. Which are more powerful then ftp.

Continue reading “Linux copy remote file to local over SSH”

Make php project translation ready with gettext

I was working on php script that requires translation in multi-language, So I found two ways to make it translation ready with PO and MO files. Here are the two methods to translate a php project using gettext PO/MO files.

  1. PHP core Gettext library
  2. PHP Gettext class (Mainly written for wordpress)

PHP core Gettext requires GNU gettext package to be installed on system. Whereas PHP gettext class doesn’t have any dependency. It can directly ready MO file and extract translation text from that. Also It works on windows server without problem. So in this article I will guide you how to use php-gettext class. Continue reading “Make php project translation ready with gettext”

Block referrer spam with htaccess

Referrer spam is a technique involves making repeated web site requests using a fake referer URL to the site the spammer wishes to advertise. Now a days I am getting to much referrer spam on 99webtools that causes inaccurate stats at Google analytics. You can also find some of these referrer in your analytic. Here is the list of referrer that spamming 99webtools. Continue reading “Block referrer spam with htaccess”