I have a remote repository with a Craft install and am trying to pull it to a new environment. I run the composer install and Craft & other packages install seemingly correctly, added the .env file and set up the Apache server to point to the /web folder. When I load up the url I get a visual of the index.php file:
// Set path constants define('CRAFT_BASE_PATH', dirname(DIR)); define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH.'/vendor');
// Load Composer's autoloader require_once CRAFT_VENDOR_PATH.'/autoload.php';
// Load dotenv? if (class_exists('Dotenv\Dotenv') && file_exists(CRAFT_BASE_PATH.'/.env')) { (new Dotenv\Dotenv(CRAFT_BASE_PATH))->load(); }
// Load and run Craft define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production'); $app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php'; $app->run();
No urls seem to be working e.g. /admin or /index.php?p=admin/install and I can even put anything as the url and nothing errors, just shows this file still.
<?php phpinfo(); ?>
in to check. – dmatthams Jul 16 '19 at 11:02