In this edition…

Continue Reading…

I’ve posted my slides from my “Introduction to the Yii Framework” presentation that I gave at True North PHP in Toronto, Canada on November 2, 2012. Although the conference organizers had hoped to record all the sessions, that didn’t end up working out. I should also warn you that half, or more than half, of the presentation was me doing a live development of a Yii-based site. All that content is not reflected in the slides. Those caveats aside, here you go…

Continue Reading...

If you’re doing any sort of e-commerce, you’ll need a Secure Sockets Layer (SSL) certificate to support Hypertext Transfer Protocol Secure (HTTPS) on your website. I’ll say that again:

If you’re doing e-commerce, you need SSL/HTTPS.

This is not negotiable. I understand that this represents an added expense and hassle, but HTTPS is a must. In this post, I’ll first explain why using HTTPS is a requirement, and then discuss how you go about acquiring and installing an SSL certificate. (Although this post is designed to be generally useful, I’ve included it in my series on Stripe because you’ll need HTTPS setup in order to begin using Stripe to handle payments.) Continue Reading…

An article I wrote, titled “How to Store and Retrieve Binary Data Using PHP and MySQL“, was just published online by Peachpit Press. In the article, I explain how you store and retrive binary data using PHP and MySQL (it’s a clever title that way). I also explain why you might want to do this, which is equally important.

This is the first of four new advanced PHP articles that will be published online over the next couple of months.

How to Pick a Data Center

November 9, 2012

My hosting company, ServInt, posted an interesting article back in June titled “How to Pick a Data Center“. The article discusses the two biggest factors on your site’s latency (how long it takes data to get from the server to the client, aka ping time):

  • Physical distance
  • Network quality

The article also includes a tool for testing connections to ServInt’s three data centers, the kind of tool your hosting company should also provide. For example, from my location in Pennsylvania, US, I can ping the Washington, D.C. location in 71ms. The LA location has a ping time of 111ms, which is 50% slower, and the Amsterdam location is slightly slower than that, at 123ms. My server happens to be in the DC location, so people in a rough geographic area similar to mine (say, eastern North America) are probably having an experience similar to me. People on the West coast are probably having a similar experience that I have in pinging LA.

The point of the article is that you should use a data center close to where your current, and future, clients are. For example, if I ran a Web site about Hollywood, I’d want to host that near Los Angeles; one on politics: near Washington, D.C. This is probably something many people don’t think about when choosing a hosting company, but you should.

Of course you can balance out the inequities using a Content Delivery Network (CDN), but even there, physical locations matter. I know, for example, that I get a lot of traffic from the eastern and southern Asia, as well as the Pacific, Australia, and New Zealand. Because of that knowledge, I choose to use Amazon Web Services for my CDN, as they have more locations in the southern hemisphere than the alternatives.