Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    2

    Default cron backup job using POST not working anymore ?

    I've been told (from hostgator support) that after upgrading to cpanel 11.25 - POST is no longer a valid command.

    I've been using a cron job that initiates a script that sends commands to the built in backup feature in each of my clients cpanel's (i'm a reseller) to backup - and send it to my FTP.

    Since last week this has not been working - and this is because POST is not supported ? anymore with cpanel ?

    could someone shed some light over this - and maybe direct me to a solution.

    The script goes something like this (after all the configuration stuff):

    "
    foreach ($sites as $site) {
    if ($secure) {
    $url = "ssl://".$site['domain'];
    $port = 2083;
    } else {
    $url = $site['domain'];
    $port = 2082;
    }
    $socket = fsockopen($url,$port);
    if (!$socket) { echo "Failed to open socket connection… Bailing out!\n"; exit; }
    // Encode authentication string
    $authstr = $site['cpuser'].":".$site['cppass'];
    $pass = base64_encode($authstr);
    $params =
    "dest=$ftpmode&email=$notifyemail&server=$ftphost&user=$ftpuser&pass=$ftppass&port=&rdir
    =$ftpdir&submit=Generate Backup";
    // Make POST to cPanel
    fputs($socket,"POST /frontend/".$site['skin']."/backup/dofullbackup.html?".$params."
    HTTP/1.0\r\n");
    fputs($socket,"Host: {$site['domain']}\r\n");
    fputs($socket,"Authorization: Basic $pass\r\n");
    fputs($socket,"Connection: Close\r\n");
    fputs($socket,"\r\n");
    // Grab response even if we don't do anything with it.
    while (!feof($socket)) {
    $response = fgets($socket,4096);
    if ($debug) echo $response;
    }
    echo "\nDone with {$site['cpuser']}\n";
    fclose($socket);
    // sleep(20);
    }
    ?>"

  2. #2
    Registered User
    Join Date
    Feb 2010
    Posts
    2

Similar Threads & Tags
Similar threads

  1. MySQL backup cron job not working
    By mrnabo in forum New User Questions
    Replies: 1
    Last Post: 04-21-2010, 10:52 AM
  2. Replies: 0
    Last Post: 01-22-2010, 04:53 PM
  3. Cron Job not working
    By sinclac in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-02-2004, 07:14 PM
  4. Cron Jobs -- not working anymore...?
    By OneSizeFitsAll in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-09-2003, 12:52 AM
  5. Cron not working anymore?!
    By internetfab in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-23-2003, 09:11 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube