Quite rarely users are faced with a situation where PHP scripts are not running. There are several reasons for this error:
1. Incorrect permissions on files with the .PHP extension.
To let your site work correctly: 644 permissions must be set for files, and 755 permissions must be set for folders. If the permissions are different, an error with code 500 may be displayed.
The rights to the public_html folder should be 750 for security reasons.
2. Incorrect directives in the .htaccess file.
Overriding the php_value and php_flag variables is not supported in .htaccess files. Therefore, such commands (directives) should be commented out or deleted.
Additionally please check if the connection to the database is correct.