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

nhayder's avatar
Level 13

Errors white deploying laravel application on cPanle shared hosting account

Hi,

i'm trying to deploy a laravel 5.8 app on shared hosting account running cpanel, i'm getting a composer error not sure how to fix it

// error found in account log file
[12-May-2019 10:42:24 UTC] PHP Warning:  require(/home/demolinx/vendor/composer/../../App/Helpers/activeAdminSidebar.php): failed to open stream: No such file or directory in /home/demolinx/vendor/composer/autoload_real.php on line 66
[12-May-2019 10:42:24 UTC] PHP Warning:  require(/home/demolinx/vendor/composer/../../App/Helpers/activeAdminSidebar.php): failed to open stream: No such file or directory in /home/demolinx/vendor/composer/autoload_real.php on line 66
[12-May-2019 10:42:24 UTC] PHP Fatal error:  require(): Failed opening required '/home/demolinx/vendor/composer/../../App/Helpers/activeAdminSidebar.php' (include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in /home/demolinx/vendor/composer/autoload_real.php on line 66


i made the helper file in /App/Helpers/activeAdminSidebar.php and its the files that is giving me the error,

any ideas on how to fix this error ???

0 likes
8 replies
bobbybouwmann's avatar

Did you run composer dump-autoload on the server? Also you might need to run composer install instead, which also does the dump-autoload!

2 likes
nhayder's avatar
Level 13

@bobbybouwmann Yes i didn try to run composer dump-autoload but i keep getting


Parse error: syntax error, unexpected '?' in /home/demo/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500

not sure why

jlrdw's avatar

Is the PHP version correct.

1 like
Snapey's avatar

you seem to have some confusion. I see paths for home/demo and home/demolinx

1 like
bobbybouwmann's avatar

The best approach would be not using shared hosting at all ;)

1 like
nhayder's avatar
Level 13

@JLRDW - 7.2 with laravel 5.8 upgrade from 5.6 then 5.7 to 5.8

jlrdw's avatar

7.2 with laravel 5.8 upgrade from 5.6 then 5.7 to 5.8

First of course "backup"

You have to update laravel (app) firsrt. Follow the update or upgrade instructions for each version.

Me, I have a program that I can see the changes, and what to update:

Don't just grab laravel from github, get it here:

https://github.com/laravel/laravel/releases

That way you know you have a stable release.

After updating the app (laravel), then run composer update, which will update the framework.

Please or to participate in this conversation.