Amazon Didn’t Lie

Posted on September 14th, 2009 in PHP, Uncategorized by Russ

I’ve been wondering why the feed-getting scripts on http://www.newconsolegames.com/ kept hanging and causing server problems. Seven or so of those scripts all running at once can cause that!

So I spent an hour fixing some error reporting to them. And then tested it– and what did I learn? First, I coded it using “fopen(url,r) which didn’t get me anywhere when fopen died. I didn’t do any error checking on that– so what was hanging the system was an infinite “fopen did not return a resource” in a while loop.

Second, fopen was dying because I ignored Amazon’s requirement that we start signing our AWS requests effective 8/15. … Now I have to figure out how to do that and implement it on about five sites that get amazon info and update databases! Stupid me. I could have done this better. But I was “busy!”

ipcalc

Posted on March 22nd, 2006 in Uncategorized by Russ

I have a new tool in my arsenal.

I had to configure a network recently- and we were given the CIDR notation of x.x.x.x/26, which is smaller than a normal class-C subnet. It’s been a while since I’ve manually had to figure out subnet masks, gateways and network addresses but I gave it a go. Then I asked someone else for clarification. I had done it right– she confirmed my work with

“$>ipcalc x.x.x.x/26″

Which is interesting- on Fedora Core 4 , this gives a “help” screen and you have to use -bmn flags, and you get back:

$ ipcalc -bnm 192.168.1.0/26
NETMASK=255.255.255.192
BROADCAST=192.168.1.63
NETWORK=192.168.1.0

while on Debian, you get back something completely different:
~$ ipcalc 192.168.0.1/26
Address: 192.168.0.1 11000000.10101000.00000000.00 000001
Netmask: 255.255.255.192 = 26 11111111.11111111.11111111.11 000000
Wildcard: 0.0.0.63 00000000.00000000.00000000.00 111111
=>
Network: 192.168.0.0/26 11000000.10101000.00000000.00 000000
HostMin: 192.168.0.1 11000000.10101000.00000000.00 000001
HostMax: 192.168.0.62 11000000.10101000.00000000.00 111110
Broadcast: 192.168.0.63 11000000.10101000.00000000.00 111111
Hosts/Net: 62 Class C, Private Internet

Strange, huh? But at any rate, either screen gives me what I wanted.

Untreated Sewage in the Water

Posted on March 4th, 2006 in Uncategorized by Russ

Living in Portland, we have terrific water. The Bull Run brings us clean water every day; and we drink bottled water to get it extra-clean.

Email is a lot like water; It’s ubiquitous. You can’t turn around without being faced with email. But it’s polluted too; we usually call it “spam” and say that it’s a price of having email at our fingertips. While every second email flows through the Internet, spinning with the tides, it’s also filled with commercials for v14gra and for new home m0rtg4g3s … It’s also filled with more nefarious crap like the Soder worm and other virii that read your inbox on your home computer and contribute to the pollution by spamming everyone on your contact list.

I believe that if your provide email service, you have an obligation to filter the inbound email as best as you can so that your own users don’t get an overflow of debris and trash, and also to filter the outbound email to make sure that your users aren’t contributing to this sludge in the ‘net. But more and more I seem to be in the minority.

Dude, you’re getting a Google

Posted on January 3rd, 2006 in Uncategorized by Russ

Google technologies is expected to leap into the hardware business tomorrow, following the keynote address that everyone’s talking about. We have an advanced image of the new computer. Get yours at Walmart today!

PHP Greetz Exploit

Posted on November 26th, 2005 in Uncategorized by Russ

PHPGreetz is an open source, free, and powerful php site building tool- it’s designed to help you build a greeting card website.

Are you using it?

If so- not only is it under active development, but a large hole has been found in the code allowing an unfriendly to execute whatever code they want. Here’s the details… phpgreetz exploit.

Included code like this one are fairly easy to create; fixing them is another matter.

Microsoft Adapts

Posted on November 8th, 2005 in Uncategorized by Russ

I’ve been sentenced and done my time working with Microsoft tools. I spent a long two years administering an IIS server / SQL server combo for the Internet marketing arm of a publisher. I am an MCSE, although it’s getting kind of long in the tooth and overgrown. I still have the MCSE’s first response to an unknown error. (Reboot it).

But it appears that not only does Microsoft do the absorb and extend trick, but also they learn from prevailing winds in the market. They’re offering SQL Server for free. You can actually download a fair sampling of their back-office software, register for a key (or download an ISO) and be up and running within a day. That’d be pretty awesome if I wanted to take my eyes from my current project and start working with their technology again.

But it’s good knowing where they are, so I can sort of keep them located on a mental map of me, them, and what I want.

Bash Loop Caveat

Posted on November 1st, 2005 in Uncategorized by Russ

One thing to be aware of when doing this bash loop; the ssh that runs within the loop won’t have the full environment variable set for the user on the remote computer. So if you have two versions of php, you may be checking the version of the wrong one.

Not that this would happen, mind you… *blush*