I guess your error is in the path
of your unlink()
function, as you said actual field is like /gfx/image.png
wich doesn't look to me like an absolute path, correct me if i'm wrong.
To delete the file
and use unlink()
directly your script should be in the same folder as the image. So i think it would be better to set an absolute path
to your entry like
$path_abs = ' /customers/d/8/e/frankkluytmans.nl/httpd.www/testsite/cms'; //is the `gfx` folder inside `cms` folder? if it is this will work otherwise you have to change
if(unlink($path_abs . $imageDeletePath['image']))