Hi,
I have written a basic file upload class in PHP - but I'd like it to change the Permissions on the uploaded file.
However every time I try to use chgrp or chown in a PHP page it seems to halt the entire script (without any errors.)
e.g.:
[php]
<?php
echo("Changing perms starts.");
$file = "/users/diggory/desktop/40070029.jpg";
$groupName = "admin";
$ownershipPerms = "g+w";
chgrp ( $file, $groupName) // Change Permissions
or die("The group ownership of <em>$file</em> could not be set to <em>$groupName</em>"");
chown ( $file , $ownershipPerms))
or die("could not file ($file) permissions to ($ownershipPerms) ");
echo ("script ends.");
?>[/php]
Results in a completely blank HTML page - no errors at all - but also none of the echos I'd expect.
Am I doing this totally wrong?