
18th January 2009, 01:00
|
|
Junior Member
|
|
Join Date: Feb 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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.
|

19th January 2009, 13:26
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,883
Thanks: 691
Thanked 4,187 Times in 3,204 Posts
|
|
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.
|
|
The Following User Says Thank You to till For This Useful Post:
|
|

19th January 2009, 13:38
|
|
Junior Member
|
|
Join Date: Feb 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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.
|

19th January 2009, 13:43
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,883
Thanks: 691
Thanked 4,187 Times in 3,204 Posts
|
|
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.
|

19th January 2009, 15:52
|
|
Junior Member
|
|
Join Date: Feb 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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.
|

22nd January 2009, 04:50
|
|
Senior Member
|
|
Join Date: Jun 2007
Location: Brooklyn, NY
Posts: 308
Thanks: 13
Thanked 43 Times in 29 Posts
|
|
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.
Last edited by grandpagenocide; 22nd January 2009 at 04:52.
Reason: cause i thought of something
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 17:20.
|
|
Recent comments
2 days 8 hours ago
2 days 17 hours ago
2 days 19 hours ago
2 days 21 hours ago
2 days 22 hours ago
3 days 14 min ago
3 days 1 hour ago
3 days 2 hours ago
3 days 18 hours ago
3 days 19 hours ago