I am currently working on moving my site from an old Godaddy dedicated server to an AWS Ubuntu instance. So this is a fresh install. Everything, as is works fine on my old server so I am suspecting this, is a php.ini issue but not sure. Now I can't get for the life of me file_put_contents
to work on my new box.
Just to test I made this
, directory
and here
directories 777 but still no luck. I tried to output errors, I get none. Checked apache error log...nothing. File uploads in on in php.ini
. What am I missing?
$file = '../../../this/directory/here/123.jpg';
$data = base64_decode($base64);
if (file_put_contents($file, $data)) {
}
Update
I have discovered that if I change my url to
$file = '../../../this/directory/here/123.txt';
instead of .jpg
it works and uploads a txt file???