shouldn't the $socketname be $sockname ? That would explain why it's trying to use GET as the socket instead of the actual socket. I've never really used sockets other than for version checking, but it does make sense to me.