473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

help on perl file uploading

rajiv07
141 100+
Hi to all

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. print "Content-type:text/plain\n\n";
  4.  
  5. print "Hello, World...\n";
This is a testing code which i upload into the Linux Centos webserver.It gives Premature end of script header error.Actually i am working on Windows platform and upload in to Linux Centos webserver.So the same file if i go directly to Linux centos server and do edit using picco and save it without any changes then its working fine.

Could u anybody List out What might be a problem

Thanks
Rajiv
Feb 20 '08 #1
4 1349
KevinADC
4,059 Expert 2GB
Transfer the file from your Windows PC to the server using an FTP program and transfer the file in ASCII (text) mode. If you do not know how read the help files of your FTP program for "transfer mode". The Windows line endings are probably messing up the script when posted to the server, but using the FTP program and transfering in ASCII mode will fix that.
Feb 20 '08 #2
rajiv07
141 100+
Transfer the file from your Windows PC to the server using an FTP program and transfer the file in ASCII (text) mode. If you do not know how read the help files of your FTP program for "transfer mode". The Windows line endings are probably messing up the script when posted to the server, but using the FTP program and transfering in ASCII mode will fix that.
Thanks Kevin

Usually I upload the file using FTP program in ASCII mode.Is any other option for this problem.
Feb 20 '08 #3
Kelicula
176 Expert 100+
Thanks Kevin

Usually I upload the file using FTP program in ASCII mode.Is any other option for this problem.
Is the server configured to "serve" plain text mime type?

Otherwise, that script should work.

I tried it on my Apache 2.2, and on command line.
No problems...

Are you sure the ftp client is set properly?
Feb 20 '08 #4
rajiv07
141 100+
Is the server configured to "serve" plain text mime type?

Otherwise, that script should work.

I tried it on my Apache 2.2, and on command line.
No problems...

Are you sure the ftp client is set properly?
Thanks Kelicula

The ftp has not set properly.Now its working fine.

Regards
Rajiv
Feb 21 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: FLOTServer | last post by:
Here's my problem: I run a gameserver that runs the game "Medal of Honor". On the game server is log file which contains all of the data from the players for that day (kills, deaths, etc...). I...
3
by: JGBNS via DotNetMonster.com | last post by:
Hi, I am new to this forumand I apologize as i am not a .net programmer but we have a program being developed by a .net programmer. Nowwe have run into an ftp snag and I think it is part ftp and...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
5
by: hb | last post by:
Hi, In my ASP.Net application 'MyWebApp' , the mode="StateServer" in <sessionState> of Web.config file, and the ASP.NET State Service is set to start automatically on the server. But every...
2
by: Velhari | last post by:
Hi all, I developed the following codes to implement the concept of Multiple file Uploading Process. Actually my goal in this implementation is to uploads the files onto the server and i have...
2
by: Joseph0 | last post by:
For the purpose of this thread, here is the scenario: 100 people are uploading 500 MB files at the same time. Each person has the exact computer configurations and same Internet connections. Which...
1
by: Lastknight | last post by:
hi all how to view a uploaded file in the page. I mean if i am uploading a file and after that i am going to export the same file to other page..Thats the normal way i will do for...
66
by: happyse27 | last post by:
Hi All, my html code is sno 1) and perl code is sno 2). a) I tried to print $filename and it cant print out the value, only blank was displayed, and the file could not be uploaded. And it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.