#1  
Old 5th July 2007, 00:50
dayjahone dayjahone is offline
Senior Member
 
Join Date: Jan 2007
Posts: 419
Thanks: 31
Thanked 0 Times in 0 Posts
Default Remoting Access - create a user

I installed Remoting Access, created a user, changed the server, user, and password in the test.php file. I uncommented the part to add a user. I uploaded the two php files to the /web directory. When I go to http://mydomain.com/test.php, I get the following error?

Code:
Fatal error: Cannot redeclare class soapclient in /var/www/web1/web/soap.lib.php on line 4101
Eventually, I would like this to be a form that I can just fill out to create a user rather than changing the php file.

This is what I changed:
Code:
include("soap.lib.php");

// Insert here your 42go Server
$server_url = "https://server1.mydomain.com:81";

// creating object for SoapClient
$soapclient = new soapclient($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' => 'remotingAdmin',
                    'pass' =>  'password');

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

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

/*
and this is what I uncommented:
Code:
$params = array (         'sid'        => $session_id,
                                        'module'         => 'web',
                                        'function'         => 'user_add',
                                        'params'        => array ( web_title => 'mydomain.com',  // web_title or web_id
                                        user_username => 'mydomain.com_uwe',
                                        user_name => 'Uwe Meier',
                                        user_email => 'uwe',
                                        user_passwort => 'sagichnicht',
                                        user_speicher => 10,
                                        user_mailquota => 10,
                                        user_admin => 0
                                        ));

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

Last edited by dayjahone; 5th July 2007 at 00:56.
Reply With Quote
Sponsored Links
  #2  
Old 5th July 2007, 03:47
Tommahawk Tommahawk is offline
Member
 
Join Date: May 2007
Posts: 70
Thanks: 0
Thanked 10 Times in 5 Posts
Default

Your PHP is compiled with SOAP into it which conflicts with the Nusoap php soap implentation. Two maybe three options here either

1) recompile PHP without soap using a flag (e.g --disable-soap)
2) rename the functions so they are unique
3) disable SOAP in your php.ini (easy & recommended if possible)


BTW Complete list of PHP configure options
http://aspn.activestate.com/ASPN/doc...configure.html

BTW Take a moment I am selling one of my domains here
HDNOISE.COM
Bid here: http://www.sitepoint.com/marketplace/auction/9993
Reply With Quote
  #3  
Old 5th July 2007, 15:09
dayjahone dayjahone is offline
Senior Member
 
Join Date: Jan 2007
Posts: 419
Thanks: 31
Thanked 0 Times in 0 Posts
Default

I did the perfect setup on Ubuntu, then disabled xml to install remoting access. How do I disable SOAP in php.ini, and why would it not be possible? Thanks.
Reply With Quote
  #4  
Old 6th July 2007, 17:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Quote:
Originally Posted by dayjahone
I did the perfect setup on Ubuntu, then disabled xml to install remoting access. How do I disable SOAP in php.ini
Take a look here: http://www.howtoforge.com/forums/sho...php.ini+ubuntu
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 6th July 2007, 20:22
dayjahone dayjahone is offline
Senior Member
 
Join Date: Jan 2007
Posts: 419
Thanks: 31
Thanked 0 Times in 0 Posts
Default

I went through the thread and did everything that was suggested (I think) and am still getting the error as well. Does anyone know how to disable soap? It seems like this is a normal problem when using remote access with ubuntu.

Here are the results of my php test:
Code:
soap

Soap Client	enabled
Soap Server	enabled

Directive	Local Value	Master Value
soap.wsdl_cache	1	1
soap.wsdl_cache_dir	/tmp	/tmp
soap.wsdl_cache_enabled	1	1
soap.wsdl_cache_limit	5	5
soap.wsdl_cache_ttl	86400	86400
Code:
# php -m
PHP Warning:  Module 'json' already loaded in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
date
dba
dom
exif
filter
ftp
gd
gettext
hash
iconv
imagick
imap
json
libxml
mbstring
mcrypt
memcache
mhash
mime_magic
ming
mysql
mysqli
ncurses
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
posix
ps
pspell
recode
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
SQLite
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]
I don't have the line "extension=php_soap.so" . . .

Code:
~# grep extension /etc/php5/apache2/php.ini
; dynamically loaded extension (either a PHP extension or a Zend extension),
; you may only use these constants *after* the line that loads the extension.
; leading '/'. You must also specify the file extension being used including
; Directory in which the loadable extensions (modules) reside.
; extension_dir = "./"
; If you wish to have an extension loaded automatically, use the following
;   extension=modulename.extension
;   extension=msql.dll
;   extension=msql.so
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.
; Sets the directory name where SOAP extension will put cache files.
extension=imagick.so
extension=imap.so
extension=json.so
extension=mcrypt.so
extension=memcache.so
and
Code:
# ls -la /etc/php5/apache2/conf.dlrwxrwxrwx 1 root root 9 2007-06-29 16:08 /etc/php5/apache2/conf.d -> ../conf.d

Last edited by dayjahone; 6th July 2007 at 20:43.
Reply With Quote
  #6  
Old 7th July 2007, 13:23
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,671
Thanks: 819
Thanked 5,317 Times in 4,170 Posts
Default

If you can not disable soap, then use the soap functions that are compiled in your php version instead of the soap library that comes with the examples.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 9th July 2007, 16:18
dayjahone dayjahone is offline
Senior Member
 
Join Date: Jan 2007
Posts: 419
Thanks: 31
Thanked 0 Times in 0 Posts
Default

I get the following errors if I don't use the soap.lib.php:
Code:
Warning: include(soap.lib.php) [function.include]: failed to open stream: No such file or directory in /var/www/web1/web/test.php on line 12

Warning: include() [function.include]: Failed opening 'soap.lib.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/web1/web/test.php on line 12

Warning: SoapClient::SoapClient(https://server1.mydomain.com:81/remote/index.php) [function.SoapClient-SoapClient]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /var/www/web1/web/test.php on line 18

Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity "https://erver1.mydomain.com:81/remote/index.php" in /var/www/web1/web/test.php on line 18

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://erver1.mydomain.com:81/remote/index.php' in /var/www/web1/web/test.php:18 Stack trace: #0 /var/www/web1/web/test.php(18): SoapClient->SoapClient('https://server1...') #1 {main} thrown in /var/www/web1/web/test.php on line 1
Has anyone gotten remoting access to work on Ubuntu feisty fawn?

Last edited by dayjahone; 10th July 2007 at 18:08.
Reply With Quote
  #8  
Old 10th July 2007, 17:59
dayjahone dayjahone is offline
Senior Member
 
Join Date: Jan 2007
Posts: 419
Thanks: 31
Thanked 0 Times in 0 Posts
 
Default

If anyone is having the same problem, I commented out the soap lines in php.ini and it still didn't work. So I changed all instances of "soapclient" to "soap_client" in both the test.php and soap.lib.php files and tried again (Based on this thread http://howtoforge.com/forums/showthr...=disable+soap) and it worked!

Last edited by dayjahone; 11th July 2007 at 17:14.
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
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Remoting in 2.3.2 does not create user in sys_user table NTAuthority General 0 28th June 2007 20:48
log files cruz Technical 3 15th May 2007 14:35
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
Questions in regards to ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" rbrantley HOWTO-Related Questions 16 10th April 2006 18:26


All times are GMT +2. The time now is 16:36.


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