Brain-block -- permissions...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Brain-block -- permissions...

Post 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?
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

try using /full/path/to/pdflatex
env may not have common paths set
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post 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).
Post Reply