Generating the tex file is working beautifully - the resulting /tmp/mytempname.tex file can by run from the command line, while in the /tmp directory, with "uplatex mytempfile" and the appropriate aux, div, and log files all appear.
But with my PHP code:
Code: Select all
exec("cd /tmp;uplatex -interaction=nonstopmode --output-directory=/tmp /tmp/mytempname", $output, $return);
if (!is_file("/tmp/mytempname.dvi")) {
die("Error processing '/tmp/mytempname.tex':<br /><br /><pre>".print_r($output,TRUE)."</pre>");
}
The tex file is okay - from the command line, while in the /tmp directory, I can run "uplatex mytempfile" and get a dvi file with no errors.
The /tmp directory's permissions are "drwxrwxrwt" (sticky bit set) - the code is able to create the tex file, so presumably there should be no problems creating the dvi files and such. I also tried including 'exec("cd /tmp;touch test.txt");' in my code, and that works fine.
I don't expect you to debug my PHP code - I know this is a LaTeX forum. But should I use different command line options for uplatex (don't worry about the "up" part - the options should be the same as for latex) to get some sort of error output or visibility?