Loop with this instead, this works fine:
while (null != (str = dataIn.readLine()) && !str.isEmpty()). The code itself doesn't really do anything, but you need to interact with the cli interface before it will launch the gui.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php