@@ -640,7 +640,6 @@ function update($event_name,$data) {
640640 $ vhost_data ['web_basedir ' ] = $ web_config ['website_basedir ' ];
641641 $ vhost_data ['security_level ' ] = $ web_config ['security_level ' ];
642642 $ vhost_data ['allow_override ' ] = ($ data ['new ' ]['allow_override ' ] == '' )?'All ' :$ data ['new ' ]['allow_override ' ];
643- //$vhost_data['php_open_basedir'] = ($data['new']['php_open_basedir'] == '')?$data['new']['document_root']:$data['new']['php_open_basedir'];
644643 $ vhost_data ['ssl_domain ' ] = $ data ['new ' ]['ssl_domain ' ];
645644 //$vhost_data['has_custom_php_ini'] = $has_custom_php_ini;
646645 //$vhost_data['custom_php_ini_dir'] = escapeshellcmd($custom_php_ini_dir);
@@ -1082,6 +1081,13 @@ private function php_fpm_pool_update ($data,$web_config) {
10821081 $ tpl ->setVar ('fpm_port ' , $ web_config ['php_fpm_start_port ' ] + $ data ['new ' ]['domain_id ' ]);
10831082 $ tpl ->setVar ('fpm_user ' , $ data ['new ' ]['system_user ' ]);
10841083 $ tpl ->setVar ('fpm_group ' , $ data ['new ' ]['system_group ' ]);
1084+ $ php_open_basedir = ($ data ['new ' ]['php_open_basedir ' ] == '' )?$ data ['new ' ]['document_root ' ]:$ data ['new ' ]['php_open_basedir ' ];
1085+ $ tpl ->setVar ('php_open_basedir ' , $ php_open_basedir );
1086+ if ($ php_open_basedir != '' ){
1087+ $ tpl ->setVar ('enable_php_open_basedir ' , '' );
1088+ } else {
1089+ $ tpl ->setVar ('enable_php_open_basedir ' , '; ' );
1090+ }
10851091
10861092 file_put_contents ($ pool_dir .'/ ' .$ data ['new ' ]['domain ' ].'.conf ' ,$ tpl ->grab ());
10871093 $ app ->log ('Writing the PHP-FPM config file: ' .$ pool_dir .'/ ' .$ data ['new ' ]['domain ' ].'.conf ' ,LOGLEVEL_DEBUG );
0 commit comments