Update fax_send.php

Fax conversion failed until adding the /tmp as the home directory in this way.
This commit is contained in:
FusionPBX
2016-12-17 12:47:38 -07:00
committed by GitHub
parent 4ae4d63524
commit 587cdefd0a

View File

@@ -360,7 +360,9 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
//convert uploaded file to pdf, if necessary
if ($fax_file_extension != "pdf" && $fax_file_extension != "tif") {
chdir($dir_fax_temp);
exec("libreoffice --headless --convert-to pdf --outdir ".$dir_fax_temp." ".$dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
if ($IS_WINDOWS) { $command = ''; } else { $command = 'export HOME=/tmp && '; }
$command .= 'libreoffice --headless --convert-to pdf --outdir '.$dir_fax_temp.' '.$dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension;
exec($command);
@unlink($dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
}