Archive for the ‘Server Administration’ Category

March 26th, 2010New Web Server Online


We are pleased to announce the addition of our latest server, a brand new Intel i7 Quad Core server with 8GB of DDR3 RAM and 1500GB of Disk Space in a Mirrored RAID configuration.

The new server is the newest adddition to our server Cluster and as with all our servers it will be running daily backups, stored on multiple servers within the data center as well as weekly off site backups.

All Hayden Digital hosting servers are provided exculsively to our design and development clients, and are UK based to provide maximum speed and minimum latency to your website visitors.

September 5th, 2008Sending automated emails which don’t get blocked by ISPs

I’ve recently come across a problem where automated emails are getting blocked by a number of ISPs. I’ve tracked this down to the sender verification methods some ISPs use – If an email comes from an address which isn’t an active mailbox on the server, it is sometimes dropped without any notice to the sender or recipient.

A fair few web sites send automated emails from addresses such as no-reply@domain.com, do-not-reply@domain.com, forum@domain.com etc – if these accounts are not setup the mails will be discarded by some servers.

You should always use a real email account to send emails – even if it silently discards all incoming mail.

Another problem is that if PHP’s mail() function is being used, and php is running as the userĀ ’nobody’, emails by default will be sent from nobody@hostname.isp.com – which in most cases does not exist.

The way around this is to specify the senders email address through the mail function. e.g.

mail($to, $subject, $body, $headers, '-f sales@domain.com')

Note: Even if you have set the ‘From: ‘ field in the email headers, the email envelope address may still be set to a different account, using the ‘-f email@address’ parameter will fix this, and your emails should reach your customers!

May 17th, 2007Installing Smarty on Linux

While it is possible to use Smarty by simply uploading it to your user account and then including it in your project, it is much cleaner to install it onto your server, and then simply include it in your scripts with

require_once('Smarty.class.php');

Installing Smarty is a simple process, all you have to do is download it, extract it to your servers php libs directory, then make sure it is inlcuded in you php_include path. Once you have done this, you will only need to keep one version up to date, as well as saving disk space if you have multiple sites powered by Smarty.

Step 1: Download & Extract Smarty

Smarty 2.6.18 is the latest version at the time of writing, however please check the official Smarty website for the latest version, and ammend the commands below if applicable.

$ cd /usr/local/lib/php/
$ wget "http://smarty.php.net/do_download.php?download_file=Smarty-2.6.18.tar.gz"
$ gtar -zxvf Smarty-2.6.18.tar.gz
$ mkdir Smarty
$ cp -r Smarty-2.6.18/libs/* Smarty
$ rm Smarty-2.6.18.tar.gz

Step 2: Add to php’s include path

Open up your php.ini and edit the include path to include “/usr/local/lib/php/Smarty”. The location of your php.ini file can be found by creating a script with a call to phpinfio() in it, you cal also use this to verify the changes to the include_path once you have made them. Mine include_path looks like the example below.

; UNIX: "/path1:/path2"
include_path = ".:/php/includes:/usr/local/lib/php/Smarty"

This guide is intended to be generic, however your server settings and directory structure may vary, so please be careful!

Copyright © 2009 Hayden Digital. Blog powered by WordPress