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

Ajax error when trying to view logs #3606

Closed
Fredrick-III opened this issue Oct 8, 2022 · 4 comments
Closed

Ajax error when trying to view logs #3606

Fredrick-III opened this issue Oct 8, 2022 · 4 comments

Comments

@Fredrick-III
Copy link

Describe Your Environment

  • ZoneMinder: 1.36.28
  • How you installed ZoneMinder: PPA
  • Ubuntu 22.04.1 LTS
  • Chrome 106.0.5249.103 and Firefox 105.0.2

Describe the bug
Just updated to 1.36.28 and noticed the log page only displays "Loading, please wait...".
Brower console shows Ajax request failed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the ZoneMinder log webpage.
  2. See continuous "Loading, please wait..."

Expected behavior
Expect to see log entries populate.

Debug Logs

/var/log/apache2/error.log:

[Fri Oct 07 17:44:19.028318 2022] [php:error] [pid 13965] [client 172.20.20.3:53372] PHP Parse error:  syntax error, unexpected token "else", expecting end of file in /usr/share/zoneminder/www/ajax/log.php on line 31, referer: https://[fqdn]/zm/?view=log
@spyjo
Copy link

spyjo commented Oct 8, 2022

same here after update to 1.36.28

2022/10/08 09:40:51 [error] 777#777: *7097481 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected 'else' (T_ELSE), expecting end of file in /usr/local/share/zoneminder/www/ajax/log.php on line 31" while reading response header from upstream, client: 192.168.1.12, server: , request: "GET /zm/index.php?view=request&request=log&task=query&search=&offset=0&limit=10 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.sock:", host: "xxxxxxx.yyyyyyy.com", referrer: "http://xxxxxxx.yyyyyyy.com/zm/index.php?view=log"

Code which cause problem in ajax/log.php:

} else {
  // Only the query and create tasks are supported at the moment
  $message = 'Unrecognised task '.$_REQUEST['task'];
} else {
  $task = $_REQUEST['task'];
}

@vmatrixx
Copy link

vmatrixx commented Oct 8, 2022

Affects me too.

@dt3ft
Copy link

dt3ft commented Oct 11, 2022

Hi,
Same here:
[Tue Oct 11 22:48:45.809547 2022] [php:error] [pid 930] [client ?.?.?.?:51111] PHP Parse error: syntax error, unexpected token "else", expecting end of file in /usr/share/zoneminder/www/ajax/log.php on line 31, referer: http://?.ddns.net:8080/zm/index.php?view=log

@Fredrick-III
Copy link
Author

Fixed in 1.36.29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants