I\'m relatively new to configuring Apache.
I have a PHP script that writes a JSON file based on values retrieved from $_GET.
Check the file/directory permissions that it is trying to write to. Make sure that it is writable by the user and/or group that the Apache process is running as.
Also check to see if SELinux is enabled by checking the contents of /selinux/enforce. If it is, either disable it or make sure the proper labels are set on the path that you are writing to.