Jump to content

Cpanel Module Not Importing Whm/cpanel Packahes


Recommended Posts

Posted

  1. Describe the issue you're experiencing.

    Blesta 3.1's cPanel Module doesn't seem to be importing packages correctly.

     

  2. Provide detailed steps necessary to reproduce the issue.

    Log in to WHM, add a new package, log in to Blesta 3.1, edit a package, under cPanel properties the package does not show up.

     

  3. Include the URL the error occurred on, relative to the installation path, ie "/admin/login".

    http://accounts.hosthallam.com/admin/packages/edit/5/

     

  4. Attach screenshots.

    Attached.

     

  5. Include your configuration settings, i.e. OS, version of Blesta, version of module/gateway/plugin if applicable.

    Blesta 3.1, cPanel Module

post-9520-0-60270200-1390681918_thumb.pn

Posted

Your a reseller erm you might need to show the setup area for the mod, server OS, and PHP / Mysql versions to help, because it's connected to the reseller side, sometimes the host can muck up the packages. I was helping a guy who had random packages and that was something on the cPanel host side and not Blesta.

Posted

Your a reseller erm you might need to show the setup area for the mod, server OS, and PHP / Mysql versions to help, because it's connected to the reseller side, sometimes the host can muck up the packages. I was helping a guy who had random packages and that was something on the cPanel host side and not Blesta.

 

Hi bud, thanks for the reply.

 

Server OS: CentOS

PHP Version: 5.3.27

MySQL Version: 5.1.67-rel14.3-log

Mod setup area: Attached.

post-9520-0-44958200-1390690223_thumb.pn

Posted

It looks ok on this side. If you would like me to have a look with you on teamviewer to see if there is a fix, if there isn't the guys at Blesta can help, however they may need login information to debug it.

 

Also is there any errors in the logs? tools > logs > modules > cPanel > click the row.

Posted

Package config on WHM looks fine too, and it's working on Blesta 2.5.1 fine (have it installed on another subdomain). No errors the the logs either. Any suggestions?

Posted

I don't really want to install the Extended module, much rather stick with the Blesta supported cPanel module. Could you please have a word with one of the Devs regarding this?

  • 2 weeks later...
Posted

If you can retrieve the packages via the API in Blesta v2.5, then I'm not sure why it's not working in v3. However, I don't think this action is logged. We would need to know what the response is from the server when attempting to fetch the packages to see what the cause may be.

 

If you can update a file to add in logging, then please update /components/modules/cpanel/cpanel.php (line 1521) and change:

return $this->ArrayHelper->numericToKey($this->Json->decode($api->listpkgs())->package, 'name', 'name');

to:

$this->log($module_row->meta->host_name . "|listpkgs", null, "input", true);

$result = $this->parseResponse($api->listpkgs());
if (!$result || !property_exists($result, "package"))
    return array();
return  $this->ArrayHelper->numericToKey($result->package, "name", "name");

Then, go to add/edit a cPanel package, and then check the Module Logs. Let us know what output is shown.

Posted

Thank you for getting back to me, Tyson.

 

I made the changes to cpanel.php as requested, then attempted to edit a cPanel Package. As expected, the list of available WHM Packages was empty, and the Module log simply shows:

jin.webserversystems.com|listpkgs
Please find attached a screenshot of the log.
 
Any further help is much appreciated.
 
Thank you,
Daniel.

post-9520-0-61092500-1391545996_thumb.pn

Posted

Interesting. So, the Input is fine, but there is no Output section. Either an error occurred, or the cPanel server didn't respond to the request. I don't think it would have been an error, otherwise you likely would have seen it on the Packages page.

 

Do you have multiple cPanel servers listed under [settings] -> [Company] -> [Modules] -> [installed] -> cPanel? Can you re-save them successfully? Do you have a server group created that your package is using, but which you forgot to assign servers to?

Posted

Thanks for the reply.

 

The same issue occurs if I use a server group or try the server directly in the package.

Please see the screenshot attached which should answer your questions.

As we speak, I have had new clients sign up to the same cPanel packages via my Blesta 2.5 installation, which is still working fine.

 

Thanks,

Daniel.

post-9520-0-18177500-1391552996_thumb.pn

Posted

Okay, let's try one more change.

 

If you could, update /components/modules/cpanel/cpanel.php (line 1475) and change:

$this->log($row->meta->host_name, $response, "output", $success);

to:

$this->log(($row ? $row->meta->host_name : "unknown"), $response, "output", $success);

And see if the packages load this time.

Posted
Thanks again.

 

I made the given change, and retested. Still no luck I'm afraid. The field is still blank. I'm happy to give you access to my installation if you wish.

 

Thanks,

Daniel.

Posted

 

Thanks again.

 

I made the given change, and retested. Still no luck I'm afraid. The field is still blank. I'm happy to give you access to my installation if you wish.

 

Thanks,

Daniel.

 

Can you post the log mate :)

Posted

 

Thanks again.

 

I made the given change, and retested. Still no luck I'm afraid. The field is still blank. I'm happy to give you access to my installation if you wish.

 

Thanks,

Daniel.

 

 

I thought we would have had something there. It certainly worked for me at least.

 

If you can provide a Blesta admin account and FTP access to update the cPanel module, I can take a look.

Posted

Thanks Tyson, I've sent you a PM with the credentials. You'll notice I've reverted back to the default cpanel.cfg, but the modified ones are in the same directory, just re-named if you wish to enable logging, etc, again.

Join the conversation

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

Guest
Reply to this topic...

×   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...