Archive for the 'web hosting' Category


Half an IP address and the fix for the Yahoo Search API 999 error

The Yahoo Search API has been driving me nuts.  I started to get 999 errors on all the calls I was making from a new app I was developing (“999 Rate Limit Exceeded” was returned in the response).  What was really driving me nuts was that I was only making a handful of calls per day – I knew I wasn’t exceeding the 5000 rate limit advertised by Yahoo for the Search API.

FYI – skip to the end for the fix…

Since the rate limit is applied per IP address I convinced myself that my problem was due to somebody else’s app running on the same server.  Not ideal but it would be a downside of shared hosting.  So I immediately signed up for a unique IP.  The next day was spent figuring out why this didn’t make any difference.  Turns out a unique IP on shared hosting isn’t actually a complete IP – it’s only half an IP.  Unique/dedicated IPs are generally provided on shared hosting for SSL.  This only requires incoming requests for your site to be directed to a unique IP address.  However outgoing requests (eg from a PHP script) do *not* originate from the dedicated IP but from the IP address of the shared Apache instance.  Ugh.  Understandable in hindsight but it totally didn’t meet my expectations.  The upgrade to a private server or virtual private server would get me a “whole” dedicated IP… maybe when this app starts making cash I’ll spring for it.

Anyway, after figuring out the above, spending an hour setting up routes through my various firewalls, installing a proxy (CCProxy worked perfectly) I was able to pass the request through my laptop and hence originate it from a different IP address which I knew for sure wouldn’t be rate limited.

Guess what.  Still getting 999 errors.  However copying the URL to my browser returns the entire set of results immediately.  Same IP same request, no?  Ugh!  Something crucial had to be different between the request coming from my browser and my script.  After experimenting with every cURL option in the known universe I finally figured out the undocumented API requirement.

The Yahoo Search API now requires the HTTP User Agent to be set.  Eg:
curl_setopt($session,CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");

This appears to be a new undocumented requirement but it does match the User Agent requirement listed against the shopping API.  I tried various User Agent strings and just about anything seems to be accepted but Yahoo suggests faking a commonly used User Agent string for the shopping API so it’s probably best to stick with a browser UA.

Anyway, worked like a treat.  The stupid little things always suck up the most time.


How to transfer a domain from GoDaddy to Dreamhost

GoDaddy TDNAM (Domain Name Aftermarket) can be a good place to snap up a useful domain or two. 

However even if I snap up a domain at GoDaddy (and end up with the registration at GD as a result) I normally host with DreamHost.  However domain privacy has to be controlled via the registrar.  Anyway, GD’s privacy, hosting (well, OK, everything) is too expensive to my liking so as soon as the domain is unlockable I transfer the registration to DH.

I’ve done this whole process in the space of 30 minutes with privacy back on and the web site up and running again.  The process is only painful if you miss a step and end up with the transfer in Never-Never land!

  1. Log in to GoDaddy & Unlock domain in web panel.  GoDaddy will send you an email to let you know.  You have to unlock the domain to allow it to be transferred out.
  2. If you have GoDaddy’s privacy turned on, turn it OFF!  You should receive a “cancellation confirmation” for the cancelled domain privacy order.
    At this point you need to wait for DNS to propogate since DreamHost’s system will read the WhoIs to send a confirmation email to the domain owner.  If you leave privacy on or don’t wait long enough, good luck ever seeing that email.
    A good way to check whether the new Whois data has propogated is to run a whois on the domain you’re trying to transfer.  If the privacy details have been replaced by your actual contact details then you’re good.
  3. Unlock the domain from the GD control panel
  4. Request an authorization key from GD control panel.  (Some companies call this the “domain secret” code).  You should receive it by email within a minute or two.
  5. Go to DH control panel and click “transfer domains”.
  6. Enter the domain and the auth key
  7. Click transfer and pay the annual domain fee
  8. The email address shown in the WhoIs entry will receive a confirmation email from DH.  You will also see this email address in the DH web panel – “Approval email sent to xxxx”.  If it was sent to the privacy company then you didn’t wait long enough for the WhoIs to propogate.  Click re-submit and try again.
  9. Click the link in the email from DH and accept the transfer.  You must click through and accept the transfer.
  10. DH will send you a confirmation of the transfer.
  11. GD will send you a confirmation of the transfer (no need to accept at this point – GD has
    already been given the auth key rememeber).  [Update – GD has changed the process slightly in that this notice gives a date by which you must respond if you *don’t* want the domain transferred.  You can either wait for this date to pass (it’s a few days) or log in to the GD domain panel and force the transfer by accepting it.]
  12. You should receive another cancellation notice from GD for the cancelled domain.
  13. You should also reveive a success notice from GD saying that the domain has transferred to another registrar.
  14. You should now be able to log in to the DH web panel, make sure they also think the domain has transferred (if you look under “Reg Transfer” it’s no longer in the pending list but *is* in the list of available Auth codes at the bottom of this page.
  15. Go ahead and check privacy is back on with DH (no extra charge for this from DH – thanks guys!!!), finish any other setup of hosting or the domain if necessary and check the domain is working.
  16. You’re DONE!


https SSL PHP hosting choices

Dreamhost offers secure hosting by default on their new ‘Happy Hosting’ plan which is $9.95 per month with no setup fee if you sign up for a year.  (They recently ditched the previous tiers including the Crazy Nutter Unbelievable Astonishing Domain Insane – well OK, they didn’t really call it that).

However you do need both a static IP (“unique IP”) which runs under $50/year from them – and you can’t BYO plus you need an SSL Secure certificate – $100/year but you can BYO.  Dreamhost’s support wiki has a good explanation of the types of SSL cert.

So basically for shared hosting, the lowest cost would be about $270/year with DreamHost.

1&1 includes a GeoTrust SSL certificate in the “Developer” package which runs $20/month.  Or it can be added to their other packages from the $4/month “Beginner” to the $10/month “Business” for $50.  There’s no setup fee when paying 6 months ahead.  The 1&1 setup process does appear to be simpler – no worries about adding in a unique IP for example.  Good thing
really given the lack of documentation on the process.

So the cheapest 1&1 SSL enabled solution is just under $100.


Tax time – who came through and who blew?

Come tax time, I want all the right information in front of me quickly so that I can get it all stuffed in TurboTax and be done.  So how easy was it to handle taxes from various different income and expense streams? 


Dear old Commission Junction sent me a 1099-MISC so that was easy.  CJ advertisers were the most profitable income stream for me in 2007… so I was glad this was seamless (I’d filled a W-9 for them with my SSN earlier in 2007).


Google Adsense also sends 1099’s so that’s easy too.  Good so far.


Now to expenses… doing business on the web isn’t free as you know… and I have many miscellaneous expenses through the year.  Basically it’s up to you to keep tabs on it all but I figured that at least for my hosting providers I’d be able to pull a report.  Sadly not so.

Thanks DreamHost

DreamHost pulled through – I was able to pull a summary invoice for 2007 which itemised the monthly payments and the total paid during the year.  Thanks DreamHost.

1&1 🙁

1&1.  Sorry guys, you completely flunked this test.  No way to pull invoices for just one year, no way to print out a summary with a total.  Sorry 1&1 but this sucked.


Adwords was a slam dunk.  Just like DreamHost I was able to pull a whole year of invoices with a total paid through the year.  The printout also showed the remaining total owed as well but this isn’t relevant for the tax forms – we only need be concerned about payments.

Now time to add up all those little suckers….!


Changing the default PHP version under 1&1 hosting

Ya can’t.

Well, OK, you can force it by using ‘.php5’ as the extension for all the PHP files. This works if you’re writing all your own shit but not much cop if you’re installing scads of downloaded ‘.php’ files.

What bollocks. Dreamhost makes it easy in the web panel – you simply select whether you want PHP5 or PHP4 as default for a particular domain. (Current options being PHP 4.4.7 or PHP 5.2.2)

And while I’m on the subject of figuring out why my DOMDocument wasn’t working, 1&1’s documentation blows compared to Dreamhost’s combination of support Wiki and forums.



The last honest cowboy

You’ve gotta credit it to them.  Dreamhost actually tells you when they screwed up. 

In fact, they tell the whole world on their blog.  So even if you never noticed a server went tits-up, there it is for all to see.  Let’s face it, all hosts have glitches.  Dreamhost is one of the few who open up and admit their mistakes.

Honesty is a rare thing these days.  And I figure if they are so blatant about the glitches, outages and screw-ups then I’m never going to be in the dark wondering if they have kept something from me (or worse, many small outages) which I will never know for sure but will always be there eating up my margins.

AffiliatesOnFire is hosted on Dreamhost.  Thanks Dreamhost.