PDA

View Full Version : Error runing fmencoder



matty
08-Dec-2004, 06:48 PM
Hi,

I am getting this error when submitting the form configured to use the encoder:

The form has an internal error - cannot execute filter 'd:/inetpub/cgi-bin/fmencoder -kcert.txt > D:/Temp/FMF1D2820 2>&1'


I'm running this on a Windows 2000 server with IIS5. I can confirm that the cgi-bin has execute permission set, and that the Temp folder is writable. Any ideas what the problem is?

Thanks

Marcus

russellr
08-Dec-2004, 10:13 PM
Hi,

We've just found a bug that might happen on Windows servers.

First, please upgrade to version 4.10 of FormMail, using the Upgrade Wizard here: http://www.tectite.com/wizards/fmupg.php

If that doesn't resolve the problem, you should get an alert message from FormMail with more information. In particular, the actual reason why it couldn't execute the command.

Also check your PHP config with this script:


<?php phpinfo(); ?>


Look for "disable_functions" and tell me its value.

matty
08-Dec-2004, 10:37 PM
The alert message is:

filter_not_found

The disable_functions value is "no value"

I'll try the upgrade as soon as I can,

Thanks.

russellr
08-Dec-2004, 10:46 PM
Hi,



The disable_functions value is "no value"

That's GOOD news. :D

Is there any error message after a bunch of '***********'?

An internal error message is shown there which will help diagnose the problem. If there isn't an error message there, then it's probably the bug I mentioned, which should fix after the upgrade.

matty
08-Dec-2004, 11:08 PM
Hi,

The error after the *********** is as below. I've just noticed that this gives the incorrect location of the temporary folder, which I've actually defined as D:/Temp/ (as you can see this in the orginal web page error I posted).

Error=The form has an internal error - cannot execute filter 'D:inetpub/cgi-bin/fmencoder -konlineorders-pub.txt > C:\WINNT\TEMP\FMF9A.tmp 2>&1'

russellr
08-Dec-2004, 11:20 PM
Hi,

The missing "/" after the D: is a worry too.

FormMail asks the system for a temporary file. Some servers aren't configured correctly and give the wrong value.

You can force FormMail to use your temporary directory by setting the $SCRATCH_PAD configuration. It's around line 1840.

But, this probably will not work on Windows servers.

If you can create a temporary directory where Windows is saying it wants it (C:\WINNT\TEMP), then that should work.

Otherwise, you'll need to use $SCRATCH_PAD and we'll need to provide a fix for you for Windows.

matty
08-Dec-2004, 11:33 PM
Hi,

Yes, I have already defined the $scratch_pad to D:\Temp. Sorry, but just realised that I sent you an earlier alert message before I configured $scratch_pad and correct the error of the missing "/". It's late here and I'm doing this from home thus the confusion!

So the actually current error is:

Error=The form has an internal error - cannot execute filter 'd:/inetpub/cgi-bin/fmencoder.exe -konlineorders.txt > D:/Temp/FMFA14EE0 2>&1'

russellr
08-Dec-2004, 11:58 PM
Hi,

Yes, the "D:/Temp/FMFA14EE0" is the problem - the / need to be \ on Windows.

We'll need to provide that fix for you if you want to use $SCRATCH_PAD. If you're happy to use the temp directory supplied by Windows, then it won't be a problem because Windows will put the right slashes in.

The / in "'d:/inetpub/cgi-bin/fmencoder" may also be a problem on Windows. However, you can resolve those in the $FILTERS setting, like this (you need a double \\ to translate to a single \):



$FILTERS = "d:\\inetpub\\cgi-bin\\fmencoder ...";

matty
09-Dec-2004, 12:12 AM
I'll try various alternatives tomorrow and see if I can resolve the problem. Will let you know!

russellr
09-Dec-2004, 02:03 AM
Hi,

OK. Forget most of what I've said previously.

We've done some extensive testing on Windows and / will work!

This doesn't work on Windows 98 but does on Windows 2000 (and probably XP, 2003, etc.)

So, you can define your filters like this:



$FILTERS = "d:/inetpub/cgi-bin/fmencoder ...";


and you can define your temp directory like this:



$SCRATCH_PAD = "d:/temp";


Provided the paths are correct, this should all work.

Make sure you've uploaded the correct FMEncoder program (not a linux version, but the windows version)

If you drop into a CMD prompt you can type this to prove it:


c:\>d:/inetpub/cgi-bin/fmencoder


You'll get a sensible usage message from fmencoder. If you get an error message, then you'll know what's wrong.

matty
09-Dec-2004, 01:58 PM
Hi,


Thanks, but I am still having problems. I have upgrade to 4.10. Details of the configuration are below:

$SCRATCH_PAD = "d:/Temp";
$FILTERS = array("encode"=>"d:/inetpub/cgi-bin/fmencoder -kcert.txt");

This is the wrror message I am getting back:

filter_not_found
**********
Error=The form has an internal error - cannot execute filter 'd:/inetpub/cgi-bin/fmencoder -kcert.txt > d:/Temp/FMFF2C6A2 2>&1'

I have tested running fmencoder from the cmd prompt and it returns normal option information, not an error message.

Any more ideas?

Thanks

russellr
09-Dec-2004, 10:19 PM
Hi,

To make progress I'll need to do some tests on your server.

You can be the "middle man" or I can do them directly (which will be faster).

If you're happy for me to upload some test files and run them, pls send me an FTP username and password and I'll look at it ASAP. I'll also need the URL for your site.

Please send me the details via our secure contact form here:
https://secure.rootsoftware.com/~tectite/sendsecret.php

matty
09-Dec-2004, 11:55 PM
Hi,

Unfortunately ftp is blocked at our firewall so I'm going to have to act as middle man. If you could send me details of as many of the tests as possible then I can get these done tomorrow (Friday here) - because of the time difference I only get an hour or so to correspond with you before it's time to sleep!


Thanks again for your help.

russellr
10-Dec-2004, 12:09 AM
Hi,

OK, but each test has to be devised from the results of the previous test. So, it's going to take some to-and-fro.

The first test is attached. Pls upload this to your server and open it with a browser. Send me the results or the URL so I can run it myself.

matty
10-Dec-2004, 12:24 AM
Hi,

Here is the error message:

Warning: popen("d:/inetpub/cgi-bin/fmencoder 2>&1", "r") - Permission denied in D:\inetpub\CPI\run.php on line 4

Execute d:/inetpub/cgi-bin/fmencoder 2>&1 failed: popen("d:/inetpub/cgi-bin/fmencoder 2>&1", "r") - Permission denied

russellr
10-Dec-2004, 12:26 AM
Hi,

OK. This is telling us that either you don't have access to one of the directories in the path or you don't have execute permission on fmencoder.exe.

Pls investigate the permissions on the server and run the test again.

russellr
10-Dec-2004, 12:27 AM
Hi,

To clarify - it's the web server (IIS) that doesn't seem to have permission.

On UNIX you would make the directories and program world-executable.

There should be something similar on Windows.

matty
10-Dec-2004, 12:37 AM
Thanks,

I've checked and I do have NTFS permissions set to everybody execute, and the cgi-bin in IIS is set to allow both execution of scripts and executables, so there is something strange going on here ...

russellr
10-Dec-2004, 12:53 AM
Hi,

OK, that is strange.

As you can see the test script is short and simple. So, you can use it to test each change you make on your permissions.

I've attached another script which just does a directory listing of the program. This may help diagnose the problem since the script runs with the permissions of IIS.

matty
10-Dec-2004, 07:25 PM
Hi,


I have resolved this. IIS Lockdown was previously run on this machine, and this had denied the IUSR account any access to cmd.exe.

Thanks for your help.

Marcus

russellr
10-Dec-2004, 09:39 PM
Hi,

I'm glad you figured it out. :)