I ran chown -R www-data:www-data /srv/www/dev.example.com/public_html/uploads/
didn't work
Tried chmod 777 didn't work.
define('UPLOADPATH', "/srv/www/dev.example.com/public_html/uploads/members/");
$userId = 6;
$dir = UPLOADPATH . $userId;
rmdir($dir);
isn't removing the users folder(This runs to wipe out all their files, when deleting account). also(To delete just one photo)
$RemovePreview = UPLOADPATH . $userId. '/' . $file . '_preview.' . $image_ending;
if (file_exists($RemovePreview))
{
@unlink($RemovePreview);
}
file and image_ending are coming from my Database. Also won't delete the file.
I really don't know whats up. Not sure if this is a Php, Server or both issue?