Thursday, August 24, 2006

Odd "Array" output in Joomla/PHP module solved

I had an odd problem in which a Joomla! module I was writing was outputting "Array" after its output.

I didn't find any code in the module itself that was capable of outputting this error message, since this came after the last line of the module's output echo() statements. So, I was puzzled!

Then I realized that it might have been because I had overwritten a global variable. I had liberally used variables like $id, $content, $categories, etc. So I replaced all my variable names with ones that couldn't possible belong to the reserved variable list ... such as $category__id, etc.

And that solved the problem! :)

Friday, August 04, 2006

C libraries to capture layer two packets

For the 7DS system, we need some libraries for peeking at the link layer packets. These are the ones we found:

Libradiate: http://www.packetfactory.net/projects/libradiate/
libpcap: http://www.tcpdump.org/
libnet: http://www.packetfactory.net/libnet/