I am writing a script to fill out a PDF form. I'm using WAMP (Apache Version : 2.4.9, PHP Version : 5.5.12). I'm using a tool called pdftk v 1.44-win to fill in the PDF form. I am running Windows 8. I am using the exec command to run pdftk. I can run the command exactly as shown from the command line but it doesn't execute correctly from php. Since my initial return value is getting overwritten something is happening, but pdftk should return a numeric code, instead I'm getting nothing. I have verified that the SYSTEM process owns the files and has full control of the c:\wamp\www\bizcards directory.
I still think it may be a permissions problem. I originally wrote the portion of the script that mails the completed card on a different machine. When I try to load PHPMailer I get the following error on the new machine:
php): failed to open stream: Permission denied in C:\wamp\www\bizcards\getbi
zcard.php on line 69
The test code and output follow.
echo "Running as user: ";
$filename = 'getbizcard.php';
$retval = 0;
echo "<br>Initial return value: ";
$retval = exec("C:/Program Files (x86)/PDFtk/bin/pdftk bizcard.pdf fill_form c:/wamp/www/bizcards/bizcard_data.fdf output c:/wamp/www/bizcards/bizcard_data.fdf/mycard.pdf");
echo "<br>Final return value: ";
Running as user: nt authority\system
Initial return value: 0
Final return value: ******
Thanks in advance