News:

Go to HostNed.com
Welcome.  This is a place to get user-to-user support, learn more, and share ideas.  If you can't find your answers here, feel free to ask by creating a new topic or visit the support ticket system at https://my.hostned.com :)  Have fun here!

Main Menu

using asform with hostned

Started by DonaldHines, July 09, 2006, 07:49:32 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DonaldHines

I'm trying to set up asform (http://artsackett.com/freebies/asform/) as a form to email cgi-script.

I have the asform.cgi pointing to the perl interpreter at:
#!/usr/bin/perl

And in asformcfg.cfg I've set the SMTP server to:
mailhost: mail.unicornwoman.com

I also tried with
mailhost: smtp.unicornwoman.com

And finally, my test form html looks like:

<HTML>
<HEAD><TITLE>testing</TITLE></HEAD>

<H1>A form for testing forms!</H1>

<form action="/cgi-bin/asform.cgi" method="POST">
<p>Name: <input type="text" name="name" size=40 maxlength=80>
<p>Email: <input type="text" name="email" size=40 maxlength=80>
<p>Message: <input type="textarea" name="message" rows=50 columns=80>
<input type="submit" value="Send">
</form>

</BODY>
</HTML>

But when I fill out the form and hit SEND, I get a 500 Internal Server Error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

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



---

Any help would be greatly appreciated.

Dynaweb

Hi,

I can suggest three things that are commonly known to be pesky with CGI scripts:

1) Make sure all of the CGI files are in the CGI bin
2) Make sure the CGI files are uploaded in ASCII mode
3) Make sure CGI file permissions are set properly (typically 755)

I hope this helps you.  If you still have trouble, let me know.

ctwjr

Also in your CGI files, make sure all the references to other files are correct.  For example, if your server has a directory structure like this:

Quote| /httpdocs/
--| /httpdocs/cgi-bin/
| /private/

You can see here that the cgi-bin is inside httpdocs.  Also, httpdocs and private directories are on the same level (root).  So let's say you have a .ext file in the /private directory and you have a .cgi file in the cgi-bin that makes reference to it.  There are three different ways to make reference to the other file.  Server mappath, virtual, and absolute paths.  Server MapPath is pretty complicated to me and anly applies to Windows servers, and since I do more PHP coding than ASP, I usually don't use it.  Virtaul path reference would be "../../private/dbname.mdb".  An absolute path depends on the server, but would be something like "C:\Inetpub\Vhosts\domainname.com\private\filename.ext" on Windows or "/home/www/vhosts/domainname.com/private/filename.ext" on Linux server.  (To be sure about the absolute path, refer to your hosting settings page at http://www.hostned.com/setup/ce/ )
I yam what I yam - Mr Potato Head

DonaldHines

Thank you very much for the advice folks!  I gave up on the asform and attempted a php solution using the code from one of the other examples on this forum.  It works just fine.  thank you VERY much for all your help!