No such file or directory (2) error on using any server action

Getting this error when trying to run any server action... All the actions work fine on local server but they don't after I published it into an online target...

{"code":0,"file":"/magapp/dmxConnectLib/lib/core/Session.php","line":9,"message":"PHP Startup: open(/tmp/sess_3cqdjm113c5br6f5l67tsfe4rj, O_RDWR) failed: No such file or directory (2)","trace":"#0 [internal function]: exception_error_handler()\n#1 /magapp/dmxConnectLib/lib/core/Session.php(9): session_start()\n#2 /magapp/dmxConnectLib/lib/App.php(38): lib\core\Session->__construct()\n#3 /magapp/dmxConnect/api/konfig/kategorieLista.php(5): lib\App->__construct()\n#4 {main}"}

fixed it by switching server’s PHP version from 8 to 7.4…
So server actions don’t work on PHP 8.0?

Seeing the error it looks like the sessions are not correctly configured with the PHP 8.0 installation on your server.

does it have to do with the php.ini file and the session.save_path function?

Yes I think so, it now probably points to /tmp/. In the error message you see it is trying to access /tmp/sess_3cqdjm113c5br6f5l67tsfe4rj, so it is possible that /tmp/ folder doesn’t exist or that PHP doesn’t have write permissions there.