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

afoysal's avatar

Shared Hosting

I developed an application in my local Machine. It is working fine. But I host it in a Shared Hosting. I am getting below error there in error.log file.

[11-May-2018 13:53:53 UTC] PHP Warning:  Uncaught ErrorException: require(/home/foysal/Videos/bad-laravel-adminpanel/routes/breadcrumbs.php): failed to open stream: No such file or directory in /home/aylatddd/public_html/adminpanel/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsServiceProvider.php:92
Stack trace:
#0 /home/aylatddd/public_html/adminpanel/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsServiceProvider.php(92): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'require(/home/f...', '/home/aylatddd/...', 92, Array)
#1 /home/aylatddd/public_html/adminpanel/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsServiceProvider.php(92): require()
#2 /home/aylatddd/public_html/adminpanel/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsServiceProvider.php(61): DaveJamesMiller\Breadcrumbs\BreadcrumbsServiceProvider->registerBreadcrumbs()
#3 [internal function]: DaveJamesMiller\Breadcrumbs\BreadcrumbsServiceProvider->boot()
#4 /home/aylatddd/public_html/adminpanel/vendor/laravel/framework/src/Il in /home/aylatddd/public_html/adminpanel/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsServiceProvider.php on line 92
[11-May-2018 13:53:53 UTC] PHP Fatal error:  DaveJamesMiller\Breadcrumbs\BreadcrumbsServiceProvider::registerBreadcrumbs(): Failed opening required '/home/foysal/Videos/bad-laravel-adminpanel/routes/breadcrumbs.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/aylatddd/public_html/adminpanel/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsServiceProvider.php on line 92
[11-May-2018 13:55:51 UTC] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /home/aylatddd/public_html/adminpanel/bootstrap/cache/config.php on line 487
0 likes
15 replies
jlrdw's avatar

Please search the Box up top I have answered this 20 times myself as has others.

afoysal's avatar

Thanks @jlrdw for your reply. Why I am facing this issue ? Is it for Shared Hosting ? Thanks.

jlrdw's avatar

Well do some troubleshooting is it the correct PHP version, have you set up the folders correctly.

Read those guides and set up correctly.

afoysal's avatar

Thanks @jlrdw . PHP version of the server is 7.1. I am using Laravel 5.6. I tried to host the application in several ways. But I am facing errors in all the ways. Thanks.

jlrdw's avatar

Do you have all the required extensions enabled. https://laravel.com/docs/5.6#server-requirements

You have to check requirements and do this stuff correctly.

You may have to make sure the correct version in cpanel is selected are drop down there larsvel 5.5 which is LTS

1 like
afoysal's avatar

Thanks @jlrdw . Why Laravel is looking for this (/home/foysal/Videos/bad-laravel-adminpanel/) directory every time I tried to host the application ? This is my local machine directory. I think there is something to clear, like cache.

jlrdw's avatar

Have you checked file and folder permissions.

A while back I uploaded a 5.5 project to godaddy and had no problems, but I followed the guide.

1 like
jlrdw's avatar

Study these images and note the folder structure: Main laravel is above htdocs:

https://imgur.com/C5SHtP9 Laravel up

https://imgur.com/FA9vnqG L_down

https://imgur.com/3oP1GrG L_asset

Notice the asset folder for shared I put under htdocs, notice the upload folder:

So with that I can use a helper to display an image like:

<img src="<?php echo asset('assets/upload/imgdogs') . '/' . $row->dogpic; ?>" alt="" class="image">

Other wise you need symbolic link to storage folder that's above htdocs.

Unless images are private to user, it's ok to have images under htdocs. If you had a site with private images, you should have a dedicated server anyway.

I have never had any problems just using the built in helper for this.

1 like
bashy's avatar

Did you upload the vendor folder from local? Composer caches the file paths.

1 like
afoysal's avatar

@bashy , may be your are right ? What is the solution of this issue ?

jlrdw's avatar

@bashy was asking did you also upload (ftp) the vendor folder, and if so is it at the correct place.

  • You also need to setup laravel correctly in development
  • main laravel above htdocs in wamp
  • dumpautoload
  • make sure all is working
  • then upload (ftp)

Really this stuff isn't hard, but you have to have correct development environment also.

1 like
pardeepkumar's avatar

I think you have face issue in admin panel library link ,so follow the following steps .

First you zip you local machine Laravel project and then by using ftp you upload your zip folder correctly next by using unzip command you unzip your folder (Laravel project) In public_html folder and check the url again also if you still error is occur so also test network or source path of library by inspect element and also check version of php

Please or to participate in this conversation.