Did you set your permissions on the file to 0777?
I do not know how to set it programmatically.
Setting it via FTP is useless because each update rewrites the permission.
by "update" I mean running file_put_contents() on the file using the web brower. with cron, nothing works because of the permission problem.
I think I understand the reason being each time file_put_contents() is used, the file is re-created and the owner changes.
currently what I do is to unlink() the file, and then file_put_contents() again. But I think this is quite ridiculous because I can unlink() but cannot overwrite? So, I would like to learn how to do it the proper way with permissions. Any advice?
Thanks.