email tipSimplify your life and reduce the time you spend on email by using cPanel to forward email to anaddress, such as one at Google Gmail that consolidates multiple email addresses and has more features.   There are a variety of scenarios that forwarding can be your friend and helpful assistant.  Some examples:

Continue reading ‘The Whys & Hows of Email Forwarding’

I’ve written a number of posts about cron jobs becuase cron can be so useful in managing a site, plus cPanel makes it easy to set up and edit one.

Get your  job to include useful info in the email that it sends you.  You can notifiy yourself of success or failure, or post details about the nature or results of the cron job.

Let’s say your cron job automatically IMs your boss with a random question every hour (like Wally did in this Dilbert comic strip):

Dilbert.com

Here’s the code snippet (PHP) that is part of your script run by cron. It lets you know whether your job worked or not, and what you IM-ed:

// check for success or failure

if (empty($buffer)) {

echo “failure”;

else {

echo “success — the IM message was: ” . $im;

}

My example uses  PHP, but the concept is the same if you use PERL, bash shell or whatever you prefer.

When you are working on localhost, the output will display on screen.  You can check and debug there. When you are on your server, the output will be part of the email the server sends you. That way your will have an email history of what you automatically IM-ed your boss and what time it went out.

When you set your password, including on cPanel, or email accounts, be sure to select one that is hard to guess. But what does “hard to guess” mean?  

Take a look at The Top 500 Worst Passwords of All Time:

From the moment people started using passwords, it didn’t take long to realize how many people picked the very same passwords over and over. Even the way people misspell words is consistent. In fact, people are so predictable that most hackers make use of lists of common passwords just like these. To give you some insight into how predictable humans are, the following is a list of the 500 most common passwords. If you see your password on this list, please change it immediately. Keep in mind that every password listed here has been used by at least hundreds if not thousands of other people.

There are some interesting passwords on this list that show how people try to be clever, but even human cleverness is predictable. 

Here is a handy random password generator that I use often.

Awhile ago I moved into a house that had a password protected security system. The previous owners did not provide the password. I was able to guess the password and was able to walk right into an unlocked house. That password was among the top 10. Though friends and family were amazed at my abilities, I had simply used what I knew was a common password. (I never told them my little trick that made getting in easy.)  Don’t let your email, website, or any online login be as wide open as that house was.

Enable AutoLoad

28Jun08

When you log into your webmail, there is now a link that says [ Enable AutoLoad ] under each webmail client.

Click the AutoLoad link under your preferred webmail client and when you log in in the future, that webmail client will automatically load instead of giving you the option to select webmail client.

cPanel File ManagerSometimes you will have to change the permissions of a file. I had to do this recently to get an installation of WordPress blog to run. Here is how to change file permissions using cPanel:

    1. log into cPanel
    2. look for File Manager and follow the link
    3. you will get a window that says Please select a directory to open: and a number of options
    4. select Web Root (public_html/www)
    5. look at the far right column. It says Perms These are the file permissions for each file using the standard Unix file permissions numbering system
    6. click the permissions for the file you want to change you can edit it right on the web page
    7. click “OK”

      In a nutshell, cPanel is giving you an easy interface for doing a chmod.
      Unix and Unix-type file permissions appear quite cryptic at first but are easy to understand. More info at Linux File Permission Confusion and other sites you can google.

      Error Log You got a dreaded “internal server error” on your website. Even I get a panicky, sick feeling when I see such a page.

      In case you have never seen one, an “internal server error” page will usually be all text and say something like:

      Internal Server Error
      The server encountered an internal error or
      misconfiguration and was unable to complete your
      request.Please contact the server administrator,
      [email address] and inform them of the time the
      error occurred, and anything you might have done
      that may have caused the error.
      
      More information about this error may be available
      in the server error log.
      
      Additionally, a 404 Not Found error was encountered
      while trying to use an ErrorDocument to handle the
      request.

      What do you do? Check your error logs. cPanel makes it easy to do this.

      Log into your cPanel. Scroll down to “Error logs.” This link will show you the most recent entries into the error log for your site. Look for the the date and time of the error you are trying to track down. The logs will provide some info about the error and the file that caused the error.

      Here are the login formats for cPanel and web-based email (can be any of NeoMail, Horde and SquirrelMail, depending on what is enabled on your server).

      Remember to use the secure login when you are using a wireless internet connection that is not your own secured network.

      cPanel

      • Non-Secure http://yoursite.com/cpanel/
      • Non-Secure http://yoursite.com:2082/
      • Secure https://yoursite.com:2083/

      Webmail

      • Non-Secure http://yoursite.com/webmail/
      • Non-Secure http://yoursite.com:2095/
      • Secure https://yoursite.com:2096/

      For smart security, put the script that your cron job runs in a directory above your /cgi-bin/ and /www/ or /public_html/ directories.

      This is because if your script is in, or under, your /public_html/ directory, then it can be executed via a browser by anyone anytime.

      In the previous post, I mentioned how cPanel crashes and restarts itself and how this works well.

      Sometimes, it does not restart. This happened to me recently for the first time after years of working with cPanel and Web Host Manager.

      If you have shell access, restart cPanel with this command:

      /etc/init.d/cpanel restart

      At some point you will get an email with a subject line like this:

      cpsrvd failed @ Apr 05 07:08:11 2007. A restart was attempted automagicly.

      Yikes! What the heck this this mean? For a long time, I was so spooked by the words “failed” and “restart” that I assumed “automagicaly” was a typo for automatically and missed the small joke.

      cpsrvd is “cPanel Service Daemon,” which is gives you cPanel services. It crashes. Often. So often, cPanel handles the crash well by restarting and sending you the above email. So, it’s not a problem. Relax. Whew.