File_put_contents: failed to open stream: Permission denied

Hello,
My problem seems to be the same as exposed here, but I cannot resolve it.

I running apache2 on ubuntu server 16.04, and when I enter the command getenforce, I get Disabled.
I cannot activate it setenforce 0 or setenforce 1 always replies setenforce: SELinux is disabled.
So I modified /etc/selinux/config to write SELinux=enforcing instead of SELinux=permissive.
Then I rebooted.

Once the machine up, I retried to execute setenforce 0 or setenforce 1 but it always replies setenforce: SELinux is disabled.

Anyway, setsebool -P httpd_unified 0, or setsebool -P httpd_unified 1 always replies setsebool: SELinux is disabled.

What can I do?

I solved the problem on this server by setting directory permissions to 777.
But on my other server directories are set to 755 so, I suppose that apache2 has no correct rights.