Changes to support newer versions of PHP and support for DB_PORT in dbconfig.