wombatservers Posted October 4, 2011 Share Posted October 4, 2011 Hi Guys, I recently switched domain names. After the switch (I had to buy a new WHMCS license), I'm now getting this error when creating MC servers: Curl error: couldn't connect to host Does anyone know what causes this error? Thanks! Link to comment Share on other sites More sharing options...
LFA Posted October 5, 2011 Share Posted October 5, 2011 Make sure your server's hostname is set correctly. It should be the IP or hostname that you use to access your control panel. If you are using tcadmin v2 you also need to specify the port: hostname:8880 Also ask your hosting provider if they have connections to port 8880 blocked. Link to comment Share on other sites More sharing options...
wombatservers Posted October 5, 2011 Author Share Posted October 5, 2011 I've got it set to that. Odd. It's set to IP:8880 Link to comment Share on other sites More sharing options...
wombatservers Posted October 5, 2011 Author Share Posted October 5, 2011 Alright, I've confirmed with my dedicated supplier and they do not block any ports. This is very strange... I have the hostname listed as IPHERE:8880 This occurred after I changed the URL of the WHMCS build. The server did not change, just the URL. Any other ideas? Link to comment Share on other sites More sharing options...
LFA Posted October 5, 2011 Share Posted October 5, 2011 Edit tcadmin_advanced.php or tcadmin2_advanced.php Find this line: $data = "0\t\t-1\tCurl error: " . curl_error($ch);Replace with this: $data = "0\t\t-1\tCurl error: " . curl_error($ch) . " Url: " . curl_getinfo ( $ch, CURLINFO_EFFECTIVE_URL);Execute the create command again. It will show the url that whmcs is using to connect to tcadmin. Make sure it is correct. Copy and paste the command in your browser and you will see a message. Create a file named curltest.php with these lines. Replace http://xxxxxxx:8880/billingapi.aspx with the correct url and upload to your hosting. Execute the page from your browser. You should see the same message that you saw when you pasted the url in your browser. If you don't see this it means connections to the port are blocked. <?php $ch = curl_init("http://xxxxxxx:8880/billingapi.aspx"); curl_exec($ch); curl_close($ch); ?> Link to comment Share on other sites More sharing options...
wombatservers Posted October 5, 2011 Author Share Posted October 5, 2011 Thanks for the advice, LFA. When going to the URL found in the first step, I get an message stating: "Please visit TCAdmin.com for help" To clarify, should I be uploading curltest.php to my TCAdmin box or to my webserver running WHMCS? Thanks, I really appreciate your assistance. Link to comment Share on other sites More sharing options...
LFA Posted October 5, 2011 Share Posted October 5, 2011 upload the file to the server where whmcs is installed. When you view it with your browser you should see the same message. if the port is blocked you will get a blank page. Link to comment Share on other sites More sharing options...
wombatservers Posted October 5, 2011 Author Share Posted October 5, 2011 That's right, my host claims the port isn't blocked though. Time to buy a cPanel license and move the webserver! Link to comment Share on other sites More sharing options...
LFA Posted October 5, 2011 Share Posted October 5, 2011 Send them a link to the script and tell them to make it work Link to comment Share on other sites More sharing options...
Jonnerz Posted November 2, 2011 Share Posted November 2, 2011 I'm getting a similar error: Curl error: couldn't connect to host Url: http://node.****.com:8880/billingapi.aspx I'm pretty sure the port is not blocked as it's a Windows Server and I've disabled Windows Firewall. My host also doesn't block any ports. I contacted my website host who host WHMCS and they say Curl is enabled. Judging by the fact it's outputting an error like that then it is definitely enabled. Help would be greatly appreciated, thanks. EDIT: Found the issue. The host I use for my WHMCS/Website blocks the port 8880 on the outbound. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.