I have a virtual Arch Linux test server with XAMPP running on my laptop, and I can't get php to create new files, even with permissions set at 777. Here's the code:
$CompleteFilepath = $AFilepath . '/filepath/filename.php'; $FileHandle = fopen($CompleteFilepath, 'c') or die ("cannot be opened for writing"); // Debug
There's obviously more code after, but it's irrelevant because it always dies here. I couldn't get it to work by modifying the owner and group settings, so I finally resorted to recursively setting everything (except for the main root folder) to 777, and it still won't work. But the folder isn't being created directly in the root, so it shouldn't matter, right?
Edit: I'm still not really sure what I was doing wrong, but today I set the owner to the server and it worked. I thought I had tried that, but maybe not. At least I can get on with development, even if I need to configure my production server more securely in the end.</div