Archive for the ‘Web Development’ Category

Upgrade Word Press

Wednesday, February 24th, 2010

I had a bunch of hacked links all over this site. Just upgraded to the latest version available. I couldn’t do the upgrade where the site was hosted because the mysql version was not good enough. So I had to move the site to a different host and then the upgrade went perfectly! Whew, glad that’s done!

Nonprofits and stability in webhosting

Thursday, October 23rd, 2008

As a web developer I get a lot of inquires from business owners who are trying to find a stable, reliable, and affordable webhost. I have spent the last 12 years dealing with different hosting companies on a daily basis and I’m in a position to offer sound advice regarding at least my various experiences with some of the companies offerings and services. I have seen some hosts that get better over time and some that get worse. One of the most frustrating things are companies that seem to offer a lot of storage space and bandwidth for a low price but put severe limits on CPU usage which can in some cases cause severe and sometimes completely disabling downtime to an ordinary website.  Clients of mine want stable webhosts, at the same time they want to know that they’re getting a competitive price.

Delving more into the issue of stability, further stability comes from a webhost that does not overload it’s servers. An overloaded server simply does not perform well. It may have programs that die due to the server being overloaded. At first glance this might not seem critical but it is very critical. For example, suppose that program that dies is the MySQL server. I bring this up because it has been a common problem I have seen over the years. When MySQL dies, any database driven website will die with it. This has been critical for some of my e-commerce customers who simply cannot operate without a database. Consider alternatively if the web server (e.g. Apache) dies. Then the website doesn’t function at all, it’s as if the DNS is sending the potential customer directly into a roadblock the cause of which is an overloaded server. The only solution is for the host to restart the server. This can all be avoided by selecting a quality host that does not overload it’s servers and has the measures in place to correct a problem should it occur.

A few months ago, I had a friend of mine who manages a 501(c)(3) nonprofit contact me regarding hosting for her website. Initially she wanted me to host the site for her, when I told her that is not something I do I began to explore hosting options for her. One main requirement in her situation was for the hosting company to be as affordable as possible as her nonprofit funds are limited. I explained to her the problem of sometimes ridiculous CPU usage limits of low cost companies and overloaded server problems as I explained above. I also wanted to find her a cPanel-based hosting platform as I’ve found that clients prefer this system over other web-based control panels. After looking into it, I found a Nevada based company McKremie, LLC which offers their business hosting plan free to any US-based registered 501(c)(3) nonprofit or to public schools including all the features of their paid plan.

I directed her to the webhosting for nonprofits form and she was up and running with her website shortly thereafter. She has been happy with her hosting, I have done some work on the site and have also been delighted to deal with a quality webhost. Uptime has been fantastic as well as server availability and stability with quick access times of the pages on her website.

 

How to add DIGG buttons to WordPress Blog post

Wednesday, March 21st, 2007

The first time I tried to add DIGG buttons to my wordpress blog post I couldn’t figure out how to do it. I looked at DIGG and found the various image buttons but not how to link to the page. Of course I am fairly new to using DIGG on a regular basis, so this might be more evident for someone with more experience with DIGG. Here’s what I did:

Digg!  

(You’ll have to view the source of the page to see the proper code……. as I still have not found a good way to display code in wordpress).

For the button above I use the anchor url as http://digg.com/submit?phase=2&url=http%3A%2F%2Fwww.mattgregg.com%2FFileName.html … Note that the url= portion of this url is urlencoded where a / becomes %2F and colon becomes %3A.

The icon type shown below is a bit more difficult.

 

In the wordpress wysiwyg editor, </iframe> does not seem to get carried over (from the html edit box) after saving. So what I do is manually add </iframe> directly after this icon within the wysiwyg editor each time before resaving the blog post.

More on installing Godaddy Turbo SSL Certificate w/ WHM

Friday, March 9th, 2007

I had to install another Godaddy turbl ssl certificate today and I thought I’d take some screen shots of the process.

First purchase the certificate here: SSL Certificates from GoDaddy.com

Next login to WHM to Generate a SSL Certificate and Signing Request:

Fill out the form with the appropriate values and click “create”. Next you will see the crt and key information:

 

Leave this WHM window open and go back to Godaddy.

Next go to the SSL certificate section of your Godaddy account. You will see something like this:

Click on “Set up certificate”. Then you will see this:

Then you will need to create an SSL account or login if you already have one:

Select the ssl certificate to use:

STEP 1: Fill out the form:

STEP 2: PASTE THE CSR (certificate signing request) THAT YOU PREVIOUSLY GENERATED IN WHM:

Review and confirm the information

Check your email for the notice. Click on the link in this email to download the bundle and crt:

When you click the email link you will arrive at this page, select the server and contine:

Then you can download the zip file containing the crt and bundle

This shows the contents of the zip file:

Now Open a NEW Window and go to WHM again and click on Install a SSL Certificate and Setup the Domain. Paste the CRT from the www.—.com file in the zip file downloaded from Godaddy. Enter the domain, account username, and dedicated IP address for the domain. The next box for Key is the same one generated earlier from the “Generate a SSL Certificate and Signing Request” process in WHM and begins with “—–BEGIN RSA PRIVATE KEY—–“. The last one, CA Bundle, is the other file in the zip file from Godaddy. Copy and paste the entire contents of the file here, click Do it and if all goes well you will receive a success message and are done. Scroll down to see a screen shot of the WHM form.

If you found this useful, please Digg it by clicking below:

Digg!

For the first part of this article, see here: Godaddy SSL Turbo Certificates

If you haven’t already purchased the SSL certificate, you can do so here:  SSL Certificates from GoDaddy.com

If you haven’t already purchased the SSL certificate, you can do so here:  SSL Certificates from GoDaddy.com

 

Review of Multi Domain Web Hosting offers

Thursday, March 8th, 2007
 

Review of Multi Domain Web Hosting offers from Charles Leighton

I’m an avid photographer and sell my photographic prints via my three websites. When I look for a webhost I only choose ones that offer multiple domain hosting so that I can easily host my 3 websites at one place, with one control panel, 1 ftp and 1 bill. There are a number of compaines that offer multiple domain hosting, some have better features than others and some are cheaper, some faster, some more stable. In the review below I attempt to qualify these factors with my review of these three webhosting companies.

The most recent hosting company I’ve tried is Host Gator. This was tried after having experience with both Blue host and Lunar Pages along with a number of other hosts that I have since dropped in the past due to one issue or another. Host Gator does not limit the number of domains that I can host on my account. If I choose to add more sites, I just register the domain and add it in the control panel. I have all the features I need here and I just have the baby plan. While it offers less space and bandwidth than some of the other plans Host Gator has been a good company to deal with. They also feature the swamp plan which offers twice the space and bandwidth. One thing I really like is that they have no setup fees and I pay the same price whether I pay by the month or by the year.

Next I will review Lunar Pages which offers 10 domains in their multi domain hosting package. The basic plan at Lunar Pages is advertised as being the largest space and bandwidth of the plans reviewed on this page.

What I especially like about LunarPages:

  • Solid company
  • Good customer experience
  • Excellent tech support
  • Good price for a full featured plan
  • Largest space/bandwidth of any plan on this page

I have also tried Bluehost. Bluehost was one of the first companies that I tried. They are always upgrading their service with better servers, faster speeds, more features, more bandwidth and hosting space. They are a good company based in Orem, Utah.

The reason I left Bluehost was thier shared ssl was shared by all the users. This is only a problem if you are taking secure information from your customers such as credit card information. If you are not taking sensitive customer information you do not need to use the SSL feature. Bluehost offers a great full featured plan and website response and uptime was great. Their 24 hour phone support is top notch. If there is a problem they don’t try to deny it like some companies. They will tell you what the problem is and will actually give an eta when it should be fixed. I like Bluehost, if they’d put a little more into their SSL service I’d go back. Their plan offers a total of 6 domains which is the least of any on this page but for me it is fine because I only have 3 sites with no plans to have more than 6 in the near feature.

In the table below I’ve summarized the offerings of these 3 multiple domain hosting companies and their respective packages.

company # of domains price space bandwidth refunds cpanel domain
Bluehost Web Hosting $6.95
Bluehost
6 Domains $6.95/mo/2 year – $7.95/mo/1 year 200 GB 2000 GB/Month not advertised yes free domain and domain privacy
250 GB and 2500 GB for $6.95 a month!
Lunarpages basic hosting
10 Domains $6.95/mo/2 year $7.95/mo/1 year 250 GB 2500 GB/Month 30 day money back yes free domain

HostGator Baby plan
Unlimited Domains $9.95/mo 100 GB 1000 GB/Month 30 day money back yes $15/year

HostGator Swamp plan
Unlimited Domains $14.95/mo 200 GB 2000 GB/Month 30 day money back yes $15/year

Other things to condider are the CPU usage allotment of the hosting plan. It is possible that a user may never be able to use all the advertised bandwidth because the hosting company has set the cpu usage limit too low. CPU usage refers to the amount of activity that your site performs on the server. A simple html page will not have much CPU activity even if it is heavily accessed. But a complex php sofware package with a backend mysql database with possibly complicated queries or a large database size or inefficient scripts will put a much heavier demand on the cpu. In this case it is common for anything more than a handful of users accessing the site at the same time to cause your hosting account to temporarily exceed it’s cpu allotment. This may cause your account to be temporarily suspended. If it happens too much the web host may drop you depending on their terms of use but all web hosts will protect themselves against high cpu users.

Next we discuss shared ssl. Shared ssl is nice if you have a small business and do not want to pay a yearly fee of about $70-$300 for a private ssl certificate. Because I sell my photo prints online, I make sure the account I purchase offers shared ssl. Bluehost shares the ssl certificate among all it’s users so it can be slow at times. For a private ssl, in addition to the annual fee, you may have to pay an installation fee and will have to have a dedicated IP address for your website. This usually adds $2-$4 per month to your web hosting bill. Some web hosts do not offer this option, so if it is important to you, you’ll want to check with the webhost before purchasing the hosting package. Lunar Pages offers a dedicated IP for $2.50 additional per month. The cheapest private ssl certificates are usually through Comodo and they are a quality certificate recognized by all the popular browsers. HostGator does not offer the best shared SSL service either. Their SSL certificates are privately generated so they will show your customer a security warning. HostGator claims this is because your domain is not the same as the one on the SSL certificate, but that is not the issue, because we are not accessing it through the domain, rather the shared ssl domain which can easily be secured without errors if HostGator would spend the money on browser recognized certs and not just generate their own private ones.

In summary, all three of these companies multiple domain hosting plans are good offers. For unlimited domains and month to month contract, go with Host Gator, for more space and bandwidth go with Lunar Pages and Bluehost is a great company as long as you are not using the shared SSL which is too slow, HostGator is also not a good choice for Shared SSL, but they will get you a private SSL for about $75/year which is very reasonable. 

Redirecting to www.

Thursday, March 8th, 2007

In Unix or Linux Apache with mod_rewrite this is easy.

Simply add the following to your .htaccess file in your public_html directory.

RewriteEngine on
RewriteBase  /
RewriteCond %{HTTP_HOST}   !^www.domain.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^(.*)         http://www.domain.com/$1 [L,R]

If you have subdomains, this will redirect all of them to http://www.domain.com/, to prevent this do the following:

RewriteEngine on
RewriteBase  /
RewriteCond %{HTTP_HOST}   !^www.domain.com [NC]
RewriteCond %{HTTP_HOST}   !^subdoamin1.domain.com [NC]
RewriteCond %{HTTP_HOST}   !^subdomain2.domain.com [NC]
RewriteRule ^(.*)         http://www.domain.com/$1 [L,R]

Installing GoDaddy Turbo SSL Certificate w/ WHM – How to

Thursday, March 8th, 2007

After looking for a SSL cert that was affordable and provided good browser recognition, I found the GoDaddy Turbo SSL certificate, check them out here: ” SSL Certificates from GoDaddy.com .” I did some research online about this ssl certificate and although priced much lower than any other certificate it seemed to provide the same features, security, and browser recognition as higher priced certificates from other companies. I went for it at $17.99/year with a 2 year commitment. Other certificates such as Comodo or Rapid SSL which still aren’t brand name certs (these used to be the discount guys) run about $79.99/year. The turbo SSL cert from Godaddy provides a secure connection for your customer, and all the other standard browser security features that a browser will normally show (the closed lock icon, etc.) The certificate has 99% browser recognition, which basically means that only browsers that are years old will not recognize the cert and will show the website visitor a security warning. Since most people aren’t using these browsers anyway, this should not be a concern for most website owners.

SSL Certificates from GoDaddy.com

The installation of the godaddy turbo ssl certificate was pretty easy. I was waiting for an email from godaddy but one never came so I checked my godaddy account. Login to godaddy, click my account, click on “Manage Secure Certificates” from there it will show you your SSL certificate credits and allow you to proceed with setting up the certificate. Be sure when you set up the ssl certificate, if you want it for www., you must specify www., if you just put domain.com then www.domain.com will display a security error. If you want it for both, you must purchase 2 certificates or a more expensive wildcard certificate.

I use WHM on my servers and it makes it easy to install a SSL certificate. In WHM, first give the site a dedicated IP address if it doesn’t already have one by going to Change Site’s IP Address in the account functions section. If you don’t have an extra IP, you will need to purchase one from your web hosting provider. Note that this may cause your site to go down until the DNS propagates throughtout the internet. Next go to Generate a SSL Certificate and Signing Request enter the required info and click create. Save the important key data that is generated.

SSL Certificates from GoDaddy.com

Back at godaddy, you will need to download the key files. Once you have all this data, go back to WHM and click on Install a SSL Certificate and Setup the Domain and copy and paste the info, including the start and end line text. Save it and that should do it.

For more information or to purchase, visit Godaddy at SSL Certificates from GoDaddy.com

Below are some screen shots of the new secured site (domain name removed):

 

 

 

 

Clearing up space on your webserver

Thursday, March 8th, 2007

Here’s a tip for clearing up potentially large amounts of space on your WHM/CPanel webserver.

First, you can go to WHM to “list accounts” to see the usage of each account. If anything seems out of line, you can go to that accounts Cpanel and look at “disk usage”, this will show you the size of each folder. One to note for this discussion is the tmp/ folder and its subfolders.

The tmp folder contains stats program data that runs backend on default cpanel/whm installs.

The biggest user of space I found was the analog program which may fill your server with potentially gigabytes of data. Since I don’t use the analog stats program or the webalizer, I just deleted these folders via ftp or ssh.

Next, to turn off the programs entirely, I went into WHM and clicked on “Statistics Software Configuration” near the top of the left menu. Here, check the box “Allow users to change their web statistics generating software.” and click save. Now it will allow you to turn off the stats programs you don’t use.

I freed up about 38% of my web space by doing this.

awstats Error: Failed to write temporary history file

Monday, February 26th, 2007

Out of the blue I received this error tonight when looking at my awstats stats

“Failed to write temporary history file”

First I thought something happened with the permissions because I had recently been playing with the .htaccess file. After a few failed attempts with adjusting permissions and the htaccess file I looked elsewhere.  

The problem was I had run out of disk space. I added some disk space to the account and all is well.

Bluehost Shared SSL Secure Server

Thursday, February 15th, 2007

Bluehost Review 

If you intend to use Bluehost for Shared SSL service, read this first:

All customers of bluehost are sharing 1 SSL cert on 1 server. All customers.

The secure address is https://secure.bluehost.com/

The massive amount of activity on this 1 server makes it unusable at times and very slow at the best of times.

Bluehost does offer ability to upgrade to a private SSL for a resonable price but I can’t see upgrading there because of the low limits they put on CPU usage before they 301 redirect your whole account to a CPU overuse message page that makes that sends a website visitor into la-la land. Since they are redirected, if they try to reload the page they will never get back to your site and using the back button will only further redirect every page to the same CPU overusage page. They can go all the way back and still never be able to just hit reload to bring the site back up. If they go all the way back they’ll have to type in the URL to try to reload the page or close the window and start over.  

Phone support at Bluehost is good but email support is horrible usually taking 3-5 days or more for a response if you get a response at all.

If they would just fix the shared SSL problem and the CPU overuse and allotment they would have darn good service.