Prevent PHP warnings regarding socket resources