View Single Post
  #37  
Old 23rd April 2009, 04:13
lubos lubos is offline
Member
 
Join Date: Oct 2007
Location: Belfast, UK - NI
Posts: 59
Thanks: 29
Thanked 17 Times in 13 Posts
Unhappy Remote script not working

Sorry, I did not check here for a while. I will check now regularly until it will be resolved. Thank you upfront for your help.

Quote:
Originally Posted by grandpagenocide View Post
Lubos,
2 questions
1. did you successfully install the remote framework?
2. did you install libxml2?
I successfuly installed remote framework
I have libxml2 installed on server and I have curl on PHP

I changed server in autosign.php and in auto.php (I am not sure if there should be both files or just one of them, I put on the web in the folder where is AddWebsite file both of them and soap.lib as well.)

Quote:
Originally Posted by falko View Post
Can you post the file here?
Bellow is file for adding website, only part for adding website is uncommented.
I changed username and password to my settings plus a) changed IP for server where is ISPconfig installed and b) changed server to use URL instead of IP - none version worked.

You can find resulted screen with error here: AddWebsite
Thanks upfront for your help

One Q - do I have to insert some code to create tables or something?


Info about file: I tried to upload here full length but it won't let me. so I deleted here all other entries which are in my file on server but are commented out with
//*
*//

Code:
<?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://mine.IP.inser.ted: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' => 'my-user-name-for-remote',
                    'pass' =>  'remote-user-password');

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

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

//*other parts are here
*//


// Adding a Web
$params = array (         'sid'        => $session_id,
                                        'module'         => 'web',
                                        'function'         => 'web_add',
                                        'params'        => array (         kunde_title => 'Kunde6', // reseller_title or reseller_group
                                web_title => 'test7.de',
                                web_host => 'www',
                                web_domain => 'test7.de',
                                web_ip => '192.168.0.110',
                                web_speicher => '100', // MB
                                web_dns => 0,
                                web_userlimit => 5,
                                web_domainlimit => 2,
                                web_shell => 0,
                                web_cgi => 1,
                                web_standard_cgi => 1,
                                web_php => 1,
                                web_php_safe_mode => 1,
                      web_ruby    => 1,
                      web_python    => 1,
                                web_ssi => 1,
                                web_ftp => 1,
                                web_frontpage => 0,
                                web_mysql => 1,
                                web_mysql_anzahl_dbs => 5,
                                web_ssl => 0,
                                web_anonftp => 0,
                                web_anonftplimit => 0,
                                web_wap => 1,
                      web_cron    => 1,
                                web_individual_error_pages => 1
                                ));

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

//* again other parts are here
*//

// 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 ...";



?>
One more Q: I have server on domain.net and script on domain.com can that be a problem? Does the script require to be on the same domain as the server is? If yes, server has name.server.net, can the script be on www.server.net or it has to be on name.server.net?

Update: I tried the file on https://host.server.net:81/remote/myfile.php and got an error:

Code:
Error: CURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS
But: when I do
Code:
apt-get install curl libcurl3 php5-curl
(I don't know exact command so I tried all what i found on the web
I get response that they are already newest version.
__________________
Safe computer? Only when unplugged.

Last edited by lubos; 23rd April 2009 at 05:18. Reason: add more info and Q
Reply With Quote