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

Division by zero warnings in nginx error log #1880

Closed
tmelikoff opened this issue Apr 7, 2016 · 3 comments
Closed

Division by zero warnings in nginx error log #1880

tmelikoff opened this issue Apr 7, 2016 · 3 comments
Assignees
Labels

Comments

@tmelikoff
Copy link

Issue details

After importing old wallabag v1.9.1, during navigation between articles, at each click these warnings appear:

2016/04/07 14:42:40 [error] 6072#6072: *572 FastCGI sent in stderr: "PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP messa
2016/04/07 14:42:49 [error] 6072#6072: *572 FastCGI sent in stderr: "PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP message: PHP Warning:  Division by zero in /var/www/wallabag/var/cache/prod/twig/1a/1a984f7807246e16405eacdebeb164ac7bfde2e9c1797913ed75b23fc94f3327.php on line 127
PHP messa

Environment

wallabag version (or git revision) that exhibits the issue: wallabag-2.0.0.tar.gz (md5 hash: b61762d28a9b99a64ea4906fd8f93a58)
How did you install wallabag? Via composer create-project or by downloading the package? Downloading the package
Last wallabag version that did not exhibit the issue (if applicable): n/a
php version: PHP 5.6.19-0+deb8u1
OS: Raspbian Jessie
type of hosting (shared or dedicated): dedicated (Raspberry Pi 2)
which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): SQLite

Steps to reproduce/test case

I've imported my v1 backup and warnings starts to appear in nginx error.log.

As @tcitworld suggested, I've changed read speed to 200, saved, then reverted to 100 and the warnings are gone.

@nicosomb nicosomb added the Bug label Apr 8, 2016
@nicosomb nicosomb added this to the 2.0.1 milestone Apr 8, 2016
@nicosomb nicosomb self-assigned this Apr 8, 2016
@nicosomb
Copy link
Member

nicosomb commented Apr 8, 2016

Hello @tmelikoff,

You said you installed wallabag via the package. I checked, and the package provides good data to use the application (the Division by zero warning seems to be due to the readingSpeed value).
Can you reproduce the warning and open the cache file given in the warning to display the line 127 please?

@j0k3r j0k3r removed this from the 2.0.1 milestone Apr 10, 2016
@tmelikoff
Copy link
Author

@nicosomb done, here's line 127
$context["readingTime"] = ($this->getAttribute($context["entry"], "readingTime", array()) / $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "user", array()), "config", array()), "readingSpeed", array()));

@j0k3r
Copy link
Member

j0k3r commented Oct 2, 2016

This was due to a mis-creating of user's config.
It should be fixed by now.

@j0k3r j0k3r closed this as completed Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants