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

[Bug] Various PHP warnings in the web server log #433

Open
1 task done
EinsteinIamNot opened this issue Dec 31, 2024 · 6 comments
Open
1 task done

[Bug] Various PHP warnings in the web server log #433

EinsteinIamNot opened this issue Dec 31, 2024 · 6 comments
Labels
Bug Something isn't working

Comments

@EinsteinIamNot
Copy link

Is there an existing issue for this?

  • I have searched the existing issues (open and closed) and the documentation

Current Behavior

Not sure if this is the right place to report this so if its wrong, i am sorry.

i am running the last pialert update. irts running on a pi5 together with Pi-hole phole is updated to the last version, PHP ver 8.2.26

I was looking in my pihole lighttpd/error-pihole.log for issues im having wiht pihole itself and i see my whole log is clogged with this message
mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /pialert/front/php/server/language_switch.php on line 5

its generated about 10 times a second sometimes it has 10 seconds between but i had 20 archived error logs full with this message, I know its not a fatal error but i know its not right,

I looked in that file, and this is what it says on line 5

if (strlen($pia_lang_selected) == 0) {$pia_lang_selected = 'en_us';}
since im a noob i have no clue whats wrong there. so maybe you can take a look and fix this endless loop of creating logfiles ?

Regards
Mike

Environment

OS: Debian Linux 12 Bookwurm - Kernel Linux 6.6.67-v8-16k+ arm64 Hardware Pi5 with 8 gb

Anything else?

2024-12-29 00:00:51: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:00:51: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:07: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:07: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:07: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:07: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:37: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:37: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:37: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:37: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2024-12-29 00:01:52: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5

@EinsteinIamNot EinsteinIamNot added the Bug Something isn't working label Dec 31, 2024
@leiweibau
Copy link
Owner

I wish you a happy new year.

Have you set a language in the settings and checked whether the warning disappears?

@EinsteinIamNot
Copy link
Author

I wish you and yours a happy healthy and prosperous 2025.

By my knowledge i have not set a language anywhere. I would not even have a cue where to do that either.

@leiweibau
Copy link
Owner

leiweibau commented Jan 1, 2025

I would not even have a cue where to do that either.

https://github.com/leiweibau/Pi.Alert/blob/main/docs/guide/001.md

First Screenshot (GUI-Tab -> General on the settings page)

https://github.com/leiweibau/Pi.Alert/blob/main/docs/guide/002.md

presented a little more clearly

@EinsteinIamNot
Copy link
Author

EinsteinIamNot commented Jan 1, 2025

on the settings page i see the language selection. i select english us there. after i press apply, it does not show the selection u i made. i tried a few times... and the log keeps telling me the same, but because of the selection i got other messages there.

even i never selected any other language then english us, it seems to show also de , es ,fr and it.

2025-01-01 20:52:09: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined array key "period" in /root/pialert/front/php/server/util.php on line 42 2025-01-01 20:53:11: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2025-01-01 20:53:11: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $inactive_hosts in /root/pialert/front/php/server/devices.php on line 877 2025-01-01 20:53:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /root/pialert/front/php/server/language_switch.php on line 5 2025-01-01 20:53:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_en_us): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_de_de): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_es_es): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_fr_fr): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_it_it): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:24: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $inactive_hosts in /root/pialert/front/php/server/devices.php on line 877 2025-01-01 20:53:37: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $inactive_hosts in /root/pialert/front/php/server/devices.php on line 877 2025-01-01 20:53:41: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_de_de): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:41: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_es_es): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:41: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_fr_fr): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:41: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_it_it): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:53:43: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $inactive_hosts in /root/pialert/front/php/server/devices.php on line 877 2025-01-01 20:55:54: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_de_de): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:55:54: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_es_es): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:55:54: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_fr_fr): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:55:54: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: unlink(../../../config//setting_language_it_it): No such file or directory in /root/pialert/front/php/server/files.php on line 786 2025-01-01 20:55:56: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $inactive_hosts in /root/pialert/front/php/server/devices.php on line 877 2025-01-01 20:56:37: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Trying to access array offset on value of type bool in /root/pialert/front/php/server/parameters.php on line 74 2025-01-01 20:57:59: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $inactive_hosts in /root/pialert/front/php/server/devices.php on line 877

@leiweibau
Copy link
Owner

I'll take a look at that. Since these are “warnings” and I can at least understand them, I can tell you that nothing looks “broken” here.
Maybe I can turn off one or the other warning, or change the log level.

@EinsteinIamNot
Copy link
Author

ok see what you can do and / or find the culprit. take your time since all is working. space enough to grow log files for a while. thanks in advance

@leiweibau leiweibau changed the title [Bug] mod_fastcgi.c.449) FastCGI-stderr:PHP Warning: Undefined variable $pia_lang_selected in /pialert/front/php/server/language_switch.php on line 5 [Bug] Various PHP warnings in the web server log Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants