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

cli failing with Current user must not be empty #2644

Closed
X-dark opened this issue Nov 8, 2019 · 2 comments
Closed

cli failing with Current user must not be empty #2644

X-dark opened this issue Nov 8, 2019 · 2 comments
Assignees
Milestone

Comments

@X-dark
Copy link

X-dark commented Nov 8, 2019

Hi,
I am having some difficulties to use the cli with 1.15.1.

Commands involving specific user return errors similar to

PHP Fatal error:  Uncaught Minz_PDOConnectionException: Access to database is denied for `` (`Current user must not be empty!`) in /usr/share/webapps/freshrss/lib/Minz/ModelPdo.php:32

For the user-info cli, this fix is enough:

--- cli/user-info.php.orig      2019-11-08 12:46:30.386059564 +0100
+++ cli/user-info.php   2019-11-08 12:36:37.834287942 +0100
@@ -43,7 +43,7 @@
 foreach ($users as $username) {
        $username = cliInitUser($username);
 
-       $catDAO = FreshRSS_Factory::createCategoryDao();
+       $catDAO = FreshRSS_Factory::createCategoryDao($username);
        $feedDAO = FreshRSS_Factory::createFeedDao($username);
        $entryDAO = FreshRSS_Factory::createEntryDao($username);
        $tagDAO = FreshRSS_Factory::createTagDao($username);

But for export-sqlite-for-user it seems less obvious. Here the full error in this case:

FreshRSS exporting database to SQLite for user “girardc”…
PHP Fatal error:  Uncaught Minz_PDOConnectionException: Access to database is denied for `` (`Current user must not be empty!`) in /usr/share/webapps/freshrss/lib/Minz/ModelPdo.php:32
Stack trace:
#0 /usr/share/webapps/freshrss/app/Models/Factory.php(6): Minz_ModelPdo->__construct(false)
#1 /usr/share/webapps/freshrss/app/Models/DatabaseDAO.php(201): FreshRSS_Factory::createUserDao()
#2 /usr/share/webapps/freshrss/cli/export-sqlite-for-user.php(26): FreshRSS_DatabaseDAO->dbCopy('/tmp/freshrss-g...', 1)
#3 {main}
  thrown in /usr/share/webapps/freshrss/lib/Minz/ModelPdo.php on line 32

Is this related to a specific config error on my part or a recent change to Models classes that break behavior?

@X-dark
Copy link
Author

X-dark commented Nov 8, 2019

Found the culprit (cf my comment on #2635 )

@Alkarex Alkarex modified the milestones: 1.16.0, 1.15.2 Nov 8, 2019
@Alkarex Alkarex self-assigned this Nov 8, 2019
Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Nov 8, 2019
@Alkarex
Copy link
Member

Alkarex commented Nov 8, 2019

@X-dark Could you please try this candidate fix? #2646

@Alkarex Alkarex closed this as completed Nov 8, 2019
Alkarex added a commit that referenced this issue Nov 8, 2019
javerous pushed a commit to javerous/FreshRSS that referenced this issue Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants