This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

xbilling - error in frontend
#1
[Not Solved] xbilling - error in frontend
I can not run the xbilling module.
The frontend message:
PHP Code:
array(4) { ["type"]=> int(2) ["message"]=> string(122"fopen(http://artegraf.com.ar/registrar/api/xbilling): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found " ["file"]=> string(95"/var/sentora/hostdata/zadmin/public_html/artegraf_com_ar/registrar/classes/xmwsclient.class.php" ["line"]=> int(112) } Problem reading data from http://artegraf.com.ar/registrar/api/xbilling 

Ubuntu 14.04 LTS Server 32-Bit
Sentora 1.o.3
Reply
Thanks given by:
#2
[Not Solved] RE: xbilling - error in frontend
That's because your config file is wrong. You should have entered your panel URL, NOT your billing URL:

PHP Code:
<?php
  
/**
   * API connection settings for xBilling
   * Version : 1.2.0
   * @author Aderemi Adewale (modpluz @ Sentora Forums)
   * Email : goremmy@gmail.com
   * @desc This allows front-end billing package interact with the backend module
  */
 
                   
  
// Config;
 
    $cfg = array();
 
    $cfg['api_key'] = 'your API key here';
 
    $cfg['panel_url'] = 'http://panel.domain.com';
 
    $cfg['zpx_uid'] = 1;
 
                   
     
if(strpos($cfg['panel_url'], 'http') === false){
 
        $cfg['panel_url'] = 'http://'.$cfg['panel_url'];
 
                       
?>
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by:
#3
[Not Solved] RE: xbilling - error in frontend
Panel URL is http://artegraf.com.ar

This is my config.ph file content:

<?php
 /**
  * API connection settings for xBilling
  * Version : 1.2.0
  * @author Aderemi Adewale (modpluz @ Sentora Forums)
  * Email : goremmy@gmail.com
  * @desc This allows front-end billing package interact with the backend module
 */
                   
 // Config;
    $cfg = array();
    $cfg['api_key'] = 'MI_API_KEY';
    $cfg['panel_url'] = 'http://artegraf.com.ar';
    $cfg['zpx_uid'] = 1;
                   
    if(strpos($cfg['panel_url'], 'http') === false){
        $cfg['panel_url'] = 'http://'.$cfg['panel_url'];
    }                    
?>

The new error message:

array(4) { ["type"]=> int(2) ["message"]=> string(112) "fopen(http://artegraf.com.ar/api/xbilling): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found " ["file"]=> string(95) "/var/sentora/hostdata/zadmin/public_html/artegraf_com_ar/registrar/classes/xmwsclient.class.php" ["line"]=> int(112) } Problem reading data from http://artegraf.com.ar/api/xbilling
Reply
Thanks given by:
#4
[Not Solved] RE: xbilling - error in frontend
Make sure api.php is located in /etc/sentora/panel/bin/api.php and permissions are correct.
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by:
#5
[Not Solved] RE: xbilling - error in frontend
Solved!
The correct url for panel is http://server.artegraf.com.ar
Thank you!
Reply
Thanks given by:
#6
[Not Solved] RE: xbilling - error in frontend
I have got this error
Code:
array(4) { ["type"]=> int(2) ["message"]=> string(90) "fopen(https://web01.crafthosting.fr/api/xbilling
): failed to open stream: operation failed" ["file"]=> string(57) "/home/crafthosrw/www/manager/classes/xmwsclient.class.php" ["line"]=> int(112) } Problem reading data from https://web01.crafthosting.fr/api/xbilling
But the file api.php have correct permission 777 
And the file config.php in the front-end contain this :
PHP Code:
<?php
  
/**
   * API connection settings for xBilling
   * Version : 1.2.0
   * @author Aderemi Adewale (modpluz @ Sentora Forums)
   * Email : goremmy@gmail.com
   * @desc This allows front-end billing package interact with the backend module
  */
 
                   
  
// Config;
 
    $cfg = array();
 
    $cfg['api_key'] = '82880*********';
 
    $cfg['panel_url'] = 'https://web01.crafthosting.fr';
 
    $cfg['zpx_uid'] = 1;
 
                   
     
if(strpos($cfg['panel_url'], 'http') === false){
 
        $cfg['panel_url'] = 'https://'.$cfg['panel_url'];
 
                       
?>

Please help me ?
Sorry my english is very bad....
Reply
Thanks given by:
#7
[Not Solved] RE: xbilling - error in frontend
hackkill CraftHosting,

There could be several reasons why your request failed.

Try debugging from inside
Code:
xmwsclient.class.php
Remi - Software Engineer,  Sentora Module Developer,  Owner, imerLabs


Please mark threads as SOLVED if your problem has been resolved.
Do not PM Staff Members for help unless asked to do so, this is so that others can benefit from your solution.
Do a SEARCH before asking in the forums, a solution may already exist.
Reply
Thanks given by:
#8
[Not Solved] RE: xbilling - error in frontend
(10-26-2016, 02:57 AM)modpluz Wrote: @[hackkill CraftHosting],

There could be several reasons why your request failed.

Try debugging from inside
Code:
xmwsclient.class.php

What do I debug that part ?  Huh

@[Tgates] Can you help me ?

Code:
function BuildRequest() {
       $request_template = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" .
               "<xmws>" .
               "\t<apikey>" . $this->serverkey . "</apikey>\n" .
               "\t<request>" . $this->method . "</request>\n" .
               "\t<authuser>" . $this->username . "</authuser>\n" .
               "\t<authpass>" . $this->password . "</authpass>\n" .
               "\t<content>" . $this->data . "</content>" .
               "</xmws>";
       return $request_template;
   }
Reply
Thanks given by:
#9
[Not Solved] RE: xbilling - error in frontend
You are looking for the method with the header.
Code:
PostRequest($url, $data, $optional_headers = null)
Remi - Software Engineer,  Sentora Module Developer,  Owner, imerLabs


Please mark threads as SOLVED if your problem has been resolved.
Do not PM Staff Members for help unless asked to do so, this is so that others can benefit from your solution.
Do a SEARCH before asking in the forums, a solution may already exist.
Reply
Thanks given by:
#10
[Not Solved] RE: xbilling - error in frontend
I did not write the module, modpluz did so he is your best bet in helping you sort out the xbilling isuue Wink
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
Working XBilling Module betatester3.0 14 1,013 12-05-2017, 08:40 PM
Last Post: liamgibbins
File Manager Module Error thehosterx 15 582 11-19-2017, 02:41 AM
Last Post: TGates
Issue with xBilling TGates 5 527 08-22-2017, 09:29 AM
Last Post: modpluz

Forum Jump:


Users browsing this thread: 1 Guest(s)