CGI Script Execution Error

CGI Script Execution Error

Post by CA Aspir » Sun, 07 Jun 1998 04:00:00



hi!  i'm not that well-versed in unix, and here's the scenario:

1) i got some .cgi and .pl scripts

2) modified the necessary paths inside the scripts (i used a text
editor - notepad since i'm using win95)

3) uploaded them in a cgi-bin directory of a virtual server (the
server is of course a unix server with all the paths and perl
interpreters set, i think)

4) tried to run the scripts by adding the proper tags in a HTML
document..  and loading the HTML document in a browser.

... as expected it won't work readily and the error logs say:
"illegal char (##) at line ##". i know there should be a command in
the unix shell that i could use to validate or compile (? - not sure
about the terms here) the script by stripping the illegal characters
like carriage returns <-- and this is the problem.  what command is
it?

i can manually edit the scripts with a text editor, remove all the
carriage returns and upload the file as an ASCII.. but that would take
forever.. and yet, there will be no guarantees.

so, can you guys help me?  i need the necessary step between 3 and 4.

thanks.

 
 
 

CGI Script Execution Error

Post by Chris Kohari » Tue, 09 Jun 1998 04:00:00



> hi!  i'm not that well-versed in unix, and here's the scenario:

> 1) i got some .cgi and .pl scripts

> 2) modified the necessary paths inside the scripts (i used a text
> editor - notepad since i'm using win95)

> 3) uploaded them in a cgi-bin directory of a virtual server (the
> server is of course a unix server with all the paths and perl
> interpreters set, i think)

> 4) tried to run the scripts by adding the proper tags in a HTML
> document..  and loading the HTML document in a browser.

> ... as expected it won't work readily and the error logs say:
> "illegal char (##) at line ##". i know there should be a command in
> the unix shell that i could use to validate or compile (? - not sure
> about the terms here) the script by stripping the illegal characters
> like carriage returns <-- and this is the problem.  what command is
> it?

> i can manually edit the scripts with a text editor, remove all the
> carriage returns and upload the file as an ASCII.. but that would take
> forever.. and yet, there will be no guarantees.

> so, can you guys help me?  i need the necessary step between 3 and 4.

> thanks.

Well, if you want to strip those pesky ^M characters out you might check to see
if the dos2unix command is available on your server.

--
Chris Koharik

 
 
 

1. Execution of CGI scripts in Apache

HI,

When testing out a cgi script that is located in a subdirectory under the
docuement root I get the following error: script not found or unable to
stat: /home/webmaster/pub/html/hailix/cgi-bindisplay.cgi. What does stat
mean?

Now the permissions are 755 on the script itself as well as the cgi-bin
subdirectory.  I used perl -c display.cgi to check the perl syntax which
checked out okay.  I did notice that there is not a forward slash between
cgi-bin and the script name of display.cgi.  Why I do not know.

Any help would be appreciated.

Trevor

2. mounting locally nfs fails...

3. Apache CGI/Perl script execution problem

4. Linux IP Masquerading and SMB packets...

5. apache setup/enabling execution of cgi scripts

6. AHA 1542CF

7. CGI script execution in SSL problem

8. Help needed for C++ network programming

9. CGI script execution problem in SSL

10. Non execution of CGI scripts

11. CGI-Execution with UID/GID of script-owner

12. Execution error java prog inside shell script

13. Execution of SQL Script thru shell script