That's not it :(
Main Topics
Browse All TopicsI am trying to do something that should be simple. However, I am trying to do it so it is not.
1. I am trying to implement a formmail script called: NMS Formmail. It can be found here: http://nms-cgi.sourceforge
2. I think my problem is that when I edit the formmail.pl file I am using the wrong editor and/or saving it incorrectly and/or uploading to the server incorrectly. Here is what I am doing:
1. Edit formmail.pl with Notepad
2. I make the changes I believe are necessary according to the directions.
3. I click on Save As and select these options:
File Name: formmail
Save as Type: Text Documents (*.txt)
Encoding: Ansi
4. I then upload via FTP in BINARY mode to my host server. The server shows the file as a PL file but it does not work AT ALL. It is not a configuration problem with the file. It is uploaded to the correct cgi-bin directory. I am uploading the darn file or saving it incorrectly I am sure. Can someone help?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi joedunn,
Try setting the permission of your script to executable on the server: On Unix server, use "chmod 0755 myscript.pl", On Window server, make sure the dir you uploaded to has permission to run scripts. You can likely use your FTP client to set the permission if you don't have shell access to the server.
BTW, the TEXT/BINARY mode should not matter in this case.
Cheers!
You can try it out here, its a very simple test form:
www.summitre.com/vera.htm
I can guarantee you that if you FTPed the script in BINARY mode, it will have Windows end of line characters (CRLF) instead of Unix end of line character (LF).
You need to FTP in ASCII mode. Keep in mind that won't always work.
My recommendation would be to install gvim from http://www.vim.org/downloa
This is a multi platform version of vi, but don't worry, it has a GUI interface and is very easy to use.
The advantage of gvim over notepad is that it will handle Windows/Unix files just fine and won't muck up your formatting like Notepad can.
Tintin, while it's true the perl script would have DOS newline, but what does it matter anyway? That for sure's not the problem (and if you read OP's later comment, indeed it made no difference as I suggested) 'cause perl interpreter's smart enough not to be tricked by this small cross-platform issue.
I agree with ozo, if joedunn tried my suggestions and they don't work, joe should try to check server log (or use fatalstobrowser and see if it catches error. Sometimes it doesn't (like when the problem's due to #! line)).
inq123.
I can assure you that a Perl script on a Unix system that has
#!/usr/bin/perl
as the first line will not work if it has Windows end of line characters and is FTP'ed in binary mode.
The reason is that the Unix kernel will be looking for an interpreter called
/usr/bin/perl<CR>
where <CR> is a carriage return.
Sometimes, people can be fooled into thinking the windows end of line characters don't matter if they have any flags on the first line, eg:
/usr/bin/perl -w
The Unix kernel will now correctly see the interpretor as:
/usr/bin/perl
and perl will quite happily handle parsing the flag
-w<CR>
Business Accounts
Answer for Membership
by: ozoPosted on 2005-08-15 at 12:22:11ID: 14677294
Try FTPing as TEXT instead of BINARY