Formmail 1st

loonieyvonne

Verified User
Joined
Apr 25, 2005
Messages
5
Hello. I'm trying to set up formmail and Im confused.

I downloaded the formmail.pl , created a directory cgi-sys and uploaded it.

I keep getting this message

You don't have permission to access /cgi-sys/formmail.pl on this server

Did I forget something?

Thanks
 
Still nothing

Thanks for your reply.

Now that I removed my cgi-sys folder that I stupidly made, I uploaded the formmail.pl into the cgi-bin and now it says the page cannot be found once I submit the form.
 
Does a simple hello world cgi work?
Something like
Code:
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>\n";

If it does, then it would point to a problem within the script itself as well as the fact that you are able to access the form of the script? It could be a misconfigured redirect to the completion page (The page it is supposed to send you to after submitting isn't set properly)
 
Last edited:
Well the hello world worked.

I think Im just having trouble figuring out what needs to be changed on the formmail.pl file...

I'm just gonna give up and skip forms

Thanks so much
 
I just bought the lifetime license of DirectAdmin and have my own server. I can't run any cgi scripts. I get the warning that I don't have permission to access the script on the server.

Then I tried the test script listed above and placed it in the cgi-bin and tried to run it. I get the following error:

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

So first, what might be the problem, and a second question, do I HAVE to have the scripts in the cgi-bin? There are a lot of commercial programs out there that use .pl scripts throughout the site.

Thanks!
 
Thanks for the tips. No luck though. I have a hosted server so no direct apache access. I've noticed via ftp that the owner is listed as "ftp". Can I handle the CHOWN command I've read about on the forums from an ftp client or do I need shell access?

Also, maybe related, I have a master admin account with DirectAdmin and then a reseller account where I have 9 or so domains, but no User account set up. Is this ok to do?

Thanks!
 
Try uploading through DirectAdmin's FileManager. Usually all files uploaded through that or ftp automatically belong to user:user

ftp only allows chmod changes I think, and DA's filemanager can also do that.
 
Regarding part two of my question, is it ok to have a number of domains under my reseller account and not have an associated user account?

Also could the server's firewall protection be stopping cgi access?
 
I just thought of this...

If you upload a cgi file (such as anything.pl) using the file manager, from a Windows system, it will have the wrong line endings.

.html files work fine with Windows line endings.

But .cgi & .pl programs will have exactly the error mentioned.

Jeff
 
So the solution? Can I edit the file from filemanager after upload and remove the extraneous stuff?

(It works now by the way, had the path in the script config wrong! :eek: )

Can't get sendmail to work though even though I've read through the forums on it... :(
 
The solution for my "issue" would be to use FTP and to upload the file as ascii.

Linux includes a program dos2unix which will fix the file in place if it's installed, but you can't run it unless you've got shell access.

Or there is a fix you can make to the first line (the one that begins #!) which will enable it to work with the wrong line-endings, but I can't find it and don't remember it.

Jeff
 
dcorwin said:
Can't get sendmail to work though even though I've read through the forums on it... :(

DirectAdmin doesn't use sendmail. Sendmail should just be a link to exim, or you might use the path to exim instead of sendmail in case it doesn't exist.
 
I was hoping the wording of my post would help you to avoid having to say "Direct Admin doesn't use sendmail" since I've seen you've had to type that in about 100 forum posts.

What would the path normally be for exim on a standard install I guess is what I'm asking?

Thanks.
 
Back
Top