Forum Moderators: coopster & phranque

Message Too Old, No Replies

FormMail problem

My first bit of CGI

         

AlexMartin

5:26 pm on Mar 2, 2004 (gmt 0)

10+ Year Member



I'm trying to get Matt Wright's FormMail 1.92 working correctly, and I'm hoping someone can help me out. Never done any CGI before, so appologies for my ignorance.

We host a few fromMail scripts on our server, so I'm basically duplicating one script, and renaming it, and changing the @recipients bit. I upload the new script (using ascii), and set permissions to execute. When I submit my form I get a popup saying "the attampt to load 'Accessing URL:http://(correct path to file).pl' failed.

I'm using IE5 on a mac.

Anyone know what I'm doing wrong.
Many thanks,
Alex

volatilegx

4:15 pm on Mar 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Alex,

Do you have access to your server's error log? Make sure that the first line of the CGI script has " -w" at the end of it (without the quotes), then try running the script again, then check your server's error log, and post what it says. Then, maybe we can figure out what is wrong.

Dan

AlexMartin

11:57 am on Mar 4, 2004 (gmt 0)

10+ Year Member



Hi Dan, thanks for the reply. I can't find anything that looks like an error log, so not sure I have access to this. There's nothing obvious in either the cgi-bin or log folders, but this is all new to me, so I might be missing something. I'm downloading an "Error Log Viewer", which I suppose will help me check this. Probably won't be able to get back to this thread until next week now, so I'll do some experimenting, and post results then. Think maybe I should begin with a CGI tutorial on the basics of how it's all set up, etc.

Thanks again,
Alex

PS - Just discovered this site... what an excellent resource!

Hissingsid

2:42 pm on Mar 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

If the only thing that has changed is the server then it is probably something different in the server set up.

Check with your hosting comapny that .pl is an allowed file extension. I can only use .cgi on one server I'm on. Also ask them for the path to PERL and if CGIs have to be placed anywhere in particular to run.

Having said that if these things were wrong I think that you would just be sent the perl text.

Best wishes

Sid

AlexMartin

4:08 pm on Mar 4, 2004 (gmt 0)

10+ Year Member



The thing is that there are other .pl files in the CGI-bin that work ok (set up by someone else). I'm just adding a new one, using exactly the same settings, except for the @referers bit. Hmmm.
Alex

volatilegx

7:21 pm on Mar 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try inserting this line into your script, near the top:

use CGI::Carp qw (fatalsToBrowser);

Then the script will display errors on the browser screen instead of just logging them.

By the way welcome to WebmasterWorld! :)

Dan

davidcommunic

3:54 pm on Mar 8, 2004 (gmt 0)

10+ Year Member



Don't know if this is relevant-- try using the program Fetch to upload.
Setting ascii and permissions is very simple, not at all like IE.
Fetch is freeware only on the Mac -- sorry every one else!