There is some problem in connection: SQLSTATE[HY000] [2002] No such file or directory

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/html/PI_WEB/ewt/pi_student/new.php:4 Stack trace: #0 /var/www/html/PI_WEB/ewt/pi_student/index.php(31): include() #1 {main} thrown in /var/www/html/PI_WEB/ewt/pi_student/new.php on line 4