PDA

View Full Version : fmencoder error



Chrisanna
10-May-2005, 12:36 PM
Okay wrote in a previous post about a problem with the tmp file, you advised I could use scratch pad and that worked fine. I also upgraded to the latest version of formmail which you said I would need if using the encoder/decoder software.

Here's the error message I receive when trying to use the previously working form with the new configuration for using fmencoder.

The following error occurred in FormMail [M18]:

filter_failed

**********

Error=Filter "encode" failed (status 127): [M61]



(User data suppressed for security purposes. [M19])


Any ideas?

Chrisanna
10-May-2005, 12:38 PM
Ooops.. not sure this would have anything to do with it or not, but thought I'd mention.

I couldn't get formmail to work inside my cgi-bin directory but it worked fine in the main www directory. fmencoder is currently inside my cgi-bin directory as that's where it stated in the instructions to upload it to.

russellr
10-May-2005, 12:40 PM
Hi,

This indicates the filter failed; the usual cause is an error in installation.

If you have SSH or Telnet access to your server, you can check that it's working by executing the program.

Otherwise, try opening with a browser: http://yoursite/cgi-bin/fmencoder

If you receive "GET method not implemented", then it's installed and working.

Finally, did you get an alert message with the detail reason for the filter failure?

Chrisanna
10-May-2005, 12:46 PM
Okay I ran it in my browser and it said this:

GET method not yet implemented

The message I pasted previous was the only error messasge I received....The following error occurred in FormMail [M18]:

filter_failed

**********

Error=Filter "encode" failed (status 127): [M61]



(User data suppressed for security purposes. [M19])

russellr
10-May-2005, 12:46 PM
Hi,



I couldn't get formmail to work inside my cgi-bin directory but it worked fine in the main www directory. fmencoder is currently inside my cgi-bin directory as that's where it stated in the instructions to upload it to.

That might cause it. It depends on whether you've setup the correct path to "fmencoder" in the $FILTERS setting in FormMail.

If that has the right path, then FormMail should be able to run the program wherever you've put it.

Chrisanna
10-May-2005, 12:50 PM
Hi,


That might cause it. It depends on whether you've setup the correct path to "fmencoder" in the $FILTERS setting in FormMail.

If that has the right path, then FormMail should be able to run the program wherever you've put it.
I have it coded like this
$FILTERS = array("encode"=>"/home/crittergitter/www/cgi-bin/fmencoder -k/home/crittergitter/www/cgi-bin/crittergitter-pub.txt");

russellr
10-May-2005, 12:51 PM
Hi,


Okay I ran it in my browser and it said this:

GET method not yet implemented

That's good!

It means you've installed the right binary onto the server and it can be executed OK by the webserver software.

So, I think you're just down to getting the path set correctly in $FILTERS.

Chrisanna
10-May-2005, 01:00 PM
Sound good.

Okay here's what I know. According to my hosting company the path is like this:

/home/crittergitter/www (www being the folder for html docs etc)


However when I ran phpinfo.php it has info like this

PATH = /usr/local/bin:/usr/bin:/bin

DOCUMENT_ROOT = /www/crittergitter


So I'm confused as to which to use as the path

russellr
10-May-2005, 01:00 PM
Hi,



I have it coded like this
$FILTERS = array("encode"=>"/home/crittergitter/www/cgi-bin/fmencoder -k/home/crittergitter/www/cgi-bin/crittergitter-pub.txt");

I think you have that right.

What's happening is that running the fmencoder command is failing but producing no useful error messages.

This might be a strange problem with the server.

You might need me to diagnose the problem directly on your server to find a workaround.

Would you like me to do that?

russellr
10-May-2005, 01:05 PM
Hi,



Okay here's what I know. According to my hosting company the path is like this:

/home/crittergitter/www (www being the folder for html docs etc)


However when I ran phpinfo.php it has info like this

DOCUMENT_ROOT = /www/crittergitter

So I'm confused as to which to use as the path

That is confusing.

If you have SSH or Telnet access to the server, it's easy to find the path.

Otherwise, I can send you a PHP script that will tell you.

Chrisanna
10-May-2005, 01:08 PM
Yes that would be fantastic. I've tried everything I can think of. Let me know where to send you the information.

Chrisanna
10-May-2005, 01:14 PM
I have SSH but will have to download some java runtime thing and restart my computer before I can use it. I will do that now and check back for more info on using this!

russellr
10-May-2005, 01:15 PM
Hi,

Use this secure form: https://secure.rootsoftware.com/~tectite/sendsecret.php

Please supply:

your computer's name or IP address
FTP username and password
and the name of the form that you're trying to get working.

russellr
10-May-2005, 01:24 PM
Hi,



I have SSH but will have to download some java runtime thing and restart my computer before I can use it. I will do that now and check back for more info on using this!

OK.

It's late here so I need to get some sleep.

When you've logged in with SSH:

Find your www and cgi-bin directories and use the "cd" command to get into the cgi-bin directory. For example:


cd www
cd cgi-bin

Then find the real directory path like this:


pwd

That's the path you need to use in the $FILTERS setting for "encode".

russellr
10-May-2005, 01:26 PM
Hi,

Also, once you've changed to the "cgi-bin" directory, you can run fmencoder like this:


./fmencoder


It should print out a usage message and a version number.

Chrisanna
10-May-2005, 01:31 PM
Thanks so much for your great support. Get some sleep and give your suggestions a try and let you know how it turned out! Thanks so much!

russellr
10-May-2005, 01:35 PM
Hi,

Thanks. :)

I got your server details and I've logged in and done some initial investigation.

Everything is perfect, and the correct path is indeed "/home/crittergitter/www/cgi-bin".

So, this is a bit of mystery.

I suspect a misbehaving shell or PHP installation.

I'll have a look at it in detail tomorrow, my time.

russellr
10-May-2005, 01:36 PM
PS....

Your server details are safe and secure (only I can access what you sent).

But, if you want to change your password until I contact you tomorrow, that's fine.

Chrisanna
10-May-2005, 01:36 PM
YOU'RE THE BEST! Thanks so much for the incredible tech support!

Night Night!

Chrisanna
10-May-2005, 01:43 PM
No need. I trust ya!

Chrisanna
10-May-2005, 03:22 PM
Okay just wanted to let you know that I've figured it out.. well at least managed to get it working. I submitted a the form on both my regular URL and my secure URL and they both arrived encrypted and I was able to un-encrypt them just fine using the encoder/decoder script.

Here's what I altered to get it to work

$SOCKET_FILTERS = array(
"httpencode"=>array("site"=>"www.crittergitter.com (http://www.crittergitter.com)",
"port"=>80,
"path"=>"/cgi-bin/fmencoder",
"params"=>array(array("name"=>"key",
"file"=>"$REAL_DOCUMENT_ROOT/cgi-bin/crittergitter-pub.txt"))),
"sslencode"=>array("site"=>"ssl://id85.securedata.net/crittergitter",
"port"=>443,
"path"=>"/cgi-bin/fmencoder",
"params"=>array(array("name"=>"key",
"file"=>"$REAL_DOCUMENT_ROOT/cgi-bin/crittergitter-pub.txt"))),
);

So thanks very much for all your help. If I run into any more problems along the way I'll let you know.

Chrisanna

russellr
10-May-2005, 09:59 PM
Hi,

That's the ultimate workaround for the problem. Well done on getting there!

The only downside of using $SOCKET_FILTERS is that this method is slower than directly executing fmencoder with $FILTERS.

If you're happy, then we'll leave it like that. :)

Chrisanna
11-May-2005, 03:04 PM
Well it's working so I'm happy, but if you have time to take a look and see if you can figure out how to get it working without using the SOCKETS then that's even better. I know you're busy so if you don't have time then it's okay. Thanks again for all your help.