I am trying to write a query to a file for debugging. The file is in database/execute.php. The file I want to write to is database/queries.php.
Guys I had this problem for 1 month and did everything but couldn't fix it, but now I know the solution.
I use a shared linux hosting, when my admin changed the php to 5.3 I got many error for the "file_put_contents" code. try to test my plan:
In your host create a file like mytest.php, and put this code in and save:
Open the URL "www.your-domain.com/mytest.php" one time and then check your email. you should have an email from your host with the information you entered in mytest.php, check the sender name. if its from Nobody you have problem about "Permission Denied" because something not defined and if the sender name is like my id: iietj8qy@hostname5.netly.net you dont have prob.
My admin changed the server and installed the host again I think and the problem got solved, tell your host administration what I told you and maybe they find the answer.
hope it helps you!