Hi, I need help on updating webmails n sync servers. I'm adding user in linux server(logon server) and then i want to sync the password to 10 other IMAP servers. Later on in order to check mails I should update the webmails/ mail routers also. Can anybody help with the command that I should send to my logonserver? Thanks...

Thanks in advance,

By,
@--sheru--@

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

Thanks...

Thanks in advance,

By,
@--sheru--@

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.