general: updated compatibility

Also removed mysql_escape_string functions (not sure what they were
doing there in the first place!)