Add 'point' and 'json' type cast. \nChange data retrieve from fetchObject to fetchAssoc to prevent double work.
Fixed (added) port using for db connection