我使用ispconfig的遠程API來創建ispconfig用戶,一個網站和一個ftp用戶,並且一切正常,它會創建ispconfig用戶,網站和ftp用戶,我可以通過ISPConfig和FTP訪問它們,並且該網站也可以正常工作,但即使我已經在params上激活了PHP,它也不會啓用PHP。ISPConfig SOAP遠程API使用PHP添加web域
這是必要的代碼:
$domain = 'domain.example.com';
$params = array(
'domain' => $domain,
'ip_address' => '',
'type' => 'vhost',
'parent_domain_id' => 0,
'vhost_type' => '',
'hd_quota' => 100,
'traffic_quota' => 4000,
'cgi' => 'n',
'ssi' => 'n',
'suexec' => 'n',
'errordocs' => 1,
'is_subdomainwww' => 1,
'subdomain' => '',
'php' => 'y', /* This is activated but it does nothing*/
'ruby' => 'y', /*This is also activated and works*/
'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' => '/',
'custom_php_ini' => '',
'backup_interval' => '',
'backup_copies' => 1,
'active' => 'y',
'traffic_quota_lock' => 'n'
);
我不認爲我需要寫在「custom_php_ini」什麼,我是不是正確的?
我有一個類使用ispconfig,並創建網站的方法是:
public function addWebSite($clientid, $params) {
$params['server_id'] = $this->server_id;
utf8_encode_array($params,'utf8_decode_array');
try {
return $this->soapClient->sites_web_domain_add($this->session_id, $clientid, $params, $readonly = false);
} catch (SoapFault $e) {
throw new IspcfgException($e->getMessage(), 500);
}
}
在創建ispconfig用戶的我也把PARAM'web_php_options' =>‘國防部’,但它不起作用...
任何人都可以幫助我嗎?提前感謝您的幫助!
我認爲有一個參數,我不知道指示PHP引擎,但我沒有找到正確的文檔。