[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

From Unix to Win 95 to Unix

Posted on 1998-09-02
5
Medium Priority
?
228 Views
Last Modified: 2010-03-05
I have download a working perl file with a .cgi ext and the .htm file that call the perl file.
I have chanch the name of the .cgi file but the ext is the same
I also change the name in the .htm file the same name as the .cgi file.
i also open the .cgi file with dos edit.
i upload the 2 files on the web on a unix server.
When i open the .htm file and try to run the .cgi file it dont want to run the .cgi file.
Will a .cgi program that is edit in dos edir work on a unix server and what must i do to let it work?
0
Comment
Question by:delpro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Accepted Solution

by:
matthewallum earned 40 total points
ID: 1204678
Whats probably happening is when you open the .CGI file with dos edit and then resave it its saving it as a 'windows' textfile which have newline/carridge return pairs rather than just a newline (on a unix text file). The solution would be to edit the file in a text editor that will save text files as unix file type. Textpad (www.textpad.com) does this.
0
 

Expert Comment

by:matthewallum
ID: 1204679
oops I forgot to say UNIX perl gets upset with newline/carridge return pairs and wont work.
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1204680
> From: matthewallum Date: Thursday, September 03 1998 - 08:17AM PDT                      
                                                                                             
                                                                                             
 >    oops I forgot to say UNIX perl gets upset with newline/carridge return pairs and        
 >    wont work.

It's good that your forgot to say it.... it's flat out wrong.  perl in
unix, or any other os, treats both newlines and carriage returns in
scripts as white space, and completely ignores it.  You may feel free
to test this for yourself.

As for the original question, an answer that might indeed have some
effect is to check that the attributes of the new .cgi file include
the world executable bits.  If you have telnet or shell access to the
server,

chmod +x file.cgi

where file is whatever the new name of your cgi program is.
0
 

Expert Comment

by:matthewallum
ID: 1204681
Well the problem's definetly happed to me in the past.
Another thing to check is that your uploading the CGI file as text NOT Binary.


0
 
LVL 84

Expert Comment

by:ozo
ID: 1204682
Before 5.004 newline and carriage returns were distinguished when looking for the end of a <<here string.

Does the script run from the command line?
What errors do you get running the script on unix?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question