linux - PHP: Issues after upgrade

one text

I have migrated from php 7.x to PHP 8.1 and just noticed that my screen exec() are no longer working. They were working fine before. I can see the screens running with screen -ls but it??�s like the exec() in the php file is no longer executed. It works if I run the php file via URL though, can you please help?

Here is the exec function inside the screen.php file:

exec('screen -S aggiornamento_clicks_DB_Bitly -dm bash -c "cd /var/www/html/Telegram_bot/Daniele/condividi_nel_gruppo_bot; while true; do php aggiorna_clicks.php; sleep 300; done;"');

It supposed to load/execute the aggiorna_click.php file.

i Tried to manually load the php script file and it worked. I tried to reboot the server with no avail.

Source