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.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 24th October 2011, 20:11
dgmufasa dgmufasa is offline
Member
 
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post
Default ISPConfig 3.0.3.3 Bug or feature :-)

Hello all,

I am using the ISPConfig API (with PHP). I was able to run it pretty well until I had hit this issue.

I am getting the following error when trying to add web domain to the system: session_does_not_existThe Session is expired or does not exist.

Below are the code and inputs.

Does anyone out there know why this is taking place or what one can do to troubleshoot it further?

TIA


The output

Logged successfull. Session ID:b375a638d8c5bc20baee88750c6711a1

Session ID set is: b375a638d8c5bc20baee88750c6711a1

The items passed in
Array ( [server_id] => 1 [ip_address] => * [domain] => foofoo.com [type] => vhost [parent_domain_id] => 0 [vhost_type] => name [document_root] => /var/www/clients/client41/web123 [system_user] => web123 [system_group] => client41 [hd_quota] => 100000 [traffic_quota] => -1 [cgi] => y [ssi] => y [suexec] => y [errordocs] => 1 [is_subdomainwww] => 1 [subdomain] => www [php] => fast-cgi [ruby] => n [redirect_type] => [redirect_path] => [ssl] => n [ssl_state] => [ssl_locality] => [ssl_organisation] => [ssl_organisation_unit] => [ssl_country] => [ssl_domain] => [ssl_request] => [ssl_cert] => [ssl_bundle] => [ssl_action] => [stats_password] => [stats_type] => webalizer [allow_override] => All [apache_directives] => [php_open_basedir] => /var/www/clients/client41/web123/web:/var/www/clients/client41/web123/tmp:/var/www/stashandcarry.com/web:/srv/www/stashandcarry.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin [custom_php_ini] => [backup_interval] => none [backup_copies] => 1 [active] => y [traffic_quota_lock] => n )


PHP Code:
    public function __siteaddwebdomain$inrecserverid$inrecclientid$indomainid$inwebsiteid
    
$inlinuxuser$webrootdir$injoomlaid$indomname ){
        try {
            
$affected_rows = -999999;
            
            if  ( !( 
$inrecclientid and $inrecclientid 9999 ) ) {
                die(
"=> ERROR: Invalid client id: $inrecclientid was passed into function. Check the system");
            }
            
            
$wlinuxgroup     "client" $inrecclientid;            
            
$wlinuxuser      "web" $injoomlaid;
            
$wsetroot         $webrootdir "/" $wlinuxgroup "/" $wlinuxuser;
            
            
            echo 
"=> Linux Group: $wlinuxgroup  Linux User: $wlinuxuser will be created <br />";
            
            if(
$session_id $this -> ispclient->login($this -> ispcusername,
            
$this -> ispcpassword)) {
                echo 
'<br />Logged successfull. Session ID:'.$session_id.'<br />';
            }

            
$params = array(
            
'server_id'         => $inrecserverid,
            
'ip_address'         => '*',
            
'domain'             => $indomname,
            
'type'                 => 'vhost',
        
    
'parent_domain_id'     => 0,
            
'vhost_type'         => 'name',
            
'document_root'     => $wsetroot,
            
'system_user'         => $wlinuxuser,
        
    
'system_group'         => $wlinuxgroup,
            
'hd_quota'             => 100000,
            
'traffic_quota'     => -1,
            
'cgi'                 => 'y',
            
'ssi'                 => 'y',
            
'suexec'             => 'y',
            
'errordocs'         => 1,
            
'is_subdomainwww'     => 1,
            
'subdomain'         => 'www',
            
'php'                 => 'fast-cgi',
            
'ruby'                 => 'n',
            
'redirect_type'     => '',
            
'redirect_path'     => '',
            
'ssl'                 => 'n',
            
'ssl_state'         => '',
            
'ssl_locality'         => '',
            
'ssl_organisation'         => '',
            
'ssl_organisation_unit' => '',
            
'ssl_country'         => '',
            
'ssl_domain'         => '',
            
'ssl_request'         => '',
            
'ssl_cert'             => '',
            
'ssl_bundle'         => '',
            
'ssl_action'         => '',
            
'stats_password'     => '',
            
'stats_type'         => 'webalizer',
            
'allow_override'     => 'All',
            
'apache_directives' => '',
            
'php_open_basedir'     => "/var/www/clients/$wlinuxgroup/$wlinuxuser/web:/var/www/clients/$wlinuxgroup/$wlinuxuser/tmp:/var/www/stashandcarry.com/web:/srv/www/stashandcarry.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin",
            
'custom_php_ini'     => '',
            
'backup_interval'     => 'none',
            
'backup_copies'     => 1,
            
'active'             => 'y',
            
'traffic_quota_lock' => 'n'
            
);
                
            
$readonly false;
            
            echo 
"<br /> Session ID set is: $session_id <br />";
            echo 
"<br /> The items passed in <br /> ";
            
print_r($params);
            
            
$affected_rows $this -> ispclient -> sites_web_domain_add($inrecserverid$inrecclientid
            
$params$readonly);

            echo 
"Web Domain ID: ".$affected_rows."<br>";

            if(
$this -> ispclient ->logout($session_id)) {
                echo 
'Logged out.<br />';
            }
            
        } catch (
SoapFault $e) {
            echo 
$this -> ispclient ->__getLastResponse();
            die(
'SOAP Error ADD WEB DOMAIN: '.$e->getMessage());
        }
        
        return 
$affected_rows;
    } 
Reply With Quote
Sponsored Links
 

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
Version 1.3 of the ISPConfig 3 Manual is finally available! falko General 44 2nd December 2011 13:04
PHP warnings after upgrade to ISP config 3.03 stevegjacobs Installation/Configuration 5 30th October 2010 15:31
ISPconfig 3: can't send or receive messages zogthegreat Installation/Configuration 6 22nd May 2010 15:45
Hosting multiple websites and webmail dmwcool Installation/Configuration 8 30th March 2010 04:15
ISPConfig 3.0.0.9 RC2 released till General 51 17th April 2009 18:12


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


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