Welcome to WebmasterWorld Guest from 50.19.34.234

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

FTPing and editing my FormMail.pl file causes Internal Error 500

     

JeffOstroff

4:20 pm on Jan 21, 2010 (gmt 0)

5+ Year Member



This is a strnage one.

I use the form building tool from my web host to build an email form and it saves my formmail.pl perl script file in the CGI-BIN directory, and the form works well.

So now I use WSFTP to download the formmail.pl file to my PC, and using Notepad just tested adding a word of text to my "click here" statement at the bottom of the form.

When I upload the formmail.pl file back up to the server and test the form, I get Intenral Error 500.

So I re-gen the formmail.pl file again using my web host tool, and it gives me a clean slate and the form works again.

So I thought maybe it was my editing of the formamil.pl that caused a problem, so I tried just FTPing the newly regenerated formamil.pl file untouched from the server to my PC and back again, and just that transfer process alone seems to do something wrong to the perl script file, and break it somehow but I don't know what.

I have WSFTP setup to "Auto" for the file type when you transfer files. Should I be forcing ASCII type for the transfer, or does it not matter?

JeffOstroff

4:45 pm on Jan 21, 2010 (gmt 0)

5+ Year Member



Yes, I fixed it on my own!

The problem was somehow in the transfer prcoess, WSFTP had changed the permission on my Formmail.pl file, so tha attributes were only showing R and W, but not X for Execute. If you have no X you get no Execute! So I simply added the X back to the attributes, now my form works. So editing with Notepad was ok, it was just losing the permissions in the mix.

Jeff

phranque

1:34 am on Jan 22, 2010 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



is there an WS_FTP option setting to retain file permissions when uploading files?

whenever you see a 500 Internal Server Error, there will be a message in the server error log file.

JeffOstroff

1:53 am on Jan 22, 2010 (gmt 0)

5+ Year Member



I did not see way to make it not touch the attributes, but I can change it to X very easily by right clicking the file on the server from within WSFTP's right side window and choosing properties.

Then you just check off the execute boxes.

Don't know if it matters that I'm going from a UNIX server on my web site to a Windows PC so there may not be a perfect mapping of attributes.

phranque

2:53 am on Jan 22, 2010 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



perhaps there is a recursive file attributes option for the root directory to keep file permissions for existing files.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month