Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nafakhari's avatar

Error on site when upload on live server (ErrorException in ClassLoader.php line 444)

Sir, I create a cms its run good on localhost xampp but when i deploy on live server the return errors, i search on google some persons says its hosting issue but when i contact with hosting provider they install laravel fresh version on my hosting and run this its running fine, but when i deploy my project they send me error.

My script on this site http://pantexmedical.co.uk/unito/welcome

please help me

0 likes
50 replies
jlrdw's avatar

Are your words, classes, filenames proper case, linux is case sensitive, windows is not.

nafakhari's avatar

if u help me i give u my hosting penal user and password

jlrdw's avatar

I just visited the site http://pantexmedical.co.uk/unito/.env and can read your env file, you have not installed laravel correctly, main laravel goes above (www, htdocs) or whatever the web folder is on that server, again follow this guide

http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/

For example you have no password listed, so the way you installed is not secure or correct.

If you install correct it will work, also install like this in development in xamp, makes for less problems later.

Not saying password is at fault, just showing I can see the .env file.

EDIT: I'd rather not go into your site, just install it correctly, follow the guide.

Scooefragger's avatar

So just to check the basics,

The root of laravel is one above www/public

Your laravel public folder is the web root ( sometimes www / htdocs or public depending on your host and server )

Your vendor folder has compiled correctly

You have a working and valid .env

Composer dependencys have passed

Your APP_URL or likewise values are mapped correctly to your new URL

Any case sensitive files are resolved

And hard coded paths in your controllers are changed and updated ( prefably removed )

Your running on a comparable version of php

( again bashing dependencys here ) your server has required php moduals

nafakhari's avatar

@Ishatanjeeb

{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=5.6.4", "barryvdh/laravel-dompdf": "^0.8.0", "laravel/framework": "5.4.", "laravel/tinker": "~1.0", "laravelcollective/html": "^5.4" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.", "phpunit/phpunit": "~5.7" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "scripts": { "post-root-package-install": [ "php -r "file_exists('.env') || copy('.env.example', '.env');"" ], "post-create-project-cmd": [ "php artisan key:generate" ], "post-install-cmd": [ "Illuminate\Foundation\ComposerScripts::postInstall", "php artisan optimize" ], "post-update-cmd": [ "Illuminate\Foundation\ComposerScripts::postUpdate", "php artisan optimize" ] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true } }

nafakhari's avatar

@jlrdw sir as per you i read @Qlic and my all steps as per answer, project is running on xampp but not running on domain

jlrdw's avatar

@nafakhari you said you read, but did you re do the folder structure correctly?

Edit: No, because I still see your .env information.

Like

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=imran_database
DB_USERNAME=root
DB_PASSWORD=
nafakhari's avatar

@jlrdw now check my .env file now its change

"DB_CONNECTION=mysql DB_HOST=176.9.150.56 DB_PORT=3306 DB_DATABASE=imran_database DB_USERNAME=root DB_PASSWORD="

jlrdw's avatar

One I see still has

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=imran_database
DB_USERNAME=root
DB_PASSWORD=
Snapey's avatar

we should not be able to see your .env file because it should be in a folder above the public folder.

What file structure does your host provide?

jlrdw's avatar

@Snapey the .env was mentioned numerous times, I am at a loss, out of suggestions.

nafakhari's avatar

@Snapand i have create .env file's backup please check on this link and if any issue or correction in this file please tell me i will change as per your answer @jlrdw say me about this file and send me some articals but as per my knowledge i have changed but nothing... NOw site is running in root folder

http://pantexmedical.co.uk/test/.env

sjess's avatar

ok, u still dont understand.

You have to link the domain http://pantexmedical.co.uk into the /public folder of the Laravel installation.

You still link the domain into the root "public_html" folder. That is not correct!

A little example: When u work locally, u start a server with "php artisan serve", which opens a server on localhost:8000. But behind the scenes this URL links into the /public folder in ur laravel installation.

nafakhari's avatar

@sjess sir wher i will change and what is change i cant understand extremely very sorry

Ishatanjeeb's avatar

try again

composer dumpautoload

composer install

composer update --no-scripts
Next

Please or to participate in this conversation.