Skip to content
Advertisement

Blank page issue for Laravel project in Subdomain

I am having a Blank Page issue for Laravel Project in a Sub-domain (cPanel). The root domain (https://ratul.info/) already has a Laravel application. So I was trying to upload another Laravel project in a Sub-domain (https://ecommerce.ratul.info/). Unfortunately, it was showing a White Screen with no error.

Sub-domain details

  • Subdomains: ecommerce.ratul.info
  • Document Root: /public_html/ecommerce

Files of public and index.php is in /public_html/ecommerce and other files are in /public_html/ecommerce/flipmart.

The folder structure is Public_html > ecommerce > flipmart

I have changed the path in index.php

require __DIR__.'/flipmart/vendor/autoload.php';

$app = require_once __DIR__.'/flipmart/bootstrap/app.php';

Sub-domain is working fine. I have checked with simple HTML files.

Advertisement

Answer

require DIR.’/flipmart/vendor/autoload.php’;

$app = require_once DIR.’/flipmart/bootstrap/app.php’; is all good if Here ecommerce is your subdomain root directory and flipmart is a subfolder of ecommerce (if i am not wrong) . Also check vendor folder exist.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement