I have a PHP file that creates a pdf fill form and uses pdftk
to merge the data into the template.
I am having trouble getting php to execute the batch file in order to run the program and merge it.
$current = '\\oma-entfs-002\aps\wwwroot\tuition\uploads\';
My PHP code:
$WshShell = new COM("WScript.Shell");
$WshShell->exec($current.'makePDF.bat ' .$fdf_file.' '.$newPDF);
The Batch File:
pushd \\oma-entfs-004\APS\wwwroot\tuition
pdftk uploads/Educational_Assistance_Request_Form_North_America.pdf fill_form uploads/%1 output uploads/%2 need_appearances
popd
Both COM
and Exec
are enabled on the server as far as I can tell.
When I run the batch file from command line, it works just fine so I think there is something with PHP not running the file correctly.
Any suggestions on the best way to debug this and identify the root cause?