CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
More problems

 



etheracide
journeyman

Jul 4, 2001, 7:26 PM

Post #1 of 3 (328 views)
More problems Can't Post

I am not sure what to make of this. I have been working on my script and it always worked fine. When I create a working upgrade to a script, I save the file and then i copy the file so that I can use the copy to script further features. I added what I wanted to the script and uploaded it and got the following 500 error message:

Can't open perl script "
": No such file or directory

The only thing that I changed from the working file to the nonworking file was the mail function. So I decided to upload the script on my harddrive that was the last version and was working. I ran it and got the same error, but this is the SAME file that ran perfectly earlier this morning.

I went into the server a downloaded a copy of the previous version of the script. When I opened it, it had the hard returns removed and had those little boxes that indicate that there should be a hard return. I uploaded that and the script worked. I cannot edit the script bunched up like that so I went through the script and took out the boxes and entered through the document to get it to look correct. Then I uploaded it and tried to run the script and got the same error message as before.

Unfortunately it is way too difficult to try to add what I need to the script when it is all bunched up like that. I thought that maybe the server was experiencing some difficulties so I did everything that I did on that server, on my other one with the same result.

I am not sure what is suddenly wrong. This is not a good start =0) I will appreciate any help anyone may be able to offer. Thank you for your time.



mhx
Enthusiast / Moderator

Jul 4, 2001, 10:07 PM

Post #2 of 3 (325 views)
Re: More problems [In reply to] Can't Post

Hi,

I'm not quite sure if this will help you, but it sounds like you are having a problem with BINARY/ASCII up-/download. I guess you are editing your script using Windows and some editor like Notepad. Your server is some flavor of Unix. You are up- and downloading your scripts in binary format. If all of this doesn't apply to you, you can safely forget the rest of the post ;-)
While Windows text files (such as your script) have lines terminated by a CR/LF sequence, most Unix systems only have the LF to terminate lines in text files. Unix Perl interpreters seem to have problems with the CR/LF, while Windows Perl interpreters can handle both formats. Unfortunately, if you open a file in Notepad that has only LF, you get these fancy boxes.
The solution is quite simple. If you choose ASCII-mode up-/download in your FTP client, all text files will be stored in the format the host requires. Which means if you upload, CR/LF's will be converted to simple LF, and if you download, it's vice versa.
As a first test, try to download the working script from the server in ASCII mode. It should no longer have these boxes if you open it. Then, try to upload your new script in ASCII mode, and it should work if there aren't any other errors in it.
I hope that this was really your problem, but to me it sounded like if it were.

-- Marcus



etheracide
journeyman

Jul 4, 2001, 10:39 PM

Post #3 of 3 (323 views)
Re: More problems [In reply to] Can't Post

*burries head in hands*
I can't believe I did that! I use Win2000k Pro on my box and I am using a Unix server. Last night I was uploading images which always tend to look better when I upload them in binary/ But it was so late and I was so tired that I didn't even think to change the transfer mode. So this morning when I started having this trouble, i didn't even think to check my mode!

WOW! I am not as new as this would make me seem haha But I should have realized the mode dilema myself as soon as I transfered the working script from my server to my harddrive and it had the boxes.

Well now this set aside, I can begin to work on the mail subroutine that you suggested =0)


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives