HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Cannot set/change open_basedir via remote api (http://www.howtoforge.com/forums/showthread.php?t=62377)

tio289 26th June 2013 23:03

Cannot set/change open_basedir via remote api
 
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.

PHP Code:

$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 IspconfigRemote::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


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

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