Results 1 to 4 of 4

Thread: Internal Server Error??? Help with FormMail

  1. #1
    Join Date
    Sep 2008

    Unhappy Internal Server Error??? Help with FormMail

    Ok, So I bought a template from a web template site thinking that everything I needed would be provided, but I was waaaaay off! I got every thing setup and running except the Mail Form. I really am not all that savvy on coding and I'm more of a designer... this is why I have no clue what's going on. I've spent about 15 hours trying to figure out whats wrong but I can't for the life of me???

    I punched in what I thought was all I needed in the actual code on the "contacts Page" but it's still not working? below is the Mail Form code(in Red) from the page. Does this look like it should function if it was directed to the "MailForm.pl" file correctly?

    And I keep hearing about a redirect after the submit buttons pushed? does it look like this is in this code (in red)?

    after I hit submit this is what I get "Internal Server Error, The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator,(e mail address) and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log."

    <form id="form" action="web address/cgi-bin/FormMail.pl" enctype="multipart/form-data">
    <div class="line"><input type="text" value="name:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="title:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="company name:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="address:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="address cont'd:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="city:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="state:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="e-mail:" onfocus="this.value=''" /></div>
    <div class="line"><input type="text" value="phone:" onfocus="this.value=''" /></div>
    <textarea cols="30" rows="40" onfocus="this.value=''">message:</textarea><br />
    <a href="#" class="link_3" onclick="getElementById('form').submit()">send</a> <a href="#" class="link_3" onclick="getElementById('form').reset()">clear</a>

    This is what my FormMail.pl looks like (in gray).

    # --------------------------
    # Modify these to your own settings. You might have to
    # contact your system administrator if you do not run
    # your own web server. If the purpose of these
    # parameters seems unclear, please see the README file.
    $DEBUGGING = 1;
    $emulate_matts_code= 0;
    $secure = 1;
    $allow_empty_ref = 1;
    $max_recipients = 5;
    $mailprog = '/usr/lib/sendmail -oi -t';
    $postmaster = 'info@mysite.com';
    @referers = qw(mysite.com);
    @allow_mail_to = qw(info@mysite.com);
    @recipients = qw(info@mysite.com);
    %recipient_alias = ();
    $locale = '';
    $charset = 'iso-8859-1';
    $date_fmt = '%A, %B %d, %Y at %H:%M:%S';
    $style = '/css/nms.css';
    $no_content = 0;
    $double_spacing = 1;
    $wrap_text = 0;
    $wrap_style = 1;
    $send_confirmation_mail = 0;
    $confirmation_text = <<'END_OF_CONFIRMATION';
    From: (you@your . com)
    Subject: form submission

    Thank you for your form submission.


    if anyone can help I would really really appreciate it! I'm getting reamed out because the mail page doesn't work and I have no clue where to even start???

    Thanks for any and all help!

  2. #2
    Join Date
    Oct 2007
    Vienna, Austria
    Hello Mykkah,

    I've seen this error message before. :-) It hits me when CGI is not configured properly, when there is an error in the script or when there is another configuration error (like in the .htaccess file). I suggest you try these things:
    1. Check if your FormMail.pl file has execute permissions,
    2. Check if the FormMail.pl script is without errors,
    3. Check if you can run .pl files as GCI scripts. Sometimes they need to have the .cgi suffix.
    4. Check if the FormMail.pl script runs with the perl interpreter on your server and if all required modules are installed.

    So how you go about doing those things and how you fix them:

    ad 1: Simply force the permissions on by issuing the command:
    chmod +x /path/to/cgi-bin/FormMail.pl
    If you use a GUI-based tool to manage your remote files, then you could do this via clicking but that depends highly on the tool you use.

    ad 2: Try to run
    perl -c /path/to/FormMail.pl
    on the server or on your machine. If you do it on your machine and get the error that some modules could not be found, that's not a tragedy.

    The gray code you posted here certainly doesn't look like a complete, yet alone functional perl script, so I hope the code goes on in your FormMail.pl file. Otherwise (or if you get syntax errors), you may need to look for another tool to do what you need or you can retry downloading that file.

    ad 3: Try to run a minimalistic perl script as CGI. Do it this way:
    • Create a file named test.pl
    • Insert this text into it:
          print "Content-type: text/plain\n\n";
      print "CGI works.";
    • Upload this file into the cgi-bin folder and give it execute permissions
    • Point your browser to http://your_site.com/cgi-bin/test.pl .

    If that shows anything else than "CGI works", then your problem is in running cgi scripts. In such a case, try to rename the *.pl files in the cgi-bin folder to *.cgi and retry (with the filenames changed accordingly in the URL and in the form's action attribute). If you still get the same errors, you'll need to contact your admin to let you run CGI scripts.

    ad 4: This might be the hardest thing to do if you only have FTP access. If you get to this point without finding the problem by the above methods, write again.

    Hope this helps.

  3. #3
    Join Date
    Sep 2008
    Ok so after long trials I'm having some small break through... I wrote a test.pl just as you suggested to see if the CGI worked and i didn't, but I host with two separate companies and decided to try in on "ipowerweb" instead of "hostway" which isn't working and my scripts ran fine?

    So this means its a server side error right?

    What would I have to tell the admin at host way in order to fix this?

  4. #4
    Join Date
    Oct 2007
    Vienna, Austria
    Well, it seems to be due to the configuration of the server. It may have been intended by the admins not to allow CGI scripting, so "server side error" might be a little unfitting a term for your situation. I suggest you ask the admins to tell you how to get CGI scripts working on your website hosted on their servers. Or maybe it's in a FAQ page of theirs?

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.10614 seconds
  • Memory Usage 2,871KB
  • Queries Executed 13 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (4)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates