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

Error bin/console cache:clear #19

Closed
markus7777777 opened this issue Apr 21, 2020 · 5 comments
Closed

Error bin/console cache:clear #19

markus7777777 opened this issue Apr 21, 2020 · 5 comments

Comments

@markus7777777
Copy link

I followed the instructions of EasyBackupBundle, but an error occurs after executing the command "cache:clear".

Steps:

cd /var/www/kimai2/var/plugins/
git clone https://github.com/mxgross/EasyBackupBundle.git

cd var/www/kimai2/
bin/console cache:clear

Error Message:

_In FileLoader.php line 208:

Expected to find class "KimaiPlugin\EasyBackupBundle\Controller\EasyBackupController" in file "/var/www/kimai2/var/plugins/E
asyBackupBundle/Controller/EasyBackupController.php" while importing services from resource "../../*", but it was not found!
Check the namespace prefix used with the resource.

Used software:
Kimai version: 1.8;
Ubuntu Desktop
nginx
php 7.2

@mxgross
Copy link
Owner

mxgross commented Jun 4, 2020

Can you please try to update the permissions once again

sudo chown -R :www-data .
sudo chmod -R g+r .
sudo chmod -R g+rw var/
sudo chmod -R g+rw public/avatars/

and then again

cd var/www/kimai2/
bin/console cache:clear

Maybe the user group is not www-data in your case and you have to change it.
Often I have to run the commands again to get access to the kimai2 frontend afterwards:

sudo chown -R :www-data .
sudo chmod -R g+r .
sudo chmod -R g+rw var/
sudo chmod -R g+rw public/avatars/

I was on Kimai2 Version 1.6 before and now I updated to 1.9 and it still works.
PHP is 7.3.11-1~deb10u1 in my case. But with Apache instead of nginx.

Maybe @kevinpapst has any idea about it?

@markus7777777
Copy link
Author

Hi,
I have made some changes since the issue I created. I made an update to kimai 1.9 and php runs on 7.3 like you do.

It now works fine with your description. I don't know if it is because of the permissions after the git clone or because of the php and kimai version. I think it was to adjust the file permissions directly after the git clone.

Thanks for your answer. It's running now :)

@yweidmann
Copy link

Hi
I encoutered the same problem (see email correspondance).

According to the messages, I checked the ownership of the plugin-directory ./kimai2/var/plugins/EasyBackupBoundle: It is not owned by the group and user www-data.

Could that be the reason?

@mxgross
Copy link
Owner

mxgross commented Jun 5, 2020

Hello Yvo,
yes that seems to be the reason. In markus case it helped to follow my steps described in my first comment in this issue here.
Afterwards the permissions should be fixed.

@yweidmann
Copy link

Mh, we tried again calling bin/console cache:clear with sudo as user. But we got the following error-messages:

PHP Fatal error:  Class 'App\Plugin\AbstractPluginExtension' not found in /home/yweidmann/subdomains/projects/kimai2/var/plugins/EasyBackupBundle/DependencyInjection/EasyBackupExtension.php on line 18

In EasyBackupExtension.php line 18:

  Attempted to load class "AbstractPluginExtension" from namespace "App\Plugin".
  Did you forget a "use" statement for another namespace?

cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

Any ideas?

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