Answer the question
In order to leave comments, you need to log in
How to find out what caused a php script to loop?
On my server there is a php file, which contains the conditions:
if the webhook is from telegram, then some actions
if the request is from systemd, then other actions the
task of the php file is this: make a request to the ip-camera and find out if there are new videos on the SD card records.
In the case of systemd, it stupidly checks every 10 minutes for 10-minute time slices.
In the case of the webhook, it looks for videos on given dates that I sent to the bot.
16:05 I get a message with a new video that was discovered thanks to systemd
16:07 I send a message to the bot "period 12/09/2021 9:00:00 - 12/09/2021 16:20:00"
16:07 Bot says found 5 videos and house starts...
2 videos are sent,
then the message "Found 5 videos" arrives again
3 more videos are
sent Again the message "Found 5 videos"
And again...
In total I received 37 identical videos. Then just cut down apache. It seems to me that he could do this forever
Logs ...
journalctl --since "2021-12-9 16:00:00"
showed me only systemd execution on schedule
error.txt from apache2
did not show any errors at all for that period of time
access .txt from apache2
91.108.6.143 - - [09/Dec/2021:16:07:14 +0300] "POST /cam/globalcam.php HTTP/1.1" 200 5644
91.108.6.143 - - [09/Dec/2021:16:08:14 +0300] "POST /cam/globalcam.php HTTP/1.1" 200 5644
91.108.6.143 - - [09/Dec/2021:16:10:20 +0300] "POST /cam/globalcam.php HTTP/1.1" 200 5853
91.108.6.143 - - [09/Dec/2021:16:09:16 +0300] "POST /cam/globalcam.php HTTP/1.1" 200 5645
91.108.6.143 - - [09/Dec/2021:16:11:28 +0300] "POST /cam/globalcam.php HTTP/1.1" 200 5972
91.108.6.143 - - [09/Dec/2021:16:13:46 +0300] "-" 408 4492
91.108.6.143 - - [09/Dec/2021:16:15:16 +0300] "-" 408 4492
91.108.6.143 - - [09/Dec/2021:16:13:56 +0300] "POST /cam/globalcam.php HTTP/1.1" 200 5942
91.108.6.143 - - [09/Dec/2021:16:15:36 +0300] "-" 408 4492
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question