Laravel 5 Class Collective Html HtmlServiceProvider not found on AWS

0 votes

I'm aware that there are several other questions with the same error, such as: Class 'IlluminateHtmlHtmlServiceProvider' not found. 5th Laravel

My issue is that I followed all of the suggested steps to resolve this on my local (XAMPP), and it worked flawlessly. The problem arose when I attempted to deploy to my AWS Ubuntu box (nginx). I followed all of the standard procedures: http://laravelcollective.com/docs/5.1/html#installation

When I did a git pull from what I had pushed from my local, my providers and aliases were added. Perhaps this file should have been gitignored and the change made on the server manually?

Next, add your new provider to the providers array of config/app.php:

  'providers' => [
    // ...
    Collective\Html\HtmlServiceProvider::class,
    // ...
  ],

Finally, add two class aliases to the aliases array of config/app.php:

  'aliases' => [
    // ...
      'Form' => Collective\Html\FormFacade::class,
      'Html' => Collective\Html\HtmlFacade::class,
    // ...
  ],

I then manually added:

Begin by installing this package through Composer. Edit your project's composer.json file to require laravelcollective/html.

"require": {
    "laravelcollective/html": "5.1.*"
}

And finally, I ran:

composer.phar update

It was running this command that throws the error:

PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
> php artisan clear-compiled
PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
PHP Fatal error:  Class 'Collective\Html\HtmlServiceProvider' not found in /usr/share/nginx/html/cbt/vendor/compiled.php on line 6



  [Symfony\Component\Debug\Exception\FatalErrorException]
  Class 'Collective\Html\HtmlServiceProvider' not found



Script php artisan clear-compiled handling the pre-update-cmd event returned with an error



  [RuntimeException]
  Error Output: PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
  PHP Fatal error:  Class 'Collective\Html\HtmlServiceProvider' not found in /usr/share/nginx/html/cbt/vendor/compiled.php on line



update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-auties] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ...

I then tried running php artisan clear-compiled, to see if that would do anything, and got:

PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
PHP Fatal error:  Class 'Collective\Html\HtmlServiceProvider' not found in /usr/share/nginx/html/cbt/vendor/compiled.php on line 6716



  [Symfony\Component\Debug\Exception\FatalErrorException]
  Class 'Collective\Html\HtmlServiceProvider' not found

I know my Nginx ubuntu environment is not the same as a windows xampp env, but I'm still unsure why following the Laravel-provided instructions for adding this doesn't seem to work. Would greatly appreciate some advice on this.

Aug 17, 2022 in HTML by Deepak
• 980 points
1,015 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In HTML

0 votes
0 answers
0 votes
0 answers

HTML if image is not found

In an HTML page, I have an ...READ MORE

Jul 26, 2022 in HTML by Tejashwini
• 3,820 points
621 views
0 votes
0 answers

What is class in HTML?

what is a class in HTML, I ...READ MORE

Jun 3, 2022 in HTML by Tejashwini
• 3,820 points
391 views
0 votes
0 answers
0 votes
0 answers

How do i view country flags on windows 10 through HTML?

suggest me a way to make the ...READ MORE

Jul 7, 2022 in HTML by Tejashwini
• 3,820 points
466 views
0 votes
0 answers

Inputting a default image in case the src attribute of an html <img> is not valid?

Is there any way to render a ...READ MORE

Jul 8, 2022 in HTML by Tejashwini
• 3,820 points
649 views
0 votes
1 answer

How to exclude specific folders every time I run 'eb deploy' using AWS EB CLI

If there is not .ebignore file it ...READ MORE

answered Oct 24, 2018 in AWS by Priyaj
• 58,020 points
2,138 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP