Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 1st August 2010, 12:26
holykim holykim is offline
Member
 
Join Date: Jan 2009
Posts: 56
Thanks: 17
Thanked 5 Times in 4 Posts
Default

Thanks Till

To set the values in the parameters, can you please tell me how to get the system_user starts with 'web'# ?


The error means that the soap script is unable to connect the the server. You should check the URL that you use in your soap client script and that you do not block the access with a firewall.

The URL is Ok. firewall means 8080 port that ispconfig uses?

Cheers
Harry
Reply With Quote
Sponsored Links
  #12  
Old 1st August 2010, 18:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Quote:
To set the values in the parameters, can you please tell me how to get the system_user starts with 'web'# ?
Yure right, we have to set this in the API function on insert as the remote client can not know the correct value. Please file a bugreport for this so we can try to gtet it patched before the 3.0.3 release.

Quote:
The URL is Ok. firewall means 8080 port that ispconfig uses?
Yes. Try to fetch the URL on the shell e.g. with lynx to see if it works.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #13  
Old 2nd August 2010, 19:55
jmontoya jmontoya is offline
Member
 
Join Date: May 2010
Location: France
Posts: 52
Thanks: 2
Thanked 4 Times in 4 Posts
Default

One question til::

when I use the sites_web_domain_add remoting function

the tform_actions:: onInsert function is not loaded. is this a bug?

What should I do? Create a new function to do the job of the onInsert, or fixing the tform_actions class to load all onInsert, onLoad, onUpdate, etc functions?
__________________
Julio Montoya
BeezNest : http://www.beeznest.com
Blog: http://phpcommit.wordpress.com

Last edited by jmontoya; 2nd August 2010 at 20:09.
Reply With Quote
  #14  
Old 2nd August 2010, 20:02
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

This is a known problem with the remoting functions. The remoting framework is not able to load the event functions at the moment. The ideal solution would be to load the onAfter* Evenet functions also on remoting calls (most of the other events are only useful for interface forms). But I'am not sure if there is a elegant way to do this. If not, then add the missing code to set the user, group and path to the sites_web_domain_add function in the remoting framework file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #15  
Old 2nd August 2010, 20:11
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Just one addition. If it is not possible to load the event functions from the form file into the remoting framework, then there is one other alternative. There is a relatively new plugin based interface which is used currently only for the email filter function which works for the normal API and the remoting API. You find the only event based interface plugin in interface/lib/plugins/ directory. This event based system allows every plugin to bin itself to any event of any form in the interface. So the alternative can be to remove all event based code that has to be executed by the remoting framework as well form the "normal" event based interface forms to such a plugin. The plugins are loaded dynamically when a user logs into the interface, so if you want to test it with anew plugin, relogin to load the plugin.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #16  
Old 2nd August 2010, 23:28
xaver xaver is offline
Member
 
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts
Default

Hi,

i tryed a sites web domain add too.
My problem was always i get the userid from the Root path back after i setup a user.
And i had to update the Rootpath again. I tried a maker like [web_id] but i had no luck.

Right now i build a new Function witch return the next webnumber and add the user.

But maybe a example for adding a web domain would be great.

THX
Reply With Quote
  #17  
Old 3rd August 2010, 10:28
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

We have to add some modifications to the remoting API as explained above to solve this.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #18  
Old 3rd August 2010, 15:45
jmontoya jmontoya is offline
Member
 
Join Date: May 2010
Location: France
Posts: 52
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Ok. I did what you suggest: I create a new plugin like the mail_user_filter_plugin. It works fine, BUT... when I create a site, the ln -s is executed and I have something like this.

www.test36.com -> /var/www/clients/client[client_id]/web[website_id]/

Then the plugin updates the values in the database so I have something like this
/var/www/clients/client45/web40/web.

I know that the id 40 (in this example) is the domain_id so it must be insert first and then update the table. But the ln -s is "faster".
Any suggestions?

PHP Code:
    public function sites_web_domain_add($session_id$client_id$params)    {
                global 
$app;
                if(!
$this->checkPerm($session_id'sites_web_domain_add')) {
                        
$this->server->fault('permission_denied''You do not have the permissions to access this function.');
                        return 
false;
                }
                
$affected_rows =  $this->insertQuery('../sites/form/web_domain.tform.php',$client_id,$params);
                
$app->plugin->raiseEvent('web_domain:web_domain:on_after_insert',$this);
                return 
$affected_rows;
        } 
__________________
Julio Montoya
BeezNest : http://www.beeznest.com
Blog: http://phpcommit.wordpress.com
Reply With Quote
  #19  
Old 3rd August 2010, 16:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

I will see how we can solve that.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #20  
Old 3rd August 2010, 16:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
 
Default

I've submitted a small patch to SVN. Please try if it solves the problem.

The main problem was that in tform_actions, the on_after_update event was rised before the datalog gets written wile we rised the evnt in the remoting frameowrk after the datalog was written. I've changed the remoting file now and added a parameter for the event_identifier to the insertQuery and updateQuery functions, so that the event gets rised now before the datalog got written, so everything that you modify now in the database for the current record gets included into the change for this record befor it gets executes on the server.

Your example above should look now like this:

Code:
$affected_rows =  $this->insertQuery('../sites/form/web_domain.tform.php',$client_id,$params,'sites:web_domain:on_after_insert')
The $app->plugin->raiseEvent line should be removed then.

The event identifier is composed of the module name, the form name and then the event, so it should be:

Code:
sites:web_domain:on_after_insert
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 3rd August 2010 at 16:24.
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
web site creation in ispconfig 3 (vs ispconfig 2) kterz Installation/Configuration 3 5th May 2009 15:38
Adding Server Side Mail Filters for Users to ISPConfig DantePasquale Installation/Configuration 3 24th February 2009 16:09
cannot access ispconfig site Nu2Linux Installation/Configuration 13 3rd January 2009 16:29
IspConfig Remoting Framework Installation geoffmerritt Installation/Configuration 1 27th October 2008 09:26
install successful but no ispconfig site Nu2Linux Installation/Configuration 3 4th November 2005 00:30


All times are GMT +2. The time now is 18:04.


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