Error: Contao Manager shows only PHP code instead of the login page

This is an archive post. It will not be updated.

The error

You downloaded the Contao Manager file from contao.org and then uploaded the contao-manager.phar directly to the /web directory as it was. When you call up the address in the browser, you now see the bare PHP code instead of the login window.

The cause

You forgot one little thing: change the file name from contao-manager.phar to contao-manager.phar.php. That’s the only way the Contao Manager can work.

Important: You then of course have to call up the Contao Manager with contao-manager.phar.php in the browser, so that you don’t run straight into this error afterwards:
“Notice: Undefined offset: 1 in /web/contao-manager.phar.php on line 61”.