+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Encoder

  1. #1
    Join Date
    Mar 2007
    Posts
    23

    Default Encoder

    Forms work great until I add try to encode with <input type="hidden" name="filter" value="encode">. Then when I submit the form I get "Page cannot be displayed". No error messages and the form is not emailed to me and fmbadhandler does not work.

    When I browse to fmencoder I get "GET method not yet implemented".
    We are using PHP 4.4.1.
    Safe mode is OFF.
    OpenSSL support is enabled.
    I've uploaded fmencoder for linux into cgi-bin folder using binary file transfer and set file mode to 711. Also tried 755. Is it supposed to be 711 or 755?
    Uploaded public key file and set file mode to 644.
    I also have changed the name of FormMail to fm.php.

    Can't think of anymore details. What should I check or try next?

    Thanks,
    Dan

  2. #2
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Encoder

    Hi,

    Quote Originally Posted by danp
    Forms work great until I add try to encode with <input type="hidden" name="filter" value="encode">. Then when I submit the form I get "Page cannot be displayed". No error messages and the form is not emailed to me and fmbadhandler does not work.
    Something's gone awry with the server setup.

    When I browse to fmencoder I get "GET method not yet implemented".
    That's really good news, because fmencoder works on your server.

    I've uploaded fmencoder for linux into cgi-bin folder using binary file transfer and set file mode to 711. Also tried 755. Is it supposed to be 711 or 755?
    711 is fine, so is 755. Much the same as far as the program is concerned.

    Uploaded public key file and set file mode to 644.
    Perfect.

    Can't think of anymore details. What should I check or try next?
    We need to diagnose, or guess, what's gone wrong. The error you're getting means that the server is not executing the PHP script properly (or the PHP is dying for some reason).

    The server logs will contain helpful information (apache? if so, there's an error log you should be able to find).

    However, I'll take a couple of guesses.

    Do you think you can figure out the how to create a directory/folder for temporary files and setup SCRATCH_PAD?

    Here's the documentation: http://www.tectite.com/fmdoc/scratch_pad.php

    Start with that, and then we'll work from there.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Mar 2007
    Posts
    23

    Default Re: Encoder

    Thanks for the quick reply. I'll see if I can get that done and check on the log files and get back to you when it's done.

    For what we are doing, is it necessary to create the directory above the doc root dir/folder?

    Dan

  4. #4
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Encoder

    Hi,

    It's generally better to create about the document root, alternatively you can protect from the web with .htaccess instructions.

    But, the temporary files generally don't contain any sensitive information so it's not critical.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Mar 2007
    Posts
    23

    Default Re: Encoder

    Good Morning and hope you enjoyed your weekend. We're 15 hours earlier here. 4:30pm, Monday.

    I checked the error log. It shows the following error:
    "script not found or unable to stat: /home/cgi-bin/fmencoder"

    I have set up the SCRATCH_PAD folder. Hope I set the path correctly.

    Does the error tell you what might be wrong? It sounds like formmail is not finding the file, since we know we can browse to it. I left $FILTER set to the default. ("encode"=>"REAL_DOCUMENT_ROOT/cgi-bin/fmencoder -kpubkey.txt", "null"=>"null")

    Dan

  6. #6
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Encoder

    Hi,

    I checked the error log. It shows the following error:
    "script not found or unable to stat: /home/cgi-bin/fmencoder"
    Excellent! That tells us exactly what the problem is.

    $REAL_DOCUMENT_ROOT has the incorrect value of just "/home".

    To fix this, you need to know to know the full path to your document root.

    You probably know this if you've managed to set $SCRATCH_PAD correctly.

    What you need to do is put the document root path in SET_REAL_DOCUMENT_ROOT (click to review the documentation).

    This script will help you find the document root (look for DOCUMENT_ROOT in the output):
    PHP Code:
    <?php 
    phpinfo
    ();
    ?>
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Mar 2007
    Posts
    23

    Default Re: Encoder

    php shows the "DOCUMENT_ROOT" as /usr/local/etc/httpd/htdocs

    When I FTP into my files, the first place I come to is /
    to get to cgi-bin I go to /www/cgi-bin

    This is a little beyond me. So what do I want to use for the path in SET_REAL_DOCUMENT_ROOT?

  8. #8
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Encoder

    Hi,

    FTP tells lies. Actually, it's just a security feature in FTP servers that locks you into a particular area. The directory path it tells you means nothing.

    Do you have SSH or telnet access to the server?

    If not, just ask your hosting provider what the full path is to your web servers document root.

    They should have told you this when you signed up.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  9. #9
    Join Date
    Mar 2007
    Posts
    23

    Default Re: Encoder

    May have telnet, but never used it. It would be easier to ask tech support.
    Thanks,
    Dan

  10. #10
    Join Date
    Mar 2007
    Posts
    23

    Default Re: Encoder

    Tech support sent me this:
    Here is the path to the file fmencoder, /usr/local/etc/httpd/cgi-bin.

    Note: This cgi-bin is one level under my web files directory which is usr/local/etc/httpd/htdocs. This is same as phpinfo gives us for the document root.

    /usr/local/etc/httpd/cgi-bin causes this error:
    Error=Cannot chdir to "/usr/local/etc/httpd/cgi-bin/cgi-bin" to run filter "encode": No such file or directory (errno 2)

    /usr/local/etc/httpd causes this error:
    This page cannot be displayed. IE6.
    In Foxfire it trys to open formmail in my web editing software.

    ???
    Dan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Encoder Download
    By pppe in forum FormMailEncoder/Decoder
    Replies: 12
    Last Post: 25-Nov-2008, 12:59 AM
  2. Using the encoder
    By ckroon in forum FormMailEncoder/Decoder
    Replies: 3
    Last Post: 10-Oct-2006, 08:33 PM
  3. Encoder error message
    By lal in forum FormMailEncoder/Decoder
    Replies: 8
    Last Post: 19-May-2005, 11:35 AM
  4. encoder and good template
    By dunn123 in forum FormMailEncoder/Decoder
    Replies: 3
    Last Post: 13-Jan-2005, 12:36 AM
  5. Encoder/decoder
    By Ellie in forum FormMailEncoder/Decoder
    Replies: 4
    Last Post: 28-Jul-2004, 09:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts