Monday, 9 September 2013

php xattr unsupported file type

php xattr unsupported file type

I have the PHP/PECL ext loaded so i can set extended file attributes.
However it seem to be unsupported for any of the files that I need to use
it on.
if (! xattr_supported($prepDirectory . $file)) {
throw new \Exception(
"Unable to set the extended attributes {$prepDirectory}{$file}"
);
}
xattr_set(
$prepDirectory . $file,
'user.name',
$username
);
Above is the code im using, whenever I run the xattr_supported() method it
returns FALSE and if I attempt to run the xattr_set method it doesn't do
anything but throw an exception.
I am trying to upload Documents (doc, docx, PDF), Images (png, jpg, gif)
but it seems to be unsupported for all of these.
Can anyone provide me with a list of file types that i am able to run this
function on? or point out to me where im going wrong?
Thanks

No comments:

Post a Comment