hello we are trying to install whmcs and are running into a few difficulties:

System Requirements Check Faild:

The permissions for the configuration.php file, attachments, downloads & Templates Compile Directory folders are failing their checks.
We have edited the permissions several times on the centos7 server to no avail. all the way up to 777 permissions but still failing the check.

Also if we skip this check (by replacing the step=2 to a 3) it also has database connection issues. we have even tried with the root user to the mysql database which still errors and downloads a configuration.php file to the local computer (which contains the error saying - Oops! There's a problem could not connect to the database)

We have all the recommended requirements and I have triple checked they are up and running and working on the server.

your help in this matter would be greatly appreciated.