#1  
Old 18th January 2009, 01:00
bwaymark bwaymark is offline
Junior Member
 
Join Date: Feb 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default Remoting Framework

Hiya Everyone:

I am trying to get the Remote Framework to tell me the users I have setup for 'web51' on my dev server. However, when I script the nothing happens. I've created a user in Remote Framework with permissions for everything. I've tried logging in using the proper username and password I created, and nothing happens, and I've tried using a wrong password to see if I could get an error, but I am getting none. I then tried an 'echo $sessions_id' and it seems that the session id variable is empty.

Anyone have any ideas what I am doing wrong?

I've am running ISPConfig Version: 2.2.27 running ispconfig_remoting_ext_beta4.2.1_os.pkg and libxml2-dev 2.6.27.dfsg-6. I've installed Remoting Framework, adding a user, and modified the test script to be:

<?php
/**
* ISPConfig Soap Connector
* Version 1.3
* (c) Projektfarm GmbH 2005
* This script requires PHP with CURL extension
*/
include("soap.lib.php");

// Insert here your 42go Server
$server_url = "https://<webserver>:81";

// creating object for soap_client
$soap_client = new soap_client($server_url.'/remote/index.php');


// Username and Password of the remoting user (not identical
// with the user to log into the web interface!)
$parameters = array('user' => 'admin',
'pass' => 'admin');


// Login into 42go Server
$session_id = $soap_client->call('login',$parameters);

echo "Session id:".$session_id."<BR>";

// Error Check
if($err = $soap_client->getError()) die("Error: ".$err);

$params = array ( 'sid' => $session_id,
'module' => 'web',
'function' => 'user_list',
'params' => array ( web_id => 'web51' // web_title or web_id
));

$users = $soap_client->call('service',$params);
if($err = $soap_client->getError()) die("Error: ".$err);
print_r($users);

// 42go Server logout
$soap_client->call('logout',array('sid' => $session_id));

// Error Check
if($err = $soap_client->getError()) die("Error: ".$err);

echo "<br>Script end ...";

?>

Cheers,


Ben.
Reply With Quote
Sponsored Links
  #2  
Old 19th January 2009, 13:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

Does the PHP in the webspace where you run the remoting client from has SSL and curl enabled? Otherwise it is not able to connect with https to ispconfig.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
bwaymark (19th January 2009)
  #3  
Old 19th January 2009, 13:38
bwaymark bwaymark is offline
Junior Member
 
Join Date: Feb 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hiya Till:

SSl and cURL are indeed enabled. If I put https://<server address>:81/remote/index.php into a browser I get an XML file in return with a 'no method' error which is what I'd expect if things were working correctly (as I am not passing any params in) but I am not familiar enough with SOAP to be sure.

When I do a php info I get:

curl
cURL support enabled
cURL Information libcurl/7.15.5 OpenSSL/0.9.8c zlib/1.2.3 libidn/0.6.5

openssl
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.8c 05 Sep 2006

When I access the remote/index.php page I get:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Body>

<SOAP-ENV:Fault>
<faultcode>Server</faultcode>
<faultactor>method '' not defined in service ''</faultactor>
<faultstring/>

<detail>
<soapVal xsi:type="xsd:string"/>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

<!--

soap_server: entering parseRequest() on 12:33 2009-01-19
soap_server: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
soap_server: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
soap_server: Accept-Encoding: gzip,deflate
soap_server: Accept-Language: en-us,en;q=0.5
soap_server: Connection: keep-alive
soap_server: Host: <server address>:81
soap_server: Keep-Alive: 300
soap_server: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
soap_server: got encoding: UTF-8
soap_server: method name:
soap_server: method '' not found!
soap_server: parser debug:
soap_parser: xml was empty, didn't parse!

soap_server: server sending...

-->

Any ideas?


Thanks!!!

-Ben.
Reply With Quote
  #4  
Old 19th January 2009, 13:43
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,500 Times in 4,329 Posts
Default

This looks fine so far. maybe you should take a look into the soap.lib.php dile, which contains the nusoap library which is a common soap library if you can enable debugging for the soap connection somewhere.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 19th January 2009, 15:52
bwaymark bwaymark is offline
Junior Member
 
Join Date: Feb 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hum.... looked at the soap.lib.php but it doesn't look like there is any 'turn debugging on' option.

I did try adding the code:

shell_exec("touch /v/web51/bentesting");

into the function login on remove/index.php and it doesn't look like that function is being called.

Any other ideas?

Last edited by bwaymark; 19th January 2009 at 15:55.
Reply With Quote
  #6  
Old 22nd January 2009, 04:50
grandpagenocide grandpagenocide is offline
Senior Member
 
Join Date: Jun 2007
Location: Brooklyn, NY
Posts: 308
Thanks: 13
Thanked 43 Times in 29 Posts
Send a message via AIM to grandpagenocide Send a message via MSN to grandpagenocide
 
Default

did you try any of the other test functions other than user_list? did you try adding a user? I remember someone telling me abotu a bug in the list function, that i havent had a chance to look at.
One other stupid sounding thing to try, add a second remote user, and try using the second remote user, I have had issue in the past where the first user didnt work but a second user did

On a posative note, i hope to have some time soon to rip apart the remote framework again soon and add any new features ispc has added while i have been in lala land.
__________________
Hosting for the Masses
http://rhwebhosting.com

Last edited by grandpagenocide; 22nd January 2009 at 04:52. Reason: cause i thought of something
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
autosignup remoting framework howto detailed kextra1 Tips/Tricks/Mods 21 1st March 2012 06:59
Traffic Quota Problem Remoting Framework 4.2.1 kextra1 Tips/Tricks/Mods 1 7th January 2009 02:38
Remoting Framework dayjahone General 30 4th December 2008 05:55
IspConfig Remoting Framework Installation geoffmerritt Installation/Configuration 1 27th October 2008 08:26
Remoting Framework mlz General 9 18th January 2007 22:52


All times are GMT +2. The time now is 14:07.


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