Hi...
Can anyone help me with this codes?

Im trying 2 sync a file within a server. Check it out plz...
This is user_registration.main.php:
if ($status = 1)
{
$servers = TEST_SERVER;
require_once (dirname(__FILE__) . "/user_registration.rsync.php");
$return_sync = rsync_server ($servers);
} else {
fwrite(STDLOG,"\n\n---------->>\nError!!!\n---------->>");
}
This is user_registration.rsync.php:
<?php
require_once (dirname(__FILE__) . "/" . "user_registration.err_msg.php");
function rsync_server ($servers)
{
$return_value = 0;
if (!trim($servers)) {
$return_value = 81;
}
if (!$return_value) {
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("pipe", "w") // stderr is a pipe that the child will write to
);
$command = "rsync /root/testfali/test1.html /root/testfali1/test1.html";
$process = proc_open($command, $descriptorspec, $pipes);
if (is_resource($process)) {
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
$return_value = proc_close($process);
}
}
$result = $return_value;
$return_value_arr = array ('value'=>$return_value, 'msg'=>$GLOBALS['USER_REG_ERR_MSG'][$return_value]);
return serialize($result);
}
?>
My command is not working and $results retun i=0