Archive for Shared Hosting

PHP Mail Function Disabled on Shared Web Hosting

PHP Programming Language Logo
CodeIgniter, SwiftMailer and PEAR LogosWe had previously decided to disable the mail function because the mail() function was often used by malicious users on our network to send spam and other unsolicited e-mails. We recommend our customers to use an e-mail library in order to send e-mails, and there are many in which to choose from.

CodeIgniter Framework.

If you make use of the CodeIgniter framework, you can use the built-in Email class in order to send e-mails. Here is sample code using the CodeIgniter’s Email class:

$this->load->library(‘email’);
$this->email->from(‘noreply@eukhost.com’, ‘eUKhost Limited (No Reply)’);
$this->email->to($email); // $email = “email_id”
$this->email->subject(‘Welcome to eUKhost Limited.’);
$this->email->message(‘<html>
<head>
</head>
<body>
<p><b>Message here</b></p>
</body>
</html>’);
$this->email->send();

You can also autoload the Email class within the config/autoload.php file which means you do not need to use the first line of code to instantiate the Email class before making use of it.
For more information on the Email class in CodeIgniter, see the documentation.

PEAR Library.

The PEAR library also has a built-in Mail class for sending e-mails, including e-mails over SMTP authentication with an already-existing e-mail account. Here’s an example:

include(‘Mail.php’); // includes the PEAR Mail class
$headers = array (‘From’ => $from, ‘To’ => $to, ‘Subject’ => $subject); // the email headers
$smtp = Mail::factory(‘smtp’, array (‘host’ => “localhost”, ‘auth’ => true, ‘username’ => $username, ‘password’ => $password, ‘port’ => ’587′)); // SMTP protocol with the username and password of an existing email account in your hosting account
$mail = $smtp->send($to, $headers, $body); // sending the email

For more information, see the page on the Mail class on the PEAR website.
Note: The code above does not catch any errors so we’d recommend you check the documentation for more elaborative examples.

To find the SMTP port, go to “Configure Email Client” under the “More” menu within “Email Accounts” of cPanel. It may be port 587, but check to be sure.

SwiftMailer Library.

The SwiftMailer library is another popular choice for sending e-mails. Here’s an example:
$transport = Swift_SmtpTransport::newInstance(‘mail.example.com’, 587); // your mail server address and port. If you don’t know what yours is, go to cPanel -> E-mail Settings and for the specific e-mail account, More -> Configure E-mail Client – it will be displayed there.

$mailer = Swift_Mailer::newInstance($transport); // creates new instance of an SMTP transport specifically

$transport->setUsername(‘email@example.com’);
$transport->setPassword(‘your_password_here’);

$message = Swift_Message::newInstance();

$message->setSubject(‘Set the subject of the e-mail’);
$message->setFrom(array(‘email@example.com’ => ‘Your Name/Company Name’));
$message->setTo(array($email));

$message->addPart(‘<p>If you want <b>HTML in your e-mail use addPart()</b></p>’, ‘text/html’);

$result = $mailer->send($message); // returns FALSE boolean on failure

if(!$result)
{
echo ‘failure’;
}
else
{
echo ‘success’;
}

Some of our staff members are experienced with PHP so if you require any assistance with your PHP code to send e-mail using any one of these libraries or a different library you may want to use, you are most welcome to post your query on our Web Hosting Forum where a staff member or customer on the forum will be happy to assist you.

Does eUKhost offer Email Web Hosting services?

UK Web Hosting Logo

Yes, we do. Our Email Web Hosting starts at £2.49 per month. With our Email Hosting packages, you can create unlimited e-mail accounts within your Email Hosting account’s disk space constraints. Email Hosting is perfect for businesses or professional individuals that want to have a dedicated E-mail Account without having to use services such as Hotmail, Yahoo! Maiul or AOL Mail and having an unprofessional business image by having an @hotmail.com or @aol.com e-mail address.

With all of our Email Hosting packages, you need to also purchase a domain name. Our domain names start at just £7.49 per year for .COM and .NET domain extensions and £5 per year for .CO.UK domain names*. Any e-mail account you create under your Email Hosting account will be tied to your unique domain name. So instead of business@hotmail.com – your domain name can be business@example.com – whatever your domain name happens to be.

Why should I opt for Email Hosting?
If you don’t want full-scale web hosting and don’t want to have to pay for web hosting in order to have your own unique e-mail address with your company branding, Email Hosting is the perfect solution for this. And all of our Email Hosting packages come with SpamAssassin which is a widely-recognised anti-spam solution that is installed on all of our servers. You can activate SpamAssassin and will automatically filter e-mails that are detected to be spam by SpamAssassin. You can set the filter level before SpamAssassin will automatically delete e-mails it has detected as being spam.

Why is it important to have an anti-spam solution with email?
While “spam” doesn’t sound so scary, it can be used as a collective term to refer to more malicious e-mails, such as:

  • “Phising” emails are e-mails sent by malicious users and organisations that are pretending to be a company or organisation that you may have an association or service with. A prominent example is PayPal spoof e-mails that are sent by malicious users that are claiming the customer’s account has been suspended and it needs to be verified. You’d be surprised by the amount of people that are unfortunately fooled by these kinds of e-mails.
  • Scam e-mails that are trying to get you to provide your personal information that may be used to steal your identity or to use your credit or debit card details for unauthorised transactions. For example, some spam e-mails may claim that someone needs help with transferring funds from a certain third-world country. Never trust these e-mails – they always have an underlying motive to either steal your identity or make use of your credit or debit card information.
  • Malicious emails can be sent that may have malware embedded in an attachment.
  • Spam emails in general which are advertising certain products and services such as viagra pills, SEO services and so forth. Never, ever trust these e-mails – some of these malicious users are not really selling you viagra pills and could be something much more dangerous than that.

I’d be able to tell the difference between a real e-mail and a fake e-mail?
Not necessarily. In fact, it is very easy to spoof an e-mail and pretend to be someone you’re not if certain records are not set on a domain name where the e-mail is coming from, it will otherwise look like a genuine e-mail from the person you’d naturally expect it to be from. How is this possible? Well, very simply, malicious users simply set the e-mail address that sent the e-mail address to the e-mail address they wish to spoof. And even more, they can set a different e-mail address for the “Reply-To” header, which means when someone replies to such an e-mail, they’d be sending it to a completely different e-mail address.

How do you prevent this? Like with all of our Linux cPanel Hosting Packages, within the Email Authentication section of the control panel. Within this section, you can set an “SPF record” which adds a TXT record on the domain name that specifies what IP addresses are authorised to send e-mails from for your specific domain name. This may be set by default. And if it isn’t, you can contact our support team to set the SPF record within cPanel for you if you have any difficulties doing this yourself.

Like this post ?

Share on your Social Networking Profile ( Facebook, Twitter & Google+ ) and get a flat 10% Recurring discount on our VPS Hosting and Dedicated Servers.

Email us the shared link at : sales@eukhost.com or speak to our live chat operator now, by clicking on the “Live Chat” Scroller on the left-hand side of this page and we will provide you with the discount Coupon right away!

Do you have PEAR (PHP Extension and Application Repository) installed on your shared servers?

PHP Programming Language Logo

Yes we do. All of our shared web hosting and reseller web hosting servers have the PEAR library installed.

What is the PEAR library?
PEAR (PHP Extension and Application Repository) is an object-oriented PHP library with separate classes for a variety of functions including mail, database interactivity, date and time, encryption, images, HTTP, HTML and much more. For example, the HTML_Form class is used to assist in the automatic creation of HTML forms. Even more useful classes include the File class, used for reading from and writing to files on the file system from which the PHP application is being executed from. An even more interesting class in the library is the File_SearchReplace class, which automates find and replace operations for files where you may want to find certain strings and replace them in a specific file.

The PEAR library is incredibly robust and useful. You do not need to use the PEAR library in order to connect to and interact with databases, as there are built-in functions and extensions in the PHP language itself, including the object-oriented PHP Data Objects Extension (which is also very easy to use).

Read more about PHP Data Objects: Accessing and Using Databases using PHP Data Objects

Can a Dedicated IP be purchased with Shared Hosting?

UK Web Hosting Logo

Yes, you can order a Dedicated IP if you have eUK Shared Hosting or Reseller Hosting with us if absolutely necessary. While we provide 2 IPs with VPS Hosting and Dedicated Server Hosting; with shared hosting, you share the server IP. In most scenarios, this is sufficient; but if you are installing and using an SSL certificate for use on your website, you’ll need to buy an Dedicated IP alongside an SSL certificate.

What is a Dedicated IP?
When you buy shared web hosting, your account shares the Dedicated IP of the server in which your account is hosted on. However, if you require a Dedicated IP for a specific reason – whether for SEO purposes or because you need to use an SSL certificate; for example in the case you run an e-commerce store – you’ll need to buy a Dedicated IP in order to buy and use an SSL certificate.

How much do Dedicated IPs cost?
A Dedicated IP costs £20.00 per year. The reason you have to pay for Dedicated IPs on an annual basis is to ensure those that have Dedicated IPs allocated actually need them. You will need to justify each Dedicated IP you require.

How long does it take for my order to be processed as soon as I purchase a Dedicated IP?
Our sales team work 24 hours a day, 7 days a week so you should expect your order to be processed by our sales team usually within a few hours after ordering.

Do you offer Shared Web Hosting on a monthly payment cycle / term?

Yes we do – Pay Monthly Web Hosting, however it is much more cost-effective to pay on a yearly payment term, but we do offer monthly payment terms for our customers who prefer to pay a month-to-month basis.

Does your Reseller Hosting packages permit overselling?

To ensure all of our Reseller Hosting customers have a fast and reliable hosting service, we do not allow overselling on our Reseller Hosting packages. If you require overselling or if your requirements are outstretching what a shared hosting environment can offer, please consider our eUK VPS Hosting or eUK Cloud Hosting services. Our VPS Hosting and Cloud Hosting services come with full root access with no allocation restrictions on the amount of accounts you may host. However, we recommend you do not excessively oversell hosting services because it can affect the reliability and performance of your virtual or dedicated server.

A WordPress plugin should be sending e-mails but it doesn’t send e-mails on your servers

On our shared hosting servers we have had to disable the mail() function for spam prevention purposes. This resulted in many of our IPs being blacklisted and our team having to request IPs to be removed from the blacklist, which resulted in inconvenience to customers that are sending genuine e-mails. As a result customers will have to use a PHP e-mail library in order to send mail, such as SwiftMaier or the Mail class in the PEAR library that allows you to send mail directly over the SMTP server rather than through the PHP mail() function. Please ensure you use SMTP authentication with an e-mail account set up on your web hosting account.

For more information, please see the PEAR PHP page on using the Mail class.

More resources:

What is a postback with regards to websites/web development/programming?

A postback is the term to refer to data that has been POSted back by the client to the server. For example when you submit data on an HTML form via your web browser (which is the client here), when you submit that form, a postback to the server occurs. Effectively, the web browser, with its HTTP request for the specified file, will also have the postback data. If you have a PHP application, by using the $_POST and $_GET superglobal variables (or $_REQUEST to refer to $_POST, $_GET and $_COOKIE in one), you can retrieve the postback data within your PHP applications.

A primary example of a postback is a login or registration form – the postback data will consist of the username and password, and any other information fields you require on either forms.

Secure eUK Shared Web Hosting with Quality 24×7 Support

Shared Hosting UK

eUKhost is the UK’s premier shared web hosting provider, offering a number of low-cost web hosting plans that utilize both the Windows and Linux platforms so that there is a solution suitable for all users.

Our cPanel Linux shared hosting plans are amongst some of the best in the UK, pairing a high uptime guarantee with a wide array of features that guarantee value for money and will allow businesses to make the most of their web presence.

eUKhost’s Windows shared hosting plans feature the latest technologies including ASP.NET 4.0 and SQL Server 2008 so that Windows web developers have a reliable platform on which they can develop some of the most functional and user-friendly web applications. All of this comes at an affordable price, accompanied by our popular 24×7 support.

Shared Hosting vs. VPS Server

Selecting eUK Hosting for your web hosting requirements will open you to a range of web hosting plans that are designed to fit the needs of users of different requirements; for power users, the next option after a shared web hosting plan could potentially be a VPS server.

A VPS server is essentially a virtual server hosted in a shared environment, with VPS hosting nodes being shared by a number of users. The following comparisons can be drawn between shared web hosting and VPS servers:

  • A VPS server provides you with your own dedicated hosting environment, enabling you to install applications and services of your choice as SSH access will be provided to Linux VPS servers and Remote Desktop access for Windows VPS servers – although managing a dedicated hosting environment may appear to be a daunting task, support is available throughout the process so that assistance can provided where necessary
  • The core hosting environment of a VPS server is very similar to that of a shared web hosting plan as you are essentially sharing a core hosting node with other users, therefore meaning that the stability of a VPS server may not always be a massive improvement over a shared web hosting service, although with eUK’s support team constantly monitoring hosting node’s, the uptime guarantee of 99.9% should be met every month without issue
  • The price of a VPS server is designed to attract users of shared web hosting plans who are gradually running out of resources to run their website in a stable manner – as a website grows the constraints of shared web hosting will begin to show and because of this, a VPS server will be seen as the next naturally progression in the chain, therefore meaning that the low costs of VPS hosting are going to be attractive to users in this position.

Shared Hosting Security

eUK takes the security of our servers seriously and shared web hosting is no different with investment in new technology being made constantly so that we are able to provide our customers with a web hosting environment that  satisfies their needs and industry standards.

The security of a website is also a responsibility that should fall partially on the shoulders of the webmaster because even though eUKhost endeavours to provide a secure environment, if a website has been poorly developed is storing data in an insecure way then this could cause issues with security; as a web developer it is important for you to be aware of the most recent and secure coding techniques, whilst data should be encrypted when stored in a database.

We encourage the highest level of security possible for all of our customers, with SSL certificates being available for our Windows shared hosting and Linux shared hosting customers. Purchasing an SSL certificate will enable you to encrypt all data that is transferred between your website and your visitor’s computers, therefore keeping private communications secure and giving your visitors another reason to have confidence in your online presence.

Shared Hosting vs. Dedicated Server

eUKhost offers both managed shared hosting plans and managed dedicated servers that are all accompanied with quality 24×7 support, enabling you to call upon an experienced support team when you are facing issues with your web hosting service. The following are the core differences between eUK shared hosting and eUK dedicated server hosting:

  • A dedicated server provides you with a physical server that can be used with a number of different hardware configurations, enabling it to be used in a much wider number of applications than a shared web hosting plan – these different hardware configurations can be used to achieve different goals, for example RAID may be used to achieve greater data integrity in the event of a single hard drive failure or to even improve the read/write speeds of a server
  • A shared web hosting plan is hosted on a physical server with many other shared web hosting users meaning that stability of the hosting platform isn’t guaranteed, whereas with a dedicated server you will be provided with your own hosting server that no other users will have access to unless you explicitly wish to share your dedicated server with another business or user

The same level of support will be provided for managed shared hosting users and managed dedicated server customers, with eUK’s 24×7 support being one of the key reasons for many people choosing to use our web hosting services – eUKhost’s support team will have the knowledge to assist you with any issues that you could face on the Windows or Linux platform with the outlook of providing a solution as fast as possible so that the operation of your website or hosting service isn’t impeded to any extent.

How to solve .htaccess Generation Issues in WordPress

WordPress is an open source application which is been designed by a group of programmers within PHP scripting language. It is also called as a CMS which is easy to understand and use. WordPress has number of plugins which can be installed on any wordpress blog to make any task easy. But sometime if your installation of WordPress does not generate a .htaccess file or if it does not write the new rules onto your existing .htaccess file then there are a couple reasons that could be causing this. Work step by step and continue to the next step only if the previous step does not work.

1. Change File Permissions: You must chmod the .htaccess file to 666 to edit it with the WordPress template editor, but this is not recommended, since if you do that, any user of your blog, who can edit templates will be able to edit it. You can change the permissions to 660 to make it server-writable, which again will have the same limitation.

2. Server Blockage: Your host might have blocked the SERVER_SOFTWARE variable and this will cause WordPress’ .htaccess generation to fail. If you are sure that your server is running Apache, you can force WordPress to believe that your server is running Apache by changing your wp-includes/vars.php file. Follow the steps below to implement these changes.

Open the wp-includes/vars.php file using the built in file editor in your WordPress Admin panel. To navigate to this panel, login to WordPress, click on “Manage”, then on “Files”, scroll to the bottom and type in wp-includes/vars.php into the text box under the “Other Files” title. Look for

$is_apache = strstr($_SERVER['SERVER_SOFTWARE'], ‘Apache’)? 1: 0;
and replace it with

// $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], ‘Apache’)? 1 : 0;
Add a new line under

// $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], ‘Apache’)? 1: 0;
and type in
$is_apache = 1;

cPanel hosting package is really good to host a WordPress blog and Bodhost UK web hosting providers are deploying quality hosting services from last decade with good customer testimonials and security in hosting.

« Previous entries Next Page » Next Page »
Content Call us at 0800-862-0380