Refactor PhpServlet to provide webserver standard environment