views:

446

answers:

2

I wrote a script that compiles LaTeX code through pdftex. The trouble is that pdftex only runs on linux.

I am accomplishing this task with the use of shell_exec().

I don’t really have the ability to set up a linux box as a web server. I have my client computer, but it is behind a firewall that I do not control. I do have control of my work server which is running SBS 2003 with a windows 2000 virtual machine running apache and php. To my knowledge, you can’t install pdftex in windows, and if you could it wouldn’t work with shell_exec().

Is there way to work around this with cygwin? I could install pdftex in cygwin, and then configure php to run shell_exec() commands inside of cygwin. If this is possible, could somebody point me in the right direction?

Also, I wonder if there is another course of action. I wouldn’t mind buying hosting, but any shared hosting plan isn’t going to support the app. It would have to be a virtual or dedicated hosting plan; something I can’t afford.

+2  A: 

pdfTeX runs just fine on Windows, without requiring Cygwin. Try MiKTeX.

ChrisN
Thanks! I had to change the code a small bit, but that was the piece of information I needed.
Hurpe
Excellent. I'm glad it solved your problem.
ChrisN
+1  A: 

For anyone who is wondering about running shell_exec() through cygwin, check out this link to a comment in the php manual:

http://us.php.net/manual/en/function.shell-exec.php#68647

phirschybar