homepage Welcome to WebmasterWorld Guest from 54.226.230.76
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

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




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

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




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

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




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

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




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

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




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved