<?php ob_start(); include_once 'lib/functions.php'; $authValues = checkCookieExists("info"); $authValues = getCookieData($authValues); $software = $authValues['software']; $serverValues = checkCookieExists("serverdetails"); $serverValues = getCookieData($serverValues); deleteMyCookie("info"); deleteMyCookie("serverdetails"); deleteMyCookie("apidetails"); $ip = $serverValues['serverAddresses']['public'][0]; include 'header3.php'; flush_buffers(); print "<h3>Deploying {$software} ..<h3>"; print "<h3>Waiting on the server to start up .."; flush_buffers(); $i = 0; $y = 2; while (!checkSSH($ip)) { $i++; echo "."; sleep(1); flush_buffers(); if ($i > 120) { print "<br /></h3>There seems to be a problem. It took longer than 120 seconds to start the build. You can check your <a href=\"https://manage.rackspacecloud.com/\">control panel</a> and visit the console of the server to see if it is responsive. You can try rebooting the server or <a href=\"/\">starting over</a>.</h3><br /> I'll try {$y} more timesy.."; include 'footer2.php'; flush_buffers(); $i = 0; $y--;
<?php include_once 'lib/functions.php'; $cookieValue = checkCookieExists("info"); $cookieValue = getCookieData($cookieValue); $userName = $cookieValue['userName']; $authKey = $cookieValue['authKey']; $cookieValue = checkCookieExists("serverdetails"); $serverInfo = getCookieData($cookieValue); $cookieValue = checkCookieExists("apidetails"); $cookieValue = getCookieData($cookieValue); $auth = new RackAuth($userName, $authKey); $auth->setXAuthToken($cookieValue['XAuthToken']); $auth->setXStorageToken($cookieValue['XStorageToken']); $auth->setXStorageUrl($cookieValue['XStorageUrl']); $auth->setXServerManagementUrl($cookieValue['XServerManagementUrl']); $auth->setXCDNManagementURL($cookieValue['XCDNManagementUrl']); ob_start(); if (empty($cookieValue['XStorageToken']) || !isset($serverInfo)) { $invalid = array("server" => array("progress" => "0", "status" => 'Could not get server details. Please <a href="/">try again.</a>')); echo json_encode($invalid); exit(1); } $cloudServers = new RackCloudService($auth); $serverDetails = $cloudServers->listServer($serverInfo['serverID']); $serverDetails = object2array($serverDetails); echo json_encode($serverDetails); flush_buffers();
<?php include_once 'lib/functions.php'; $cookieValue = checkCookieExists("info"); $cookieValue = getCookieData($cookieValue); $userName = $cookieValue['userName']; $authKey = $cookieValue['authKey']; $software = $cookieValue['software']; $auth = new RackAuth($userName, $authKey); @$auth->auth(); $lastHTTPCode = Request::getLastHTTPCode(); $lastErrorMessage = Request::getLastError(); if ($lastHTTPCode == 204) { $apiAuthInfo = array('XAuthToken' => $auth->getXAuthToken(), 'XStorageToken' => $auth->getXStorageToken(), 'XStorageUrl' => $auth->getXStorageUrl(), 'XServerManagementUrl' => $auth->getXServerManagementUrl(), 'XCDNManagementUrl' => $auth->getXCDNManagementUrl()); $cookieContent = makeCookie($apiAuthInfo); setMyCookie("apidetails", $cookieContent, 3600); } include 'header2.php'; ob_start(); if ($software == "magento") { print "<p>Since you have chosen Magento, you may want to choose a size larger than 4Gb.</p>"; } if ($debug) { echo "<p>HTTPCode: {$lastHTTPCode}<br>\nErrorMessage: {$lastErrorMessage}</p>\n"; } if ($lastHTTPCode == (401 | 403)) { print "There seems to be a problem with your authentication info. Please <a href=\"/\">try again</a>."; include 'footer2.php'; exit(1); } if ($lastHTTPCode == 413) {