Cannot set/change open_basedir via remote api

Discussion in 'Installation/Configuration' started by tio289, Jun 26, 2013.

  1. tio289

    tio289 Member

    Hi all,

    I cannot set php open_basedir via remote api. I need create subdomain and change basedir one directory up, but it not work.

    $params = array(
    'server_id' => 1,
    'ip_address' => '*',
    'type' => 'vhostsubdomain',
    'parent_domain_id' => $this->repo->site_id,
    'domain' => $this->branch.'.'.$this->repo->site_domain,
    'web_folder' => $document_root// sub_somebranch/public
    'errordocs' => 0,
    'subdomain' => 'none',
    'suexec' => 'y',
    'php' => 'fast-cgi',
    'active' => 'y',
    'hd_quota' => 1000,
    'traffic_quota' => '-1',
    'allow_override' => 'All',
    'php_open_basedir' => $parent_document_root.DIRECTORY_SEPARATOR.'sub_'.$this->branch// /var/www/clients/client1/web36/sub_somebranch
    'pm_max_children' => 10,
    'pm_start_servers' => 2,
    'pm_min_spare_servers' => 1,
    'pm_max_spare_servers' => 5,
    'pm_process_idle_timeout' => 10,
    'pm_max_requests' => 0,
    $subdomain_id = \Ispconfig\Remote::sites_web_vhost_subdomain_add($this->client_id$params);
    It always generate open_basedir with full path to document root. (/var/www/clients/client1/web36/sub_somebranch/public) :(

    I also try update subdomain via remote api and it was too unsucces.

    When I update open_basedir via control panel, it shows me full path, but in db changes to only parrent domain (/var/www/clients/client1/web36), which solves problem with current subdomain, but I need it fully automatic, users cant go to CP edit basedir whe they publish branch.

    Would somebody help me? Also vhost_subdomain api is undocumented

Share This Page