Page 1 of 1

Brain-block -- permissions...

Posted: Sun Aug 24, 2003 8:26 pm
by nielsene
OK I'm feeling very stumped and would appreciate it if anyone has any suggestions.

I have a (currently) command-line php script, once I get it to work I'll convert it to a web script. The script uses information from my database to produce a LaTeX file that is converted using pdflatex to a PDF file containing invoice information and membership application forms.

The source LaTeX file is properly created and no errors are generated by the

Code: Select all

$safeFile = escapeshellarg($path)
exec("pdflatex $safeFile");
series of commands. However, the pdf file is not generated. I've expanded the permissions from 600 to 777 and its still not happy.

I've echo'd $safeFile and it shows the correct path.

I've used a similar script in a different directory and its worked. I've been working on this for several hours and I'm out of ideas. Can anyone offer some thoughts to help unstick my brain?

Posted: Sun Aug 24, 2003 8:43 pm
by Stoker
try using /full/path/to/pdflatex
env may not have common paths set

Posted: Sun Aug 24, 2003 9:52 pm
by nielsene
Thanks, turns out it was working, but was sticking the outputs the "wrong" place. I had forgetten to use chdir before running pdflatex so it stuck the resulting files in the current working directory and not in the same directory as the source (where I expected it).