Jump to content


Photo

CGI Scripts will not run


  • Please log in to reply
2 replies to this topic

#1 DanD

DanD

    Newbie

  • Member
  • Pip
  • 2 posts
  • Main OS: Windows XP

Posted 05 December 2008 - 09:08 AM

I have tried everything I can think of, but I can not get my pl/cgi scripts to run. This is a windows box with all uniserver settings as it comes default.

I can not seem to run scrips from the main directory or the cgi-bin, and yes THE FILE IS IN THE DIR.

Please help me get this working.

This the result on the webpage:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3 Server at localhost Port 80



Here is the error log:

[Fri Dec 05 07:58:51 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't spawn child process: W:/cgi-bin/hello.pl
- [Fri Dec 05 07:58:51 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: hello.pl
- [Fri Dec 05 07:54:53 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: W:/www/hello.cgi
- [Fri Dec 05 07:54:53 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: hello.cgi
- [Fri Dec 05 07:52:11 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't spawn child process: W:/cgi-bin/hello.pl
- [Fri Dec 05 07:52:11 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: hello.pl
- [Fri Dec 05 07:32:26 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: W:/www/hello.pl
- [Fri Dec 05 07:32:26 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: hello.pl
- [Fri Dec 05 07:29:11 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: W:/www/hello.cgi
- [Fri Dec 05 07:29:11 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: hello.cgi
- [Fri Dec 05 07:28:23 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: W:/www/hello.cgi
- [Fri Dec 05 07:28:23 2008] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: hello.cgi
- [Fri Dec 05 07:23:58 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't spawn child process: W:/www/hello.cgi
- [Fri Dec 05 07:23:58 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: hello.cgi


This is the cgi
#! /usr/local/bin/perl

# hello.pl -- my first perl script!

print "Content-type: text/html\n\n";

print <<"EOF";
<HTML>

<HEAD>
<TITLE>Hello, world!</TITLE>
</HEAD>

<BODY>
<H1>Hello, world!</H1>
</BODY>

</HTML>
EOF


#2 DanD

DanD

    Newbie

  • Member
  • Pip
  • 2 posts
  • Main OS: Windows XP

Posted 05 December 2008 - 10:07 AM

Never mind :D

I had to change "#! /usr/local/bin/perl" to "#! /usr/bin/perl"

Now it works..

#3 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 05 December 2008 - 03:05 PM

Excellent, glad you have it working

Would have pointed you to the quick-guides:

http://wiki.uniforms...New_Users:_Home

http://wiki.uniforms..._Quick_Perl_CGI

All the best
Ric :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users