To prevent this error, you can first delete your `.htaccess` file from all the three files directories (public, private, and temp) if there is no additional settings has been done at your end. After that save the configuration page on the (/admin/config/media/file-system). This will generate a new .htaccess file which will include following code or you can directly add the following code in the `.htaccess` file for all the three files directories.
<IfModule mod_php7.c>
php_flag engine off
</IfModule>
Executable PHP Error on Insight Section of Drupal 7 website | Acquia Product Documentation
Cloud Platform
Executable PHP Error on Insight Section of Drupal 7 website