Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 24
IDProjectCategoryView StatusLast Update
14704Bug reportsPluginspublic2022-04-11 14:06
Reporterbismark Assigned ToDenisChenu  
PrioritynormalSeveritycrash 
Status assignedResolutionreopened 
Product Version4.2.4 
Summary14704: DbStorage not found
Description

$ php application/commands/console.php plugin --target=Processor
PHP Error[2]: include(DbStorage.php): failed to open stream: No such file or directory
in file C:\Users\marko\Limesurvey\plugins\framework\YiiBase.php at line 463

class Processorextends PluginBase
{
    ...
    protected $storage = 'DbStorage';
   ...
}
TagsNo tags attached.
Bug heat24
Complete LimeSurvey version number (& build)master
I will donate to the project if issue is resolvedNo
Browser
Database type & version10.1.26-MariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version7.1.8

Relationships

has duplicate 14931 closedDenisChenu command : include(DbStorage.php): failed to open stream: No such file or directory 
related to 12378 closedcdorin AuditLog plugin break console usage for other plugin 

Activities

DenisChenu

DenisChenu

2019-03-29 16:47

developer   ~51203

I use this workaround : https://gitlab.com/SondagesPro/mailing/sendMailCron/blob/master/DbStorage.php

But still a workaround

bismark

bismark

2019-03-29 17:40

reporter   ~51207

namespace of DbStorage, DummyStorage must be LimeSurvey\PluginManager\Storage

in PluginManager it should be:

public function getStore($storageClass)
    {
        if (!class_exists($storageClass)
                && class_exists('LimeSurvey\\PluginManager\\Storage\\'.$storageClass)) {
            $storageClass = 'LimeSurvey\\PluginManager\\Storage\\'.$storageClass;
        }

        if (!isset($this->stores[$storageClass])) {
            $this->stores[$storageClass] = new $storageClass();
        }
        return $this->stores[$storageClass];
    }

DummyStorage does not implement iPluginStorage correctly

Storages must use LimeSurvey\PluginManager\iPlugin;

rename iPluginStorage to PluginStorageInterface

rename iPlugin to PluginInterface

DenisChenu

DenisChenu

2019-06-20 07:20

developer   ~52480

Great if you can provide a pull request :)
I'm happy to merge it (for https://bugs.limesurvey.org/view.php?id=14931 too)

DenisChenu

DenisChenu

2020-05-22 18:33

developer   ~57990

namespace of DbStorage, DummyStorage must be LimeSurvey\PluginManager\Storage

OK, but move it : need API update right ?

Great if you can provide a pull request :)

Still valid

DenisChenu

DenisChenu

2020-05-22 19:03

developer   ~57991

@bismark : please a pull request :)

Try to be API compatible ;)

Mazi

Mazi

2020-06-23 16:03

updater   ~58410

We will try to provide a pull request the next days since we are more often facing this when other coders are creating plugins and are not aware of this issue.

DenisChenu

DenisChenu

2020-06-23 16:38

developer   ~58412

I always add the workaround … and think i add it for a lot of time …

Mazi

Mazi

2020-06-23 16:43

updater   ~58413

Same here, but now we have suffered too much and decided to fix it :-)

bismark

bismark

2020-07-23 17:05

reporter   ~59060

protected $storage = 'LimeSurvey\PluginManager\DbStorage';

bismark

bismark

2020-09-08 12:57

reporter   ~59742

if this is a solution, we dont need a pull request here

DenisChenu

DenisChenu

2020-11-04 16:00

developer   ~60538

Last edited: 2020-11-04 16:05

I have another issue …

In config.php : set_include_path('.');

web is OK, console broke with

[shnoulle@poledra 3LTS]$ php application/commands/console.php  updatedb
PHP Error[2]: include(DbConnection.php): failed to open stream: No such file or directory
    in file /mnt/data/shnoulle/nginx/www/3LTS/framework/YiiBase.php at line 463
#0 /mnt/data/shnoulle/nginx/www/3LTS/framework/YiiBase.php(463): include()
#1 unknown(0): autoload()
#2 unknown(0): spl_autoload_call()
#3 /mnt/data/shnoulle/nginx/www/3LTS/framework/YiiBase.php(310): class_exists()
#4 /mnt/data/shnoulle/nginx/www/3LTS/framework/YiiBase.php(204): import()
#5 /mnt/data/shnoulle/nginx/www/3LTS/framework/base/CModule.php(393): createComponent()
#6 /mnt/data/shnoulle/nginx/www/3LTS/framework/base/CModule.php(103): ConsoleApplication->getComponent()
#7 /mnt/data/shnoulle/nginx/www/3LTS/application/core/ConsoleApplication.php(63): ConsoleApplication->__get()
#8 /mnt/data/shnoulle/nginx/www/3LTS/framework/YiiBase.php(132): ConsoleApplication->__construct()

With include path leave as default .:/usr/share/pear:/usr/share/php it's OK … :/

bismark

bismark

2020-11-04 16:44

reporter   ~60541

what about set_include_path(get_include_path() . PATH_SEPARATOR . '.');

?

DenisChenu

DenisChenu

2020-11-04 16:49

developer   ~60542

Even with set_include_path(".:/usr/share/pear:/usr/share/php"); it's not OK …

Just put a set_include_path : broke …

ollehar

ollehar

2021-02-08 17:15

administrator   ~62028

Please check if this bug still exists in the latest patch release. Thank you.

c_schmitz

c_schmitz

2021-03-01 17:11

administrator   ~62587

Hello bismark,

we have asked for feedback on this issue. Because we did not get an answer we assume that the issue is resolved.
However, should you be able to reproduce the issue using the latest version, please feel free to re-open the issue and give us exact details on how to reproduce it.

Thank you and best regards,

c_schmitz

DenisChenu

DenisChenu

2021-03-15 07:23

developer   ~63350

Last edited: 2021-03-15 07:24

Please check if this bug still exists in the latest patch release. Thank you.

https://gitlab.com/SondagesPro/coreAndTools/backupSurveyLocally still have the issue,
Windows server

cd E:\WebSite\limesurvey\
php application\commands\console.php  plugin --target=backupSurveyLocally
E:\WebSite\limesurvey>php application\commands\console.php  plugin --target=backupSurveyLocally
PHP Error[2]: include(DbStorage.php): failed to open stream: No such file or directory
    in file E:\WebSite\limesurvey\framework\YiiBase.php at line 463
#0 E:\WebSite\limesurvey\framework\YiiBase.php(463): include()
#1 unknown(0): autoload()
#2 unknown(0): spl_autoload_call()
#3 E:\WebSite\limesurvey\application\libraries\PluginManager\PluginManager.php(103): class_exists()
#4 E:\WebSite\limesurvey\application\libraries\PluginManager\PluginBase.php(162): LimeSurvey\PluginManager\PluginManager->getStore()
#5 E:\WebSite\limesurvey\application\libraries\PluginManager\PluginBase.php(96): LimeSAML->getStore()
#6 E:\WebSite\limesurvey\plugins\LimeSAML\LimeSAML.php(192): LimeSAML->get()
#7 E:\WebSite\limesurvey\application\libraries\PluginManager\PluginManager.php(287): LimeSAML->__construct()
#8 E:\WebSite\limesurvey\application\libraries\PluginManager\PluginManager.php(319): LimeSurvey\PluginManager\PluginManager->loadPlugin()
#9 E:\WebSite\limesurvey\application\libraries\PluginManager\PluginManager.php(53): LimeSurvey\PluginManager\PluginManager->loadPlugins()
#10 E:\WebSite\limesurvey\framework\base\CModule.php(394): LimeSurvey\PluginManager\PluginManager->init()
#11 E:\WebSite\limesurvey\framework\base\CModule.php(103): ConsoleApplication->getComponent()
#12 E:\WebSite\limesurvey\application\commands\PluginCommand.php(40): ConsoleApplication->__get()
#13 unknown(0): PluginCommand->actionIndex()
#14 E:\WebSite\limesurvey\framework\console\CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#15 E:\WebSite\limesurvey\framework\console\CConsoleCommandRunner.php(71): PluginCommand->run()
#16 E:\WebSite\limesurvey\framework\console\CConsoleApplication.php(92): CConsoleCommandRunner->run()
#17 E:\WebSite\limesurvey\framework\base\CApplication.php(185): ConsoleApplication->process

LimeSurvvey 3.25.17

DenisChenu

DenisChenu

2021-03-15 07:26

developer   ~63351

Last edited: 2021-03-15 07:28

protected $storage = 'LimeSurvey\PluginManager\DbStorage';

Didn't fix the issue

Even adding include DbStorage in plugin broke before here ?

DenisChenu

DenisChenu

2021-03-15 07:42

developer   ~63352

Silly boy : issue in you LimeSAML plugin

DenisChenu

DenisChenu

2021-03-15 07:48

developer   ~63353

c_schmitz

c_schmitz

2021-03-22 12:27

administrator   ~63523

@DenisCenu: I am not sure what you are saying. Can we close this one?
If not, can you explain the issue, please?

DenisChenu

DenisChenu

2021-03-22 12:32

developer   ~63524

The issue still persist.
There are workaround , but the issue still there.

Else : your LimeSAML plugin broke ALL console plugin, but it's another issue.

c_schmitz

c_schmitz

2021-03-22 13:00

administrator   ~63527

@bismark, did you find a solution?
How would I reproduce this?

Mazi

Mazi

2021-03-22 17:29

updater   ~63554

@c_schmitz, unfortunately, @bismark is currently sick. But as outlined by @DenisChenu, the problem is still there. He may be able to provide further details.

DenisChenu

DenisChenu

2021-03-22 18:21

developer   ~63558

@c_schmitz : if you still have LimeSAML and it's not updated/fixed : you see the issue without any plugins.

Currently all console system have a lot of issue and need workaround.
I create a private function to fix console on all my console plugin now, DbStorage is needed each time. Less for other one.

https://gitlab.com/SondagesPro/mailing/sendMailCron/-/blob/master/sendMailCron.php#L1593
https://gitlab.com/SondagesPro/coreAndTools/backupSurveyLocally/-/blob/master/backupSurveyLocally.php#L262

2BITS_PL

2BITS_PL

2022-02-28 16:24

reporter   ~68453

I tested updatedb via CLI today on Windows Server, version Limesurvey 3.25.19, and got this message: "include (DBStorage.php): failed to open stream: No such file or directory".

DenisChenu

DenisChenu

2022-02-28 16:33

developer   ~68455

Activated plugins ?

DenisChenu

DenisChenu

2022-02-28 16:37

developer   ~68456

OK : related pull request : https://github.com/LimeSurvey/LimeSurvey/pull/1426

2BITS_PL

2BITS_PL

2022-02-28 16:37

reporter   ~68457

Should I deactivate all plugins?

DenisChenu

DenisChenu

2022-02-28 18:40

developer   ~68461

@2BITS_PL can you just before try to update application/config/config.php like that : https://github.com/LimeSurvey/LimeSurvey/pull/2274/files

$config['rootdir'] = realpath(dirname(dirname(dirname(FILE))));

2BITS_PL

2BITS_PL

2022-03-01 11:48

reporter   ~68468

In the client's environment, we had an absolute path from the beginning, so switching to the above-mentioned method did not change anything.

I performed a lot of tests locally and in the client's environment, it turns out that one of our dedicated plugins causes the above-mentioned error. Though I don't know why yet as our other plugins which also use DBStorage don't generate this error.

Mazi

Mazi

2022-03-01 12:01

updater   ~68469

@2BITS_PL, which plugin was causing the problem?

Issue History

Date Modified Username Field Change
2019-03-29 11:49 bismark New Issue
2019-03-29 12:38 Mazi Issue Monitored: Mazi
2019-03-29 16:47 DenisChenu Note Added: 51203
2019-03-29 17:40 bismark Note Added: 51207
2019-06-20 07:20 DenisChenu Note Added: 52480
2019-07-03 17:50 DenisChenu Relationship added related to 12378
2020-05-22 18:06 DenisChenu Assigned To => DenisChenu
2020-05-22 18:06 DenisChenu Status new => assigned
2020-05-22 18:06 DenisChenu Relationship added has duplicate 14931
2020-05-22 18:17 ollehar Priority none => normal
2020-05-22 18:17 ollehar Severity block => crash
2020-05-22 18:17 ollehar Product Version => 4.2.4
2020-05-22 18:33 DenisChenu Note Added: 57990
2020-05-22 19:03 DenisChenu Status assigned => feedback
2020-05-22 19:03 DenisChenu Note Added: 57991
2020-06-23 16:03 Mazi Note Added: 58410
2020-06-23 16:38 DenisChenu Note Added: 58412
2020-06-23 16:43 Mazi Note Added: 58413
2020-07-23 17:05 bismark Note Added: 59060
2020-07-23 17:05 bismark Status feedback => assigned
2020-09-08 12:57 bismark Note Added: 59742
2020-11-04 16:00 DenisChenu Note Added: 60538
2020-11-04 16:05 DenisChenu Note Edited: 60538
2020-11-04 16:44 bismark Note Added: 60541
2020-11-04 16:49 DenisChenu Note Added: 60542
2021-02-08 17:15 ollehar Status assigned => feedback
2021-02-08 17:15 ollehar Note Added: 62028
2021-03-01 17:11 c_schmitz Note Added: 62587
2021-03-01 17:12 c_schmitz Status feedback => closed
2021-03-01 17:12 c_schmitz Resolution open => unable to reproduce
2021-03-15 07:23 DenisChenu Assigned To DenisChenu =>
2021-03-15 07:23 DenisChenu Status closed => feedback
2021-03-15 07:23 DenisChenu Resolution unable to reproduce => reopened
2021-03-15 07:23 DenisChenu Note Added: 63350
2021-03-15 07:24 DenisChenu Note Edited: 63350
2021-03-15 07:26 DenisChenu Note Added: 63351
2021-03-15 07:28 DenisChenu Note Edited: 63351
2021-03-15 07:42 DenisChenu Note Added: 63352
2021-03-15 07:48 DenisChenu Note Added: 63353
2021-03-15 07:48 DenisChenu File Added: Capture d’écran du 2021-03-15 07-48-41.png
2021-03-22 12:27 c_schmitz Note Added: 63523
2021-03-22 12:32 DenisChenu Note Added: 63524
2021-03-22 13:00 c_schmitz Note Added: 63527
2021-03-22 17:29 Mazi Note Added: 63554
2021-03-22 18:21 DenisChenu Note Added: 63558
2022-02-28 16:21 2BITS_PL Issue Monitored: 2BITS_PL
2022-02-28 16:21 2BITS_PL Bug heat 20 => 22
2022-02-28 16:24 2BITS_PL Note Added: 68453
2022-02-28 16:24 2BITS_PL Bug heat 22 => 24
2022-02-28 16:33 DenisChenu Note Added: 68455
2022-02-28 16:37 DenisChenu Note Added: 68456
2022-02-28 16:37 2BITS_PL Note Added: 68457
2022-02-28 18:40 DenisChenu Note Added: 68461
2022-03-01 11:48 2BITS_PL Note Added: 68468
2022-03-01 12:01 Mazi Note Added: 68469
2022-04-11 14:06 galads Assigned To => DenisChenu
2022-04-11 14:06 galads Status feedback => assigned