Search code examples
phpsymfonybundleopenshifthwioauthbundle

Symfony2 - Openshift " PHP Fatal error: Class 'HWI\\Bundle\\OAuthBundle\\HWIOAuthBundle' not found


I've been trying to create a simple Symfony 2.5 Project with HWI Oauth bundle .

The projects works perfectly on my local Windows Machine I managed to do facebook Oauth Authentification

But i uploaded my project to an Openshift server and i keep getting this error

" PHP Fatal error: Class 'HWI\Bundle\OAuthBundle\HWIOAuthBundle' not found in /var/lib/openshift/5395dfb2500446b159000374/app-root/runtime/repo/symfo/app/AppKernel.php on line 21"

Same problem with a personnal debian server . I can't update my project with composer because of that , neither can I do

php composer.phar install

Both are blocked . So i did a new project from sractch , added the package to the composer.json , and did a composer install on the server . Still same problem .

I tend to think either it's a case sensitive problem , but i double-checked and i can't find where. Or either I need to register this bundle somewhere else in my project . But i have no idea where .

Also when i Push my project with git to my openshift server , the whole project gets uploaded , but not the HWI Bundle . I dont know why ... composer.json


Solution

  • Finally solved my problem .

    Here is the thing ,

    When i uploaded my project with GIT GUI , git didn't uploaded the custom bundles . Therefore , those bundle could not be found by symfony , and by the kernel itself .

    In order to resolve that , i connected trough SFTP with FileZila via this tutorial from Openshift

    After succesfuly logging trhough SFTP upload your full project under repo

    /app-root

    /repo

    /mysymfonyproject


    As it is done via SFTP the upload is extremly slow (1 hour for me)
    Once it is done , just connect via SSH to your terminal and restart all your gears.

    ctl_all restart
    

    Your project just works just fine