[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CGI/Perl report in Todo-list



Hi,

the following was requested in the ToDo list:

> Hi I have a problem, like the other person, 
> I am tryig to setup a message board and I get this error:
> CGI: error DoExecCGIChild() failed. Error code is 2. Start of command line 
> > is 'perl c:\cgi-bin\acboard.pl'
> WELL I tryed what you said by doing
> -----------------
> Open the file Conf\Config.pi3 and go down to the section
> <Object>
> Name StandardCGI        
> Theres a bunch of options there to customize exactly how CGI's
> are started. Find the line              CommandLineByExt .pl="perl %p%q"
> Remove this line, save the file, stop and start the server to cause
> Pi3 to start CGI's with .pl extensions like all others allowing
> windows to figure out how to exec file script using its associations,
> lots of web servers do this.
> 
> 
> -------------------
> Well now I get this error:
> [Fri Jan 01 17:20:29 1999 GMT] CGI: error executing CGI program system specific error code is '193'.
> [Fri Jan 01 17:20:29 1999 GMT] CGI: DoExecCGIChild() failed. Error code is 193. Start of command line is > 'C:\PI3WEB\Cgi-Bin\board-setup.pl '.
> 
> The error code is 193 instead of 2, what can I do now? 

What says the Windows API help about the 2 error codes?

2	The system cannot find the file specified.	ERROR_FILE_NOT_FOUND 
193	Is not a valid application.			ERROR_BAD_EXE_FORMAT

The explanation :
=================

error code 2
The command line for perl.exe associated with the extension of your CGI script
is wrong. Frequently found reasons:

question: Is Perl installed on your system? 
answer: No
action: Download and install perl i.e. http://www.activestate.com/activeperl/

answer: Yes
  question: Did you change the path to perl.exe associated with the extension
            of your CGI script in Config.Pi3?
  answer: No
    question: Is there a search path entry for perl.exe?
    answer: No
    action: Add the path to perl.exe to your DOS search path: Add the
            following line to C:\AUTOEXEC.BAT (the path is only for
            example):

            set path = %path%;c:\perl\bin
    answer: Yes
    action: Check the search path. 
  answer: Yes
  action: Check the path to perl.exe in Config.Pi3 associated with the file
          extension of your CGI script.

Hints:
- directory names in Config.Pi3 with C-style syntax (c:\\perl\\bin\\perl.exe)
- a good way to test the problems is to build a similar command line on a
  DOS-box (Copy the origin line from the server error message, open
  DOS prompt, insert the line and look what happens).

error code 193
The extension of your CGI script file isn't associated with an application.

I never tried this way to start a CGI application. But in your case - since
you got error code 2 first - there's a basic problem with starting Perl.
Try to fix it in the above way either by adding perl to your search path
or by changing the command line for perl.exe in Config.Pi3.

Hints:
- Try to start a perl file from the windows explorer by double clicking it.
if the 'open with' dialog comes up the file extension isn't associated with
an application.

--
with regards
Holger

---------------------------------------------------------
Holger 'Zimpel' Zimmermann    Contact me:
---------------------------------------------------------
Wendishain                    tel./fax company: on demand
Germany                       tel./fax private: on demand
---------------------------------------------------------
homepage: http://home.t-online.de/home/zimpel/
web server: surf to it from my homepage (online every
            Sunday 20:00-24:00 GMT, start shifted again)
e-Mail:     zimpel@t-online.de
--------------------------------------------------------