Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy on Shared-Hosting ends in ReflectionException #59

Closed
Stefan39 opened this issue Jun 15, 2015 · 11 comments
Closed

Copy on Shared-Hosting ends in ReflectionException #59

Stefan39 opened this issue Jun 15, 2015 · 11 comments

Comments

@Stefan39
Copy link

Hi,

on my dev-server i have installed the module with composer like the docu explain. On the dev-server all works fine. After copy complete yii2 basic application to the shared host i get this error:

Exception 'ReflectionException' with message 'Class webvimark\modules\UserManagement\components\UserConfig does not exist'

in /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Container.php:415

Stack trace:
#0 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Container.php(415): ReflectionClass->__construct('webvimark\modul...')
#1 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Container.php(358): yii\di\Container->getDependencies('webvimark\modul...')
#2 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Container.php(151): yii\di\Container->build('webvimark\modul...', Array, Array)
#3 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/BaseYii.php(344): yii\di\Container->get('webvimark\modul...', Array, Array)
#4 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/ServiceLocator.php(133): yii\BaseYii::createObject(Array)
#5 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Instance.php(152): yii\di\ServiceLocator->get('user')
#6 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Instance.php(128): yii\di\Instance->get(NULL)
#7 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/filters/AccessControl.php(98): yii\di\Instance::ensure('user', 'yii\web\User')
#8 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Object.php(107): yii\filters\AccessControl->init()
#9 [internal function]: yii\base\Object->__construct(Array)
#10 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Container.php(372): ReflectionClass->newInstanceArgs(Array)
#11 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/di/Container.php(151): yii\di\Container->build('yii\filters\Acc...', Array, Array)
#12 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/BaseYii.php(344): yii\di\Container->get('yii\filters\Acc...', Array, Array)
#13 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Component.php(663): yii\BaseYii::createObject(Array)
#14 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Component.php(647): yii\base\Component->attachBehaviorInternal('access', Array)
#15 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Component.php(529): yii\base\Component->ensureBehaviors()
#16 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Controller.php(263): yii\base\Component->trigger('beforeAction', Object(yii\base\ActionEvent))
#17 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/web/Controller.php(108): yii\base\Controller->beforeAction(Object(yii\base\InlineAction))
#18 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Controller.php(149): yii\web\Controller->beforeAction(Object(yii\base\InlineAction))
#19 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Module.php(455): yii\base\Controller->runAction('', Array)
#20 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/web/Application.php(84): yii\base\Module->runAction('', Array)
#21 /var/sites/s/statcnt.com/vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))
#22 /var/sites/s/statcnt.com/public_html/index-test.php(16): yii\base\Application->run()
#23 {main}

@webvimark
Copy link
Owner

Try

composer dump-autoload

@Stefan39
Copy link
Author

I don't have composer on shared hosting, or should do this on my dev-system and upload it again?

@webvimark
Copy link
Owner

Hmm, not sure I've never done it before. But you should try anyway

@Stefan39
Copy link
Author

Hm, nothing change, so not work

@webvimark
Copy link
Owner

In vendor/composer/autoload_psr4.php you should have following lines in array

    'webvimark\\modules\\UserManagement\\' => array($vendorDir . '/webvimark/module-user-management'),
    'webvimark\\helpers\\' => array($vendorDir . '/webvimark/helpers'),
    'webvimark\\extensions\\GridPageSize\\' => array($vendorDir . '/webvimark/grid-page-size'),
    'webvimark\\extensions\\GridBulkActions\\' => array($vendorDir . '/webvimark/grid-bulk-actions'),
    'webvimark\\extensions\\DateRangePicker\\' => array($vendorDir . '/webvimark/date-range-picker'),
    'webvimark\\components\\' => array($vendorDir . '/webvimark/components'),

@Stefan39
Copy link
Author

Yeah.. it works! Thanks!

@Stefan39
Copy link
Author

New problem:

PHP Fatal Error – yii\base\ErrorException

Class 'Ikimea\Browser\Browser' not found

  1. in /var/sites/s/statcnt.com/vendor/webvimark/module-user-management/models/UserVisitLog.php at line 36

@Stefan39 Stefan39 reopened this Jun 15, 2015
@Stefan39
Copy link
Author

Ok, sorry.. i have found the problem... its not a problem with user-management. Sorry.

@webvimark
Copy link
Owner

No problem, you can add

'Ikimea\\Browser\\' => array($vendorDir . '/ikimea/browser/lib'),

in vendor/composer/autoload_namespaces.php, but I guess you'll have some problems with other things.

Try digital ocean hosting, you can get your own VPS on SSD for 5$ per month. Shared hosting is obsolete :)

@virendramaurya615
Copy link

PHP Fatal Error – yii\base\ErrorException

Class 'Ikimea\Browser\Browser' not found

  1. in /var/sites/s/statcnt.com/vendor/webvimark/module-user-management/models/UserVisitLog.php at line 36

@virendramaurya615
Copy link

can u plz help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants