Fix $errno

Removed the closing PHP tag and fixed the non existant $errno variable