Problem with mods PERL! CGI!!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem with mods PERL! CGI!!

Postby ghtmatrix » 18. June 2008 07:16

Erro interno do Servidor!
O servidor encontrou um erro interno e não pode completar sua requisição.

Mensagem de Erro:
Can't locate config.pl in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/site/lib C:/xampp/perl/lib . C:/xampp/apache) at C:/xampp/htdocs/war/cgi-bin/take_slot.pl line 3. ,

Se você acredita ter encontrado um problema no servidor, por favor entre em contato com o webmaster.

Error 500
localhost
18/6/2008 03:13:16
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8


which solution?!
------------------------------------------------------------

i cant found problem =(
all my scripts in webhost is OK! but in my localhost i cant run it =(
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14

Postby Wiedmann » 18. June 2008 09:25

Can't locate config.pl ... at C:/xampp/htdocs/war/cgi-bin/take_slot.pl line 3. ,

You have the file "config.pl"?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby ghtmatrix » 18. June 2008 17:20

sure, same folder!!!!!

but cant open!!! crazy ...
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14

Postby Wiedmann » 18. June 2008 18:06

sure, same folder!!!!!

You can disable "mod_perl" with "setup_xampp.bat" only only use plain Perl cgi.

(Don't forgett to adjust all shebang lines)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby ghtmatrix » 18. June 2008 21:11

humm

i need DBI.m to acess mysql. Then i supost need of mods =(

i go try.
............

same problem =(

Mensagem de Erro:
Can't locate config.pl in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/site/lib C:/xampp/perl/lib . C:/xampp/apache) at C:/xampp/htdocs/war/cgi-bin/take_slot.pl line 3. ,

i change in http.conf to .pl was read how .cgi

ok, just my software dont run here with this error :<
----------------------

(Don't forgett to adjust all shebang lines)

way of PERL????

#!C:xampp\perl\bin\perl.exe ???? right???

one little exemple of my script top!
#!C:\xampp\perl\bin\perl.exe


$PATH_TO_WEBROOT = "C:\xampp\htdocs\war";
$CGI_BIN_PATH = "C:\xampp\cgi-bin";
$CGI_TEMP_UPLOAD_DIR = "C:\xampp\htdocs\war\cgi-bin\tmp";
$MAX_UPLOAD_SIZE = 200000; # bytes
$DATA_BKUP = "C:\xampp\htdocs\war\cgi-bin\data_bkup";

in another file than need include!
#!C:xampp\perl\bin\perl.exe

require "config.pl";
require "cgi-lib.pl";
use DBI();

$|=1; # hot output

sub print_start_html(){
print &PrintHeader;
print <<TOP;
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14

Postby ghtmatrix » 19. June 2008 05:59

right, i try again install addons, and maybe found the problem; or one little problem with addon to function require of system.

log erro:
[Thu Jun 19 01:48:20 2008] [error] Can't locate config.pl in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/site/lib C:/xampp/perl/lib . C:/xampp/apache) at C:/xampp/htdocs/war/cgi-bin/take_slot.pl line 3.\n

i remove the line:
require "config.pl";

and replace for all content of file, and oHH, is ok! ...
but i need use require... :?

then i dunno where is the implementation of this function in mod perl inside of xammp.

the easy question is, for default where xampp mod perl, try do one include of content of file?? same folder??? or another with any information of conf... :(

waiting...

muy problem hee is with require i think, because i reinstall 2 times, change conf. and nothing ...
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14

Postby Wiedmann » 19. June 2008 09:36

then i dunno where is the implementation of this function in mod perl inside of xammp.

You have not disabled mod_perl as I suggest?

(Only with mod_perl a "require 'config.pl';" can't find the file in the same dir as the script)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby ghtmatrix » 22. June 2008 06:30

Wiedmann wrote:
then i dunno where is the implementation of this function in mod perl inside of xammp.

You have not disabled mod_perl as I suggest?

(Only with mod_perl a "require 'config.pl';" can't find the file in the same dir as the script)


if i disable mod_perl dont read .pl, and u can said, i need install manually PERL....?
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14

Postby Wiedmann » 22. June 2008 09:51

if i disable mod_perl dont read .pl

A right, an old cofniguration problem (but the maintainer is not interessted):

In "httpd.conf", change line ~419 to:
Code: Select all
AddHandler cgi-script .cgi .pl
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby ghtmatrix » 23. June 2008 02:38

# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi .pl


not, its done long time ago...

is another problem ...
i need turn on mod perl to read and use .pl, if it turn off dont read, but open!

when i open the file, he simply cant require file! maybe the problem be function than find file in same folder?
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14

Postby Wiedmann » 23. June 2008 10:06

i need turn on mod perl to read and use .pl,

Then there must be something other wrong in your installation, because you don't need mod_perl to use .pl files.

Assuming a normal (fresh) XAMPP installation with Perl-AddOn ond disabled mod_perl, you can't open this in your browser?:
"http://localhost/cgi-bin/printenv.pl"
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby ghtmatrix » 23. June 2008 21:38

well, another question then, i use this l

http://localhost/war/cgi-bin/file

or for default of perl, i just can run files in localhost/cgi-bin?
because i can run in another folder, i think this not was a problem :shock:

well

PERL 5.008008 + mod_perl/2.0.3

Directory for MOD PERL => [..] \xampp\htdocs\modperl => http://localhost/perl/modperl.pl


if i try use in another folder, then its problem!!????
because i can change it if possible.

maybe perl.conf?
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14

Postby Wiedmann » 23. June 2008 23:24

In a default XAMPP install you can run Perl scripts in any (sub-) folder of "xampp\htdocs" or in "\xampp\cgi-bin".

If you have configured your own aliase or vhosts... I don't know.


But once more:
Your main problem is mod_perl. With mod_perl and a standard perl script, you can't relative include a file in the same folder as the script. Well, for a script which is designed to work with mod_perl this is not a problem.
--> there is really no need for you to use mod_perl. Just use the standard Perl CGI.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby ghtmatrix » 26. June 2008 05:05

how?
ghtmatrix
 
Posts: 8
Joined: 18. June 2008 07:14


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 138 guests