talideon.com

I was dead at the time!

November 20, 2007 at 4:14PM Getting “Fatal error: Class ‘Net_DNS_RR’ not found” with Net_DNS 1.0.0?

Here’s what you do. Open up the file containing Net_DNS_RR, which on my Ubuntu system at work is at /usr/share/php/Net/DNS/RR.php but this will vary from OS-to-OS and distro-to-distro, and move the require_once directives in the fold block marked “Include files” after the fold block marked “Net_DNS_RR object definition”.

The error is occurring because the classes in the included files are attempting to extend a class which has yet to be defined, so PHP dies horribly.

The lesson here for everybody is that you should define your base classes before you subclass them. Bad Net_DNS developers!

Update: Grr! Niall tells me that this bug has been around for about four months and still nobody submitted a bug report. FFS! Does nobody have the common sense to take five minutes to submit a blasted bug report?! Gah! I’ve submitted one, which’ll hopefully be more successful than the last one I submitted to the PHP devs...

Update: It’s November 30th, and still no progress on that bug. I’ve tried giving the devs a poke because the fix is quite simple and I did provide a patch after all...

14:35: Just got some feedback on the bug. It’s been marked as closed. While I’m not entirely happy with the resolution, I think I’ll let this stand. :-/

Technorati Search Technorati Search Irish Bloggers

Comments

No comments.

Post a comment

All form information is optional, but it’s a good idea to fill in your name and email address if you want me to take your comment seriously.

Spammers, don’t bother posting crap down here. The site is set up so that legitimate search engines (Google, for instance) won’t index pages with comments on them. Posting crud here only means you’re wasting my time and patience. Shoo!

Real names, please. Please include!
Won’t be displayed. Please include!
Displayed, if present.