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

Table not found error in wallabag fresh install with pdo_mysql #1971

Closed
srinathh opened this issue Apr 23, 2016 · 13 comments
Closed

Table not found error in wallabag fresh install with pdo_mysql #1971

srinathh opened this issue Apr 23, 2016 · 13 comments

Comments

@srinathh
Copy link

srinathh commented Apr 23, 2016

Issue details

I have made a fresh install of wallabag with pdo_mysql driver and I'm getting the following error. The database symfony exists and is enabled for the user. It appears wallabag is not creating required tables

PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'symfony.wallabag_craue_config_setting' doesn't exist' in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91\nStack trace:\n#0 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(91): PDOStatement->execute(NULL)\n#1 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(828): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(712): Doctrine\\DBAL\\Connection->executeQuery('SELECT t0.name ...', Array, Array)\n#3 /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php(196): Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister->load(Array, NULL, NULL, Array, NULL, 1, NULL)\n#4 /var/www/wallabag/vendor/craue/config-bundle/Util/Config.php(39): Doctrine\\ORM\\EntityRepository->findOneBy(Array)\n#5 /var/www/wallabag/src/Wallabag/Use in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 53

Environment

  • wallabag version (or git revision) that exhibits the issue: 2.0.3
  • How did you install wallabag? Via git clone or by downloading the package? git
  • php version: 5.5.9
  • OS: ubuntu 14.04
  • type of hosting (shared or dedicated): dedicated
  • which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): mysql

Steps to reproduce/test case

  • installed wallabag in /var/www/wallabag
  • added apache virtual host

Please provide necessary steps for reproduction of this issue, or better the
reduced test case (without any external dependencies, if possible).

@nicosomb
Copy link
Member

Hello @srinathh!
Did you make the install on a new database?

I just tried with pdo_mysql too.
Here are my commands:

composer install
bin/console wallabag:install
bin/console server:run

During the composer install, I choosed pdo_mysql and an existing database.

And if I do a SHOW TABLES, here are my tables:

+--------------------------------+
| Tables_in_wllbgtest            |
+--------------------------------+
| wallabag_annotation            |
| wallabag_config                |
| wallabag_craue_config_setting  |
| wallabag_entry                 |
| wallabag_entry_tag             |
| wallabag_oauth2_access_tokens  |
| wallabag_oauth2_auth_codes     |
| wallabag_oauth2_clients        |
| wallabag_oauth2_refresh_tokens |
| wallabag_tag                   |
| wallabag_tagging_rule          |
| wallabag_user                  |
+--------------------------------+

All seems to be fine with last wallabag version.

@srinathh
Copy link
Author

Yup - i'm doing a first time installation & don't have any previous wallabag database. Is there an sql script to get these setup?

@tcitworld
Copy link
Member

You just need an existing (empty) database and do php bin/console wallabag:install --env=prod and it should setup itself.

@srinathh
Copy link
Author

hmm - that's what I thought it would do but it didn't setup when I did that funnily enough.

I had some write permission issues also which i fixed by chown the wallabag folder to the default apache user. Would this be related to that (shouldn't i think since mysql is accessed through IP:port vs. file right?)?

@tcitworld
Copy link
Member

You may want to check informations and credentials inside the app/config/parameters.yml file.

@srinathh
Copy link
Author

The settings are all defaults. I also tried with pdo_sqlite and run into the same issue - this time logging in as www-data user when installing wallabag. Somehow the tables are still not getting created during composer install. Interestingly the sqlite database file is created but somehow the tables are not. Is there some log file created by composer I can check in case there are errors with whatever routine is creating the tables?

@skimpax
Copy link

skimpax commented Apr 23, 2016

@srinathh
Just did my first install of wallabag (2.0.3) with pdo_mysql and had quite the same issue: tables not existing (as far I remember).

I just replayed the install commands and things went OK:
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod

Don't forget to set the proper user:group to auto-generated files just after:
chown -R www-data:www-data /var/www/wallabag/

Then restarted my php and nginx servers and things were OK.

@srinathh
Copy link
Author

got it... let me try again

@j0k3r
Copy link
Member

j0k3r commented May 3, 2016

@srinathh is it fixed?

@srinathh
Copy link
Author

srinathh commented May 4, 2016

Sorry - have been unable to try yet. I switched the server stack to Caddy from Apache & still need to figure out the php linkages.

@srinathh
Copy link
Author

srinathh commented May 6, 2016

I thing the database issues are fixed now. I re-installed with pdo_sqlite and saw a splash showing database tables being created during the install

I'm still having some issues with ARGV errors. Is this related to the fact that I'm on Ubuntu 16.04 which defaults to PHP 7? Or is this some config issue i should debug?

[Fri May  6 08:19:14 2016] PHP Notice:  Undefined index: argv in wallabag/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php on line 55
[Fri May  6 08:19:14 2016] PHP Warning:  array_shift() expects parameter 1 to be array, null given in wallabag/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php on line 59
[Fri May  6 08:19:14 2016] PHP Warning:  Invalid argument supplied for foreach() in wallabag/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php on line 286
[Fri May  6 08:19:14 2016] PHP Notice:  Undefined index: argv in wallabag/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php on line 55
[Fri May  6 08:19:14 2016] PHP Warning:  array_shift() expects parameter 1 to be array, null given in wallabag/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php on line 59
[Fri May  6 08:19:14 2016] PHP Warning:  Invalid argument supplied for foreach() in wallabag/vendor/symfony/symfony/src/Symfony/Component/Console/Input/ArgvInput.php on line 286

@nicosomb
Copy link
Member

nicosomb commented May 6, 2016

I close this issue. Feel free to open a new one to discuss about your warnings.

@airdogvan
Copy link

In docker update image from a working instance to the latest and now I've got this error as well...
NOT a fresh install, in fact not install at all, just a pull of new image.
Help appreciated.
Thanks

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

6 participants