Jump to content

Danieliazzz

Members
  • Posts

    4
  • Joined

  • Last visited

Danieliazzz's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. It did not, upon looking at the CWP Module for Blesta included with the latest version. It is clearly different to what is currently implemented. /home/webytely/public_html/dashboard/components/modules/centoswebpanel/apis/centoswebpanel_api.php public function apiRequest($function, array $params = []) { // Set api url $protocol = ($this->use_ssl ? 'https' : 'http'); $port = ($this->use_ssl ? '2031' : '2030'); $url = $protocol . '://' . $this->hostname . ':' . $port . '/api/?key=' . $this->key . '&api=' . $function . '&' . http_build_query($params); // Send request $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $data = $this->parseResponse(curl_exec($ch)); curl_close($ch); return $data; } And what CWP Provided as an Example: $data = array(“key” => “MYKEY”,”action”=>’add’, ”domain”=>’MY_DOMAIN’, ”user”=>’USER’, ”pass”=>’PASSWORD’, ”email”=>’email@account’, ”package”=>’PACKAGE_NAME’, ”inode”=>’0’,”limit_nproc”=>’40’,”limit_nofile”=>’0’,”server_ips”=>’MY_IP_SERVER’); $url = “https://IPSERVERAPI:2304/v1/account”; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “POST”); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt ($ch, CURLOPT_POST, 1); $response = curl_exec($ch); curl_close($ch); Based on the new revisions provided here: https://docs.control-webpanel.com/docs/developer-tools/api-manager/functions/function-api-account/add So Essentially, this made the Error 500 problem since the server isnt responding due to a wrong api method being used. Not even using port 2304 on the latest blesta update. Can we get this bumped to a developer at blesta to take a look. Thanks
  2. Hi, 2031, and 2030 is open because without port 2031 i cannot access the admin panel. Also in a new update 2304 is the one used in API Commands. Maybe cwp itself is blocking the command due to that a different port is used? I'll try to modify the port in the cwp modules to check and see.
  3. Curl to URL scripts seems to be working in all of other scripts i am running with this machine. Firewall is open ports for 2304 which is required for the api. Thanks
  4. Hi, I had a problem with provisioning while on cwp. After Clicking Checkout on the blesta client portal, the page becomes unresponsive and returns error 500. Upon Reviewing Blesta Logs, this is what's it is pertaining to: Upon Checking line 70, this is what it contains: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $data = $this->parseResponse(curl_exec($ch)); curl_close($ch); Specifically Line 70 is: $data = $this->parseResponse(curl_exec($ch)); Note that this is a new installation of blesta and ioncube is properly working. Using PHP 7.2 with Ioncube.
×
×
  • Create New...