1

I am using "HWIOAuthBundle" along with "FOSUserBundle", which works pretty well on localhost (Windows). But when I upload it to live server, I get the following error:

Fatal error: Class 'HWI\Bundle\OAuthBundle\HWIOAuthBundle' not found in /home/site/symfony3/app/AppKernel.php on line 21

AppKernel.php has such entry:

$bundles = [
            ...,
            ...,
            new FOS\UserBundle\FOSUserBundle(),
            new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
            new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
        ];

What could be the problem? I'm using Symfony 3.1.1 on Windows (localhost). PS: I have no access to the terminal as it is a shared hosting, thus clear:cache is not possible. Alternatives?

Ren
  • 330
  • 6
  • 23

2 Answers2

0

And you've followed these steps explicitly for Symfony3:

https://github.com/hwi/HWIOAuthBundle/blob/0.4/Resources/doc/1-setting_up_the_bundle.md

So your composer.json has "hwi/oauth-bundle" in it - check that too. And the Routing is setup?

Alvin Bunk
  • 7,621
  • 3
  • 29
  • 45
  • Yes, I followed this very documentation and the value inside my composer.json's require is: `"hwi/oauth-bundle": "0.5.*-dev"` Routers and all other settings are working normally on my localhost, where it is fully functional. This error is shown only on live site. – Ren Sep 08 '16 at 07:39
0

I still don't know what exactly was the problem. Luckily it was a new project, so I did not have to worry about loosing any data. Here is what I did that fixed this hurdle for me.

#1: Clean-up:

  • Deleted my /vendor folder [with ftp]
  • Deleted the /prod folder inside cache/ [with ftp]
  • Dropped all the tables (with phpMyAdmin)

#2: Restoration:

  • Copied the local /vendor folder to the corresponding root folder online (with ftp)
  • Exported my local database and imported it into online database (with phpMyAdmin)

When I re-loaded the website, the Fatal error: Class 'HWI\Bundle\OAuthBundle\HWIOAuthBundle' not found in /home/site/symfony3/app/AppKernel.php on line 21 error was gone and worked normally. Hope this helps someone who is having the similar problem.

Ren
  • 330
  • 6
  • 23