Code Rewrite

Rewrite start.php as env detection doesn't work.
Now works and database connected correctly