HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=18)
-   -   Remote Framework update beta 3.1- sql and lng files fixed (http://www.howtoforge.com/forums/showthread.php?t=22087)

grandpagenocide 7th April 2008 16:54

Remote Framework update beta 3.1- sql and lng files fixed
 
1 Attachment(s)
Hey guys I fixed some bugs with the remote extentions, first I fixed the error that was stopping the sql db from being created in the users web, and second I added in the edited versions of the lng files in /lib/lang. I have tested it and its working fine. Falko, this is an addition since i sent you the updated version. I labeled it beta3.1.
Now once ISPConfig is compile with xml extentions and libxml2-dev is installed, the remote framework will work without any editing of the lng files. I included all lng files that had the issue so it should work under all languages supported.

http://rhwebhosting.com/scriptmall , I put it up in there

grandpagenocide 8th April 2008 17:03

Falko & Till,
If there is no objection, Ill take over the upkeep and updating of the remote framework, as I have to do it anyway for the billing system I am working on. I am going to add ruby and mailuser login etc to the remote, and whatever else i can find missing, if you can point out any todo's that you have for it let me know, and ill upload them to you as I update them.

and just a dumb question, why is xml disabled in the stable releases anyway?
GG

grandpagenocide 9th April 2008 03:55

1 Attachment(s)
ok guys heres 4.0 i didnt think i would be getting to these updates this soon.
in addition to adding the lng files and the sql fix,
I have added ruby and mailuser login to the remote framework.

sorry was an error I just updated it 4/9/2008.

ottojan 7th May 2008 19:49

I downloaded the beta4 version, I noticed that there are some functions added for co-domains.

domain_list and domain_add

Can you help to add a domain_update function?

I also noticed that the domain_list function only returns one co-domain per site (domain), is that a bug?

And is it also possible to filter only c-domains for a singel site?

grandpagenocide 8th May 2008 04:02

I will be adding domain_update when I get some time off from work, and thanks for letting me know it only showed one co-domain on the list. Ill look into that, and yes it is possible, to list co domains for a single site, just havent thought of it :) you could try something like
Quote:

$params = array ( 'sid' => $session_id,
'module' => 'co-domain',
'function' => 'domain_list',
'params' => array ( web_title => "web1"));
I am not sure if it would work, havent tried it, but let me know if it does

jfunk 11th May 2008 00:49

I just installed 4.1 beta and I noticed that SOAP Faults are not working properly. I enabled debugging in the client and I get the following messages if a fault occurs:


soapclient: got response, length: 198
soapclient: Entering parseResponse(), about to create soap_parser instance
soapclient: soap_parser: Entering soap_parser()
soap_parser: parse error: XML error on line 2: Invalid document end

soapclient: sent message successfully and got a(n) NULL back

jfunk 11th May 2008 01:10

I solved the problem by simply upgrading the included NuSOAP library to 0.7.3 from http://sourceforge.net/projects/nusoap/.

gauthier 21st May 2008 22:08

Hi, thanks to grandpagenocide.

I am using the ispconfig_remoting_ext_beta4_os version of remote framework, ISPConfig 2.2.23 on OS Centos5.

It works fine to create webs, create users (email accounts) and update users. But it fails suspending or deleting webs.

I have already cheked the remote user has permissions to delete and update websites. And I am trying first supending and then deleting.

Debug shows the following:
Quote:

.../...
soap_transport_http: port = 81
soap_transport_http: path = /remote/index.php
soap_transport_http: entered sendHTTPS() with data of length: 737
soap_transport_http: found proper separation of headers and document
soap_transport_http: cleaned data, stringlen: 186

soapclient: got response:
Fatal error: Call to a member function myGroups() on a non-object in /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_domain.lib.php on line 376
.../...
The line 376 is (I show it with the "------------->" string):

Quote:

function domain_delete($doc_id, $doctype_id, $action, $die_on_error = '1') {
global $go_api, $go_info;

// If the currently logged in user is not admin or reseller, we will not allow
// him to delete this record
-------------> $tmp_groups = $go_api->groups->myGroups();
if(!is_array($tmp_groups)) {
$sql = "UPDATE isp_nodes SET status = 1 WHERE doc_id = '$doc_id' AND doctype_id = '$doctype_id'";
$go_api->db->query($sql);
$go_api->errorMessage($go_api->lng("error_domain_delete_client").$go_api->lng("weiter_link"));
}
Does anybody know why is this ?

Also, I would like to know how shall I empty the recycle bins using framework.... (I thing there is no way...)

Thanks a lot.

till 22nd May 2008 10:01

Quote:

Does anybody know why is this ?
Clients are not allowed to delete domains, this makes sense as they would not be able to create it again.

Please try this:
Code:

if(!isset($go_api->groups)) {
  $tmp_groups = $go_api->groups->myGroups();
  if(!is_array($tmp_groups)) {
    $sql = "UPDATE isp_nodes SET status = 1 WHERE doc_id = '$doc_id' AND doctype_id = '$doctype_id'";
    $go_api->db->query($sql);
    $go_api->errorMessage($go_api->lng("error_domain_delete_client").$go_api->lng("weiter_link"));
  }
}

This should solve the problem as we do not have to query groups when we use the remoting framework and the group code is not loaded at all in this case.

gauthier 22nd May 2008 11:58

I suppose you mean:

Quote:

if(isset($go_api->groups)) {
../..
}
Thanks


All times are GMT +2. The time now is 22:11.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.