you also will have to check the rights/permission for Foxit reader.exe. If it is set in such a way that only "system" can execute it then you will not be able to execute it using exec() without making appropriate changes to the permissions.

so, you can see that this is a space problem for the "Program Files" directory.

go to your command prompt, move to c: and type dir /x. it will then list all folder names. before the folder names, you will the folder name without spaces. For example: for my "Program Files" directory it shows PROGRA~1 as the shortened name.see this, when I do dir /x at c:\> i get this:

You need to find the shortened directory name for each of the directory that you are using in your exec(). if you do not see a shortened name, for e.g. above, i don't have a shortened name for 'tmp' folder, then you have to use the available name which is 'tmp'. Go ahead and replace all your folder names (if shortened name is available) in your exec command.

for the examples that I gave, you should be using $output, $retcode and $rawoutput. Only then we can see what is happening.echo '<br>Output is: ';var_dump($output);echo '<br/>';echo 'return code is: ';var_dump($retcode);echo '<br> raw output is: ';var_dump($rawoutput);