DNSstuff.com
May
29th

WHM/CPanel: #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

Tjis is quite a common error and fortunately there seems to be a ‘silver bullet’. The answer was posted on the CPanel forums by Dawzz.

pico /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
or if your server doesn’t have pico:

nano /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
Look for the line that says:

$cfg[‘Servers’][$i][‘socket’] = ”;

and change it to:

$cfg[‘Servers’][$i][‘socket’] = ‘/var/lib/mysql/mysql.sock’;
then change the next line from:

$cfg[‘Servers’][$i][‘connect_type’] = ‘tcp’;
to:

$cfg[‘Servers’][$i][‘connect_type’] = ‘socket’;

Leave a comment if that worked for you!

May
24th

Five Reasons NOT To Use Hotmail

Filed under General | 2 Comments
 ?

Do you use Hotmail? If you do then there is a very good chance (in fact I would say 100% chance) that some of the legitimate emails that are sent to your Hotmail address aren’t reaching you. Hotmail has the most aggressive filtering system of any of the major free email providers. Not only that … their filtering systems have serious flaws which result in emails that are not in the least bit ‘spammy’ being silently deleted. Here are my top 5 reasons for avoiding Hotmail.

1. Hotmail spam filtering is too aggressive – ask any ISP and they will tell you that anti-spam filtering of customer emails is a tricky business. The ISP has a responsibility to ensure that their customers receive all legitimate emails. At the same time they need to provide some sort of filtering. Without any filtering at all, the email service would be unusable for some customers – particularly long time customers who have had the same email address for several years or more. So, most ISPs and email services will handle this in a couple of ways. Firstly, their email filtering will generally be non-aggressive by default. That means that it will block the obvious spam, but the occassional spam email may get through. So, they will offer you the option to increase the aggressiveness of the filtering AND provide a folder or login where you can review all filtered emails. This is what the ‘Junk’ folder is also used for.

Hotmail, by default, has very aggressive spam filtering. So aggressive in fact that messages that do not exhibit any spam characteristics whatsoever are filtered.

2. Hotmail Silently Deletes Messages – this is just plain irresponsible. Mind you, it is a FREE service so I guess Hotmail feel that they have no real responsibilities as the customers aren’t paying. Most mail services and ISP mail servers will notify the sending system that they are not delivering an email message and will provide a reason why. This is sometimes in the form of a ‘bounce’ email and it can also appear as a response from the mail server that is logged in your server log.

Not so with Hotmail. I have tried diagnosing Hotmail delivery issues many times and in most cases the Hotmail mail servers will respond with a message indicating that the email was successfully delivered – but it is silently deleted by the Hotmail mail filters. None of the other major mail providers do this. If a message is blocked or filtered by Yahoo Mail then there will be an indication as to why in the server log file. The same applies to GMail.

3. Hotmail’s filtering process is flawed – I had a client who was starting up a site and was finding that his emails weren’t being delivered to Hotmail. The business was new and the domain was new. The messages were simple one line notifications. Hotmail silently deleted these messages. Whitelisting doesn’t help – these messages don’t make it to the junk folder and they don’t even arrive when the sending address is whitelisted. Why have a whitelist and a junk folder if you are going to delete messages before they get to the recipient?

4. Hotmail’s Approval Process Is Flawed – Yes, there is a way that you can request that your domain be allowed to send email to Hotmail accounts – but this process is flawed and it gives a very real example of how broken Microsoft and Hotmail’s email filters are. I sent a message per their instructions. The instructions said to send an email to their address with the domain or list of domains in the body of the message. I immediately received a bounce message that said:

Diagnostic-Code: smtp; 5.1.0 - Unknown address error 550-'5.7.1 <Your e-mail was rejected by an    

anti-spam content filter on gateway (205.248.106.32). Reasons for rejection may be: obscene    

language, graphics, or spam-like characteristics. Removing these may let the e-mail    

through the filter.>' (delivery attempts: 0)

That was a message that had the domain, per their instructions, in the body of the email. I tried sending from three different addresses, none of which have ever been blacklisted. In fact all of the domains had a valid SPF record and reverse MX entry.

5. You Get What You Pay For – If you experience any of these sorts of issues, don’t expect any assistance from Hotmail. You are not paying them for the service and they have no way of handling thousands of complaints each day (which is what they would get if even a small percentage of Hotmail users were aware of how unreliable the Hotmail email service is). Strictly speaking, email is not considered a particularly reliable method of communication. Hotmail takes it to a whole new level though.

If you absolutely MUST have a free email account then you would be much better off choosing either GMail or Yahoo mail. Both of those services are many times more reliable than Hotmail.

If you are a developer who has a client that is insisting on having email delivered to Hotmail account then your only option is to request a manual review from Microsoft’s support department. You can fill in a form at:

https://support.msn.com/eform.aspx?productKey=senderid&ct=eformts&scrx=1

Good luck with that! 🙂

May
23rd

What’s Up With PayPal Lately?

Filed under Soap Box | Leave a Comment

I’ve always been a big fan of PayPal. I joined back in 2001 and have brought them more than a few customers through my script development work. Now they’re not perfect and I know that to some people they are downright scary. There are many stories about PayPal merchants having their accounts frozen because someone at PayPal erroneously decided that the website that the merchant was promoting was outside their terms. In most cases, if it’s an honest mistake then the account is re-instated (unlike Google’s ‘we don’t like you and we’re not saying why – please just go away forever’ policy). It does seem to happen a little too often though.

Anyway, that’s not the subject of this post. I’m finding in recent months and even going back a year or so, PayPal is becoming less and less reliable. It seems that every 2 or 3 months there’s a major lag with IPN transactions … which kind of defeats the whole INSTANT payment notification concept. I don’t know about you, but I break out in a cold sweat any time that IPN transactions are delayed for more than a few minutes.

A lot of online systems are set up to cater for the impulse .. I WANT IT NOW!!! … kind of buyer. And as we all know, when that kind of buyer doesn’t get instant satisfaction you can expect a slew of tickets on the helpdesk or an inbox full od emails…some accusing you of being some kind of ‘scammer’ whilst others are happy just to mention how crappy your service is.

Lately I’ve found that it can be a major effort just to log in to PayPal. Over the past month the ‘Click here to retry’ message is showing more and more often. Just today I had to go through the login process 6 times before it actually let me in. I find it very annoying and somewhat bewildering that a company the size of PayPal is having so many of these issues and glitches.

Am I the only one experiencing these problems on a regular basis or are you seeing the same thing too?

May
23rd

Fantastico Error – Fantastico Is Not Installed

I had this error show up on a couple of servers today. A search on Google revealed that it’s not an entirely uncommon problem and there seemed to be a host of possible fixes.

After trying a few things that were suggested in forums (and didn’t fix the problem) I deleted the Fantastico files and did a clear re-install. No dice – I still had the same error message:

Fantastico is not installed at the default location /usr/local/cpanel/3rdparty/fantastico. Either move the Fantastico directory from it’s current location to /usr/local/cpanel/3rdparty/fantastico OR enable ioncube loaders in WHM -> Tweak settings.

Not being a quitting kind of guy, I continued to trawl the forums and eventually found the solution (for me, anyway). It seems that WHM isn’t putting the correct entry for the ioncube loaders into the CPanel php.ini. So, here’s what fixed it for me. Log in to your server as root and do the following:

cd /usr/local/cpanel/3rdparty/etc

pico -w /var/cpanel/3rdparty/etc/php.ini

…then add this line at the bottom of your php.ini file:

zend_extension=”/usr/local/cpanel/3rdparty/fantastico/loaders/ioncube_loader_lin_5.2.so”

If you get ‘command not found’ or similar then instead of pico try nano to edit the php.ini

You may also need to add that line to the bottom of /var/cpanel/3rdparty/etc/php.ini … but only if that file exists. None of my servers had a 3rdparty directory under /var/cpanel.

Here is a link to the forum post where I found this info.

http://www.netenberg.com/forum/index.php?topic=6570.0

…and it refers to this post:

http://www.netenberg.com/forum/index.php?topic=1960.0

May
15th

WHM – Recompiling Apache With Sensible Defaults

I’m probably going to regret using the wording ‘sensible defaults’ … what may seem sensible to me may well be not-sensible to others. Still, at the very least I’ll be able to explain how I recompile apache and why I choose certain settings. If you’ve never recompiled Apache on a WHM server then it can be a very scary task – so many options to choose from.

Before we get started you need to understand that if you are recompiling Apache on a server that already has several live sites then you need to look at the scripts that run on those sites. I’m going to suggest that you use PHP5 and suPHP but this could break some older scripts that won’t run on PHP5 and suPHP will cause ‘Server Errors’ if you have any world writable directories or files, or the ownership of the files does not match the CPanel account owner(s). If you are unsure about any of that, then please read the article: Upgrading WHM Apache To Use suPHP and PHP 5 as you will need to follow those instructions after the recompile.

If you are recompiling Apache on a shiny new server then there isn’t much that can go wrong! Regardless of that, this guide does carry a standard disclaimer. If anything breaks, that’s not my fault. These instructions are given in good faith and no warranty or guarantees are either implied or provided.

Step 1: Profile

This is the first screen you will see when you click on Software->Apache Update. By default the ‘Previously Saved Config’ profile will be selected. Click on the ‘PHP Security’ option as this will compile the suPHP module when we get to that step. After selecting the PHP Security profile, click on the ‘Start customizing based on profile’ button.

Step 2: Apache Version

For the Apache version, select Apache 2.2. This is the latest stable version and the version that works best with PHP5. It also has some performance improvements over version 2.0. After selecting Apache 2.2, click on the ‘Next Step’ button.

Step 3: PHP Major Version

Tick the box next to PHP 5. PHP 4 is a ‘dead duck’ and is no longer actively supported by the PHP developers (though they have said they may provide security fixes until Aug. 8 2008). PHP 5 is the current ‘stable’ and actively developed version of PHP. Do check though, if you have some scripts running, that they will work with PHP 5. You can generally find this out from the script developer’s website. After choosing PHP 5 click on the ‘Next Step’ button.

Step 4: PHP Minor Version

Choose the most recent release. These will always be ‘stable’ releases and it’s quite likely your server is running the previous version. At the time of writing this guide, PHP 5.2.6 is the most recent version. After choosing the minor version click on the ‘Next Step’ button.

Step 5: Short Options List

Unless you are positive that someone is going to NEED Microsoft Frontpage support, untick that sucker RIGHT NOW!. Yes..I was shouting when I said that. Seriously, frontpage extensions are a potential security risk and should never be enabled if they will not be used.

I generally tick the Mod suPHP, Ioncube Loader, Mod Security and Zend Optimizer and untick the rest. Whilst it adds a little extra ‘baggage’ to your web server there are many scripts that use Ioncube or Zend encoding so it may save you a little time and hair pulling some time in the future. suPHP and Mod Security will help protect your web server from attacks and exploits. As the CPanel docs say:

“ModSecurity is a web application firewall that can work either embedded or as a reverse proxy. It provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.”

Security is good. Say that a few times until you feel REALLY comfortable with it!

Don’t be too concerned by the ‘Are you fully aware…’ messages that pop up when you click on ‘More Info’ for Ioncube and Zend – these options generally don’t need any further tweaking or alterations after Apache is recompiled and even in the rare cases where something goes wrong there are plenty of good support docs around, online forums etc and Google is your friend :).

Once you’ve selected the 4 aforementioned options, click on the ‘Exhaustive Options List’ button.

Step 6: Exhaustive Options List

Ok now… remember your breathing exercises. Take a few deep breaths. Sure, there are ALOT of options there, but whose scared of of a bunch of tick boxes eh?

The first thing you will notice is that some of the options have orange text. These are options that are enabled by default in Apache and you can leave them all ticked, so we won’t mention them other than to say if it is orange – it should be enabled. Now, lets look at the other options I always enable.

Expires – this allows the generation of cache control and expires headers. This can be useful when someone is coming through a caching proxy as you can let the caching proxy know that it should fetch the current page instead of serving up an old page from the cache.

Fileprotect – remember that we said security is good? The fileprotect module prevents other users on your server from reading other peoples web root folders.

Headers – Not used extensively but this allows you to customize HTTP response and request headers. It’s the sort of thing that a script developer may use.

Imagemap – You don’t see imagemaps as often as in years gone by but there are still plenty of web pages and scripts that use them, so it would be silly not to include the imagemmap module.

Mod suPHP – We talked about this earlier. Security is good. Mod suPHP is good! You can find out all about it at http://suphp.org/

You should be able to skip past the ‘Other Modules’ section as those are the ones we set earlier. Now we move on to the PHP options.

Bcmath & Calendar – These are used by some popular scripts out there so I always enable them.

Curl & CurlSSL – Curl is often used for scripts such as PayPal IPN scripts and scripts that need to post information to another web site. Also, many hosts now disable the allow_fopen_url option in PHP and the alternative they do allow is Curl. Most script developers are aware of this, so Curl is often used as either the primary or ‘fallback’ option when posting forms or data to other sites.

FTP – Again, I include this because there are scripts that make use of PHP’s FTP functions so it is better to do it now than to have to re-compile again later.

Force CGI Redirect – This option is required in order for our suPHP option to work.

GD – This is a graphics library that is used in many, many PHP scripts.

Magic Quotes – This option helps prevent some SQL injection attacks, so it is basically an added security feature. If you have a script that falls over because of it, you can turn it off in the php.ini file. However, most well written scripts will check whether magic quotes is enabled and adapt accordingly.

Mbstring – Provides some multi-byte character encoding functions. Yep – that’s quite a mouthful but .. long story short .. there are scripts that use it and no harm in enabling it.

Mcrypt & Mhash – These options provide encrypting and hashing functions that are used by many scripts.

MySQL & MySQL of the system – Guess where WordPress stores its data .. in a MySQL database. Guess what language WordPress is written in … PHP. Need I say more? There are a huge number of PHP scripts that will need to access a MySQL database so these options are a no-brainer. MySQL of the system just means that it will use the MySQL libraries that are installed on your server rather than the built-in support that PHP has. Without going into details .. ‘of the system’ is better ticked than unticked. So, make sure you check both of these options.

Sockets – This is another often used feature in PHP so it’s best to turn it on now rather than have to recompile again later.

TTF – This option provides support for Freetype fonts which are used by some scripts.

Zlib – I usually leave this enabled though there aren’t all that many scripts out there that use it. It provides gzip compatible file compression/decompression functions.

Finally, you should make sure the ‘Proxy’ option is NOT enabled (unless you plan on providing some proxy services .. which the vast majority of us do not). and tick the box labelled ‘Save my profile with appropriate PHP 5 options set so that it is compatible with cpphp’.

Preferences

Enable the following:

Always do latest PHP
Report Errors to cPanel

Now… take another deep breath and click on the ‘Save and build‘ button. Read the two popup windows – one is the confirmation and the other tells you that you shouldn’t interrupt the build. The build will take quite a while…perhaps an hour or more, so leave your web browser open and go make a cup of your favourite beverage … then sit back while the compiler does its thing.

As I said at the beginning … there’s no such thing as the perfect build and there is no ‘one build fits all’ solution. The defaults that I use should work for most servers. Feel free to comment and/or criticize though – I’m always open to suggestions and improvements.