I'm migrating our PHP websites over to our new Bitnami installation on AWS LightSail. I'm running into an issue where I have a .JSON file and a phpHelper function that writes to it (essentially a log that I can read from and write to with code) in my home folder. Accessing the helper file directly, everything works fine however if I try to use the helper functions from any file in a different directory I get errors from fopen and fwrite saying "Error opening output file". I would think it was a PHP error however I know the code works when I access it directly.
I've tried changing the file permissions of the phpHelper and the .JSON as well as the php file that is trying to access them. I changed the permissions to 755 but that didn't change anything. I saw someone recommend "sudo chown -R www-data:www-data" through SSH however that didn't seem to fix it either.
EDIT: fixed a problem I caused and removed it from the description above.
Thanks in advance!