[Xitami] Xitami Pro and CGI

Ayhan Tuncer xitami@lists.xitami.org
Tue, 07 Jan 2003 14:32:18 +0200


> Neil Finlayson wrote:
> 
> Hey,
> 
> I have just move to Xitami Pro and when i run my CGI scripts i get the
> error:
> 
> Can't locate sub.txt in @INC (@INC contains: c:/Perl1/lib
> c:/Perl1/site/lib .) at webpages/cgi-bin/2.cgi line 2.
> I have tried reinstalling Perl, ant nothing else has changed apart
> from moving to Xitami Pro.
> 
> Here is my system config:
> Windows 2000 server
> Xitami Pro
> 1.4Ghz Duron
> Activeperl
> PHP
> 
> thanks.

This looks like a Perl cgi error if you found the error in cgierr.log
located in the main Xitami directory. It means your browser's request
managed both to find the url and to execute the cgi script, however
there is an error in the cgi script at line 2 .

The Perl interpreter stops execution of the program and issues a warning
which is written to the standard error, the cgierr.log.

Open with a text editor your script file located at:
webpages/cgi-bin/2.cgi
at line 2 of this 2.cgi there should be some code which the perl
interpreter
can not execute.

What does it say at line 2?  If it says something like this:

require 'sub.txt';

this means that you have neglected to copy over from your old
directories
an individual file by the name of  sub.txt  which your cgi program has
to
find and read before it can go any further. You should find this sub.txt
file and copy it over to the same directory that 2.cgi is in.

Ayhan Tuncer