I have a linux server running ubuntu 10.10 maverick with apache and php installed, in the /var/www directory I have a download directory. I have used OSFile manager and modified to include a function to split files here is the code:
function spl($fname){
global $folder;
if (!$fname == ""){
maintop("Split");
$dirfile = $folder.$fname;
\\escape directory path
$dirfile = str_replace(" ","\ ",$dirfile);
$dirfile = str_replace("(","\(",$dirfile);
$dirfile = str_replace(")","\)",$dirfile);
$command = "split -d -b1024m ".$dirfile." ".$fname."_";
echo "Command: ".$command;
echo"<br />";
$returnval =0;
unset($output2);
$output = exec($command,$output2,$returnval);
//echo results
echo($output);
echo"<br />";
print_r($output2);
echo"<br />";
echo($returnval);
echo"<br />";
mainbottom();
}
else
home();
}
The command does not execute. The file and directory is correct but it returns exit code 1, and Array() as the output values, I have created a group that includes a few users, I have made this group the owner of downloads/ and given it read write and execute permissions, this group includes www-data.
Any Help will be apreciated