Jump to content
  • 0

Cpanel Problem


Moby2000

Question

Hi Guys

 

Been working on my Blesta install and thought i'd got everything sorted, but i've just started to import my customers manually and have come across this error whilst trying to confirm the order,

"No host defined on line 237 in /home/wnlocalc/public_html/client-area/components/modules/cpanel/apis/cpanel_api.php".

I re-installed the cPanel module and it gives a tick when i input the settings for my WHM account so it seems to be connecting to the server Ok.

I even tried to create an account on the client side and it's giving me the same error?

I know this is something i've done or not done because i've had it working before. but i got my new licence and now i'm having great fun setting up Blesta.

 

Any ideas would be appreciated.

 

Steve

Link to comment
Share on other sites

Recommended Posts

  • 0

Yes. Everything in v3.0.x will be in v3.1.x

 

Hi,

 

I'm running into this same issue with v3.5.1 and I've tried everything suggested in this thread.  I've also uninstalled the module, re installed it and re entered all of my information.  The 'hostname' is the IP, correct?  I couldn't add the server at all if I didn't use the IP.

 

I checked the logs and there are no errors.

 

No idea how much this helps but if I comment out lines 233-241 in components/modules/cpanel/apis/cpanel_api.php , I'm able to get the system to store the clients username and password.  It's of course missing the server so I still can't connect to anything but it looks to me like the issue lies within these lines.

 

Thanks,

 

DL

Link to comment
Share on other sites

  • 0

No idea how much this helps but if I comment out lines 233-241 in components/modules/cpanel/apis/cpanel_api.php , I'm able to get the system to store the clients username and password.  It's of course missing the server so I still can't connect to anything but it looks to me like the issue lies within these lines.

 

Those lines simply ensure that a host name has been provided so that the API can work with it, which is why it throws an exception if it's not.

 

At what point do you receive the error "No host defined"? When saving a new module row? When creating a package? When attempting to create a service? My guess would be any of these.

 

The hostname should be the IP address, yes, and you should make sure you have it set without any white-space before/after it.

 

If you wanted to debug the issue, you would need to update the code looking for the point where the host name gets lost between when you save a module row and when it is passed to the API.

e.g. update /components/modules/cpanel/cpanel.php and look for this line

private function getRowRules(&$vars) {

and below it add

print_r($vars);
var_dump($vars);
die;

Then try to add the module row again. You'll get a white page that should display the data you tried to save. Check whether the IP address you set for the host name is included.

Link to comment
Share on other sites

  • 0

I was using the 'stock' cPanel module to import from WHMCS and then I tried switching to cPanel extended and back and that's when I was getting the errors.  It's a bit tough to explain exactly what I was doing but the errors appeared after the import. I did things differently today and I got it setup without any errors the way I want it (cPanel extended is what I decided to use).

 

I wish I had more info to provide or the time to test it.  If I get errors again, I'll look back at these tips and try to trace it.

 

Thanks for the help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...