Page 1 of 1

exec not working

Posted: Sun Apr 03, 2011 5:19 pm
by atrichtch
I know this is a common problem, yet I'm one more beginner experiencing it.
I tried to use open source software to convert Word and PDF uploads to HTML. When invoked from a shell, the program works fine. When I try to invoke it from Firefox, I get it waiting on the command forever. My PHP safe mode is off, and the full control is granted to the System user on the executable. I also set my firewall exception, to no result. My code is below; those three lines shouldn't be an issue.

Code: Select all

<?php
      $command='convertdoc /S resume_sd.doc /T resume_new.html /M2 /C2 /F9';
      echo $command;
      echo exec($command);
?>
Is it just another open source software reliability issue, or should I change something in the code?
Thanks.

Re: exec not working

Posted: Sun Apr 03, 2011 8:24 pm
by klandaika
you should specify full path to the program and the documents. Using relative pathts often leads to complications.

If you get any errors in your error log, posting them would be useful. If not make sure you are loggin all errors including E_NOTICE

Re: exec not working

Posted: Sun Apr 17, 2011 7:28 pm
by atrichtch
Just in case anybody else has this problem:
If you are using Apache Server, go to your C:\Windows\system32\services.msc file and right-click on Apache. In the properties menu, check the "Allow interaction with desktop" checkbox. This should resolve it.