I've spent all day trying to get this to work, and I imagine it's just a simple thing I'm missing repeatedly.
The goal is to run this on my Windows XAMPP install:
- Code: Select all
exec('pdftk docstorage/activedocs/documentsId_13_CERT-1001_0.pdf fill_form C:\xampp\htdocs\AllPure\fdf59DE.tmp output docstorage/staticdocs/CofCs/inbox/OrderDetailId_0.pdf flatten');
Doing so generates this error in the Apache log: "'pdftk' is not recognized as an internal or external command,
operable program or batch file."
So then I looked at the path by displaying phpinfo():
- Code: Select all
C:\Program Files (x86)\CollabNet\Subversion Server;C:\Windows\system32;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Palm\PDK\bin;C:\Program Files (x86)\Palm\SDK\bin;C:\Program Files (x86)\Palm\SDK\bin\novacom
Since pdftk.exe is in the System32 folder, it looks like this should be picking it up, though it doesn't appear to be able to see it.
So then I tried this:
- Code: Select all
exec("C:\\Windows\\System32\\mspaint.exe",$output, $return);
But the browser just hangs indefinitely, and yet doesn't produce any error messages in either the PHP or Apache logs.
I'm seriously out of ideas, which is quite depressing. I'd like to also mention that the pdftk command works flawlessly in my ubuntu XAMPP install. If any of you could shed some light on things to try, or what I might be missing, I'd greatly appreciate it.
John