Made some progress. Runs locally but mysql function issues in open.php.