Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    53
    Member #
    8598
    I am trying, without success, to create a form that a user input information to, submits, and the information is emailed to me.

    In my FormMail.pl
    I have:
    $mailprog = '/usr/lib/sendmail -oi -t';
    (I have tried '/usr/sendmail -oi -t' and 'SMTP:mailhost.My.Domain'(Tried to get a hold of host provider...was on 'forget' for over an hour)
    $postmaster = 'Email@address.com';
    @referers = qw();
    @allow_mail_to = qw(Email@address.com);
    @recipients = ();
    Everything else is at the default.

    In my html file I have:
    <form action="FormMail.pl" method="post" name="EmailForm">
    <input type="hidden" name="recipient" value="MyEmail@address.com"/>
    <input type="hidden" name="subject" value="Form Demo"/>
    <input type="hidden" name="redirect" value="Redirect.htm"/>
    As well as the form fields.

    When I test the page out I can input information, But when I 'Submit' I get a 'You are not authorized to view this page', 'HTTP Error 403 - Forbidden
    Internet Explorer'.
    Whew, well there it all is. Can one of you brilliant minds tell me what I am doing wrong. My head hurts

  2.  

  3. #2
    Senior Member megablaz0r's Avatar
    Join Date
    Jul 2004
    Location
    Cheyenne, Wyoming
    Posts
    508
    Member #
    6548
    you need to set the formmail.pl file permission to execute. your ftp client should have an option for setting file permissions.

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    I assume in your post, you have this as an example:
    <form action="FormMail.pl" method="post" name="EmailForm">

    In reality, you need to point the action to your Perl script
    either as a relative path:
    <form action="/cgi-bin/FormMail.pl" method="post" name="EmailForm">

    or an absolute path:
    <form action="http://www.mysite.com/cgi-bin/FormMail.pl" method="post" name="EmailForm">

    megablaz0r is correct. You also need to set the CHMOD of your Perl
    script to 755. Your FTP program has a spot to set it (view help).

    And ... you need to transfer the Perl script from your PC to your
    webspace using ASCII transfer mode (not Binary). Binary is probably
    the default, used for your HTML, graphics files. Perl/CGI scripts
    always get transfered in ASCII mode.

    Your webhost probably has a help page on where they locate their
    $mailprog ... they will show you the correct program path.

    and finally, have you ever gotten a Perl script to run correctly?
    Did you ever do a simple "hello there" kind of script to test out
    your ability to upload and CHMOD a Perl script? If not, you might
    want to check out a simple tutorial with the infamous "Hello There"
    script to make sure you're CGI-BIN is working correctly.

    --max--


  5. #4
    Member
    Join Date
    Jan 2005
    Posts
    53
    Member #
    8598
    Okay, now I have a really stupid question. I am using DWMX and that is where I have setup anything to do with ftp but I have looked and looked and cannot find a 'set permissions' option anywhere. Does the ftp program that comes with DWMX have that capability, if not how else would I do it. (In case you haven't noticed I am very new to all this and have just enough knowledge to get myself in trouble.) I can't find a way to start ftp outside of DWMX, is it from the command prompt? Help please. BTW this was a script from:
    http://nms-cgi.sourceforge.net/scripts.shtml (you know one of those 'simple' anyone can do things...lol



    megablaz0r is correct. You also need to set the CHMOD of your Perl
    script to 755. Your FTP program has a spot to set it (view help).

    And ... you need to transfer the Perl script from your PC to your
    webspace using ASCII transfer mode (not Binary). Binary is probably
    the default, used for your HTML, graphics files. Perl/CGI scripts
    always get transfered in ASCII mode.

    Your webhost probably has a help page on where they locate their
    $mailprog ... they will show you the correct program path.

    and finally, have you ever gotten a Perl script to run correctly?
    Did you ever do a simple "hello there" kind of script to test out
    your ability to upload and CHMOD a Perl script? If not, you might
    want to check out a simple tutorial with the infamous "Hello There"
    script to make sure you're CGI-BIN is working correctly.

    --max--[/QUOTE]

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    WS-FTPLE FTP program used to be free, but now,
    they upgraded it and charge a fee.

    http://www.download.com/3000-2160-10018456.html

    You might still be able to find a free one, or find
    someone who has the original free version.

    Run the FTP program alone, set up your parameters,
    and use it to transfer your Perl scripts.


  7. #6
    Member
    Join Date
    Jan 2005
    Posts
    53
    Member #
    8598
    Well folks,
    Thank you very much for all the help.
    As it turned out, it wasn't my code but DWMX 2003. It does not recognize $_POST. It prefers $HTTP_POST_VARS. So, now everything works fine...I have a lot less hair from pulling it out but then I did learn a lot of new things.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:31 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com