Thursday, February 18, 2010

Resolving Name Server IP Addresses

Ever thought about this? If I want to find the website example.com then my computer begins by contacting the TLD (.com) and finding the authoritative name server for example.com. If it is ns1.example.com, then how does my computer figure out the IP address for this subdomain? Is there a name server for the name server?

After searching about, I've been educated.

This problem is called circular referencing, for obvious reasons. So, to solve this problem, you register name servers with the same people you register the domain with. You specify the name of the name server and an IP address and they register what's called a glue record. This glue record is stored by the TLD (e.g., .com) name servers so that the IP address of your name server (e.g., ns1.example.com) can be sent when needed.

Bit 'o knowledge for you.

Need to check your glue records? A quick search on Google for glue record provides promising results, like this site.

Tuesday, February 16, 2010

PHP image manipulation

If you have ever wanted to dynamically create or edit images, GD is a great solution for PHP (and LAMP configurations). I am writing this blog entry mostly because I was amazed at how easy it was to install. I just picked it in easyApache (using WHM) and "tada!" – it works. I can't say that about imagemagick. I've tried and tried to get that bit of software to work (on multiple servers) and it is always a pain. I remember on my first server (hosted by another company) I had requested imagemagick and they even had trouble installing it—the help desk ticket was pretty long by the time it was closed.

Anyway, moral of the story: Go with GD for dynamic image manipulation in PHP.

Monday, February 15, 2010

APC.php not Working

I was getting a new server up and running and wanted to install APC (Alternative PHP Cache). Things were going great. I even ran phpinfo() and noted that APC had an entry. Everything was super, right?

I wanted more confirmation, so I used SSH, located apc.php and copied it to a domain for public access. I wanted to know how well APC was working for me. However, it wouldn't run. It sent back errors and when I tried to debug it I got no where.

Turns out, APC wasn't really doing much of anything. I had PHP installed and running as a CGI instead of an Apache Module. If PHP runs as a CGI, APC closes at the end of each script run and the cache is lost—it doesn't make much sense to use APC in this situation. While runing as a CGI has some security benefits you lose a bit of performance and, more importantly to me, APC doesn't really work.

I use WHM and so I went to "Main >> Service Configuration >> Apache Configuration" and then changed the PHP 5 handler to DSO. This solved the problem and apc.php loaded just fine the next time I tried. And it even had some pretty stats for me to see.

Saturday, February 13, 2010

Easy Ways to Accept Donations Online

There are a lot of options out there to help non-profits accept donations online. I want to briefly mention to different categories of solutions to help people who are trying to figure out what is best for their non-profit or church.

  • Perhaps the easiest solution is to use a service like PayPal. You sign up for an account and give them your account info and you are up and running soon. This is technically called an aggregation service, because you do not need to have any special accounts set up—PayPal has done that and accepts payments on your behalf. Google has a similar solution except that it, unlike PayPal, unfortunately requires donors to have Google checkout accounts. With these types of services you will have to pay higher per-transaction fees (10 to 30 cents) and transaction rates (around 3%).

  • The second option is to get what's called a merchant account. This is a special bank account that allows you to accept credit card payments directly (instead of through an aggregator, like PayPal). This is a process that requires an application and some extra steps to setup, but it is often worth the time. The per-transaction rates are almost always lower this route, but there are monthly service fees that are standard (around $10 to $30). Because of this, merchant accounts best for non-profits who are accepting more than a couple hundred in donations a month (but you'll have to do the math to make sure). The cool thing is that if you decide to get a merchant account, your donor's bank statements will actually have your organization's name next to each donation (as opposed to PayPal or Google).


If you want to accept donations online, the second option is a little trickier (because of security standards called PCI-DSS). But, there are companies out there like BlueFire Donations, which can help make this a breeze, helping get non-profits accepting credit credits online in no time.

Got a question? Post in the comments and I'll do my best to help out.