Update switch.php (#6785)
Running install.php the first time after a manual (not using script) install on Debian 11, there is a failure due to $_SESSION['switch']['conf']['dir'] not yet existing. Subsequent installs will work. It's only on the first install that it fails. There may be better ways but this is the fix I came up with that works for me.
This commit is contained in:
parent
254d58f614
commit
3b617cb35c
|
|
@ -942,7 +942,8 @@ if (!function_exists('xml_cdr_conf_xml')) {
|
||||||
unset ($v_pass);
|
unset ($v_pass);
|
||||||
|
|
||||||
//write the XML config file
|
//write the XML config file
|
||||||
$fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/xml_cdr.conf.xml","w");
|
$switch_configuration_dir = !empty($_SESSION['switch']['conf']['dir']) ? $_SESSION['switch']['conf']['dir'] : '/etc/freeswitch';
|
||||||
|
$fout = fopen($switch_configuration_dir . "/autoload_configs/xml_cdr.conf.xml","w");
|
||||||
fwrite($fout, $file_contents);
|
fwrite($fout, $file_contents);
|
||||||
fclose($fout);
|
fclose($fout);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue