Keleo / Fail2BanBundle

Fail2Ban plugin for Kimai to prevent automated attacks
https://www.kimai.org/store/fail2ban-bundle.html
MIT License
6 stars 4 forks source link

install of version 1.1 failing #7

Closed kernie closed 1 year ago

kernie commented 1 year ago

Hi,

tried to update the plugin to the new 1.1 version in the usual way: 1) remove old plugin directory 2) copy new plugin file over to plugin directory 3) do the kimai:reload 4) adapt file permissions and group

However, step 3 results in this warning:

bin/console kimai:reload --env=prod
PHP Warning:  include(/srv/www/htdocs/kimai_v2/kimai2/vendor/composer/../../var/plugins/Fail2BanBundle/Fail2BanPlugin.php): Failed to open stream: No such file or directory in /srv/www/htdocs/kimai_v2/kimai2/vendor/composer/ClassLoader.php on line 571
PHP Warning:  include(): Failed opening '/srv/www/htdocs/kimai_v2/kimai2/vendor/composer/../../var/plugins/Fail2BanBundle/Fail2BanPlugin.php' for inclusion (include_path='.:/usr/share/php') in /srv/www/htdocs/kimai_v2/kimai2/vendor/composer/ClassLoader.php on line 571

And the plugin is not shown at kimai2.site/en/admin/plugins

Kimai version: 1.22.1 PHP: 8.0 OS: Ubuntu 20

kevinpapst commented 1 year ago
Bildschirmfoto 2022-08-02 um 10 17 20
canonex commented 1 year ago

I have the same exact problem.

Debian 11 bullseye Php 7.4.30 Kimai 1.28.1

kevinpapst commented 1 year ago

Totally forgot abou this issue, thanks for the reminder @canonex

Can you please try the following:

canonex commented 1 year ago

Thanks to you for the speed!

Removed the plugin, removed the cache, unzipped the file, reloaded kimai and fixed permissions.

I don't get error but the plugin doesn't appear in the plugin list. Even if renamed from Fail2BanBundle-master to Fail2BanBundle (I have no idea if it is of any use but anyway I tried it....).

kevinpapst commented 1 year ago

Ah, I am so stupid, I did not even test, sorry! Please redo the exact same steps from above once again and it will work... hopefully ... 😁

canonex commented 1 year ago

Yes, version 1.18 is working (... tested with mobile connection to get a disposable ip)! nb. it should be renamed: mv Fail2BanBundle-master Fail2BanBundle

Thank you, Riccardo

kevinpapst commented 1 year ago

Fixed in version 1.2: https://github.com/Keleo/Fail2BanBundle/releases/tag/1.2

canonex commented 1 year ago

Nb. it works only if I remove the previus one and git clone again.

If I just git pull, as I do for others plugins, I get:

PHP Warning:  include(/var/www/stikim/vendor/composer/../../var/plugins/Fail2BanBundle/Fail2BanPlugin.php): failed to open stream: No such file or directory in /var/www/stikim/vendor/composer/ClassLoader.php on line 444
PHP Warning:  include(): Failed opening '/var/www/stikim/vendor/composer/../../var/plugins/Fail2BanBundle/Fail2BanPlugin.php' for inclusion (include_path='.:/usr/share/php') in /var/www/stikim/vendor/composer/ClassLoader.php on line 444

[WARNING] Some commands could not be registered:
In getPluginManagerService.php line 12:
Class 'KimaiPlugin\Fail2BanBundle\Fail2BanPlugin' not found

[WARNING] Some commands could not be registered:
In getPluginManagerService.php line 12:
Class 'KimaiPlugin\Fail2BanBundle\Fail2BanPlugin' not found

Reloading configurations ...
============================
...

Thank you, Riccardo