Hi Falko and Folks, great program ISPConfig, but another little problem: when I define a new site I add the following apache directives: php_admin_value open_basedir '/var/www/prova2 mysite.it/web:/tmp:/var/www/typo3_src' all is OK, but when I switch to PHP_SAFE to ON, the file: /etc/apache2/vhosts/Vhosts_ispconfig.conf ignore my directives because the order is wrong, my directives are BEFORE the directives inserted automatically through the option PHP_SAVE setted. This is the output: <VirtualHost XXX.XXX.XXX.XXX:80> php_admin_value open_basedir '/var/www/prova2.mysite.it/web:/tmp:/var/www/typo3_src' (... skipped...) php_admin_flag safe_mode On php_admin_value open_basedir /var/www/web1/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web1/phptmp/ php_admin_value session.save_path /var/www/web1/phptmp/ this is very *annoying* because safe_mode On option is set AFTER my directives, so that: 1. if I configure php.ini adding in it : php_admin_value open_basedir '/var/www/prova2.mysite.it/web:/tmp:/var/www/typo3_src' doesn't work because Vhosts file config override it 2. if I put my directives these will be overriden and has not effect The only way is to change manually the Vhosts config file but this is a mad idea..... My suggestion is to add an option so that I can decide the order (after or before the other directives automatically inserted) or this is a bug?!? Thanx
Just add these lines to the apche directives field too and leave safemode disabled: php_admin_flag safe_mode On php_admin_value open_basedir /var/www/web1/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web1/phptmp/ php_admin_value session.save_path /var/www/web1/phptmp/
doesn't work... (!) now the problem is inverse... these are the lines... inserted BEFORE php_admin_flag safe_mode On php_admin_value open_basedir '/var/www/web1/web:/tmp:/var/www/typo3_src' php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web1/phptmp/ php_admin_value session.save_path /var/www/web1/phptmp/ <skip lines...> but AFTER ISPconfig puts: php_admin_flag safe_mode Off ......................................... in this way happens that the LAST command (after my lines) disable safe_mode setting it to OFF!!! PATCH: may be the solution stays in: edit the config.lib.php and remove the directive safe_mod Off, so that ISPConfig doesn't do anything and the settings referrs to /etc/php4/apache2/php.ini settings?!? thank you... ***** I GOT NO ANSWER SO I PATCHED AS FOLLOWS *** 1. edit /root/ispconfig/scripts/lib/config.lib.php 2. look for this lines and comment the last: if($web["web_php_safe_mode"]){ $php .= "\nphp_admin_flag safe_mode On php_admin_value open_basedir ".$mod->system->server_conf["server_path_httpd_root "]."/"."web".$web["doc_id"]."/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir ".$mod->system->server_conf["server_path_httpd_ro ot"]."/"."web".$web["doc_id"]."/phptmp/ php_admin_value session.save_path ".$mod->system->server_conf["server_path_httpd _root"]."/"."web".$web["doc_id"]."/phptmp/"; } else { //$php .= "\nphp_admin_flag safe_mode Off"; } so that you disable the writing 'php_amin_flage safe_mode Off' into the file: /etc/apache2/vhosts/Vhosts_ispconfig.conf then edit your php.ini file: /etc/php4/apache2/php.ini ed leave the flag safe_mode = off In this way, when you turn off via web the conf for your site php will use the default options read from php.ini. Don't forget to put in safe_mode On your site and for the others disable safe_mode via web and add the directives you need as described above. Bye