Different PHP versions per single hosting

Using simple one-liner in .htaccess file you can enforce different PHP version in two or more of your folders. If you have different websites / domains / services registered for each folder, you can as an effect have single hosting running two or more applications that requires different version of PHP parser.

Note that this will most likely work on shared hostings only, where your ISP provides different versions of PHP at your service and some web tool (i.e. cPanel) to switch between them. In most of such cases web tool allows you to pick the same PHP version for the entire hosting. With this solution you can have them different.

However, on your private servers and hostings you have to provide that different versions of PHP parser will be installed and made available.

Read More “Different PHP versions per single hosting”

Using Sieve for server-side mail filtering

If your mail server supports Sieve mail filtering language, you can use a simple text scripts to enable powerful mail filtering and management that is applied directly on server-side. This allows you to create filters that will works client-independenty (a true saviour for those enforced to use Microsoft Outlook).

Sieve has no variables, and no loops (but does have conditionals). Thus, it is limited to simple filtering operations.

But that is enough for:

  • developing simple anti-spam system,
  • managing and organising mails, but auto-moving incoming messages to corresponding folders,
  • rejecting certain e-mails automatically (i.e. if they’re too big or contain invalid attachment).

Here you will find some general info and a few simple script examples.

Read More “Using Sieve for server-side mail filtering”