Help with Perl
Posted by: FrontSlash (---.bredband.skanova.com)
Date: February 15, 2006 11:19PM

Hi o/

Im having trouble configurating perl on my server, i got the newest wamp and perl-addon installed, but i cant seem to open .pl documents :/

I'l attach a screenshots:
[img365.imageshack.us]

And my HTTPD config file:
[rapidshare.de]

If you could contact me by email Cturfors@gmail.com (i check it a few times a day) and/or you contact me on MSN: Cturfors [at] hotmail [dot] com
IRC: Qnet, nick: FrontSlash


ANY help is welcomed.

With greetings from sweden, o/

Options: ReplyQuote
Re: Help with Perl
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 16, 2006 12:05AM

open up your apache httpd.conf and find:

# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# [httpd.apache.org]
# for more information.
#

Options Indexes FollowSymLinks


Change 'Options Indexes FollowSymLinks' to:

Options Indexes FollowSymLinks Includes +ExecCGI

Save the file, restart apache, and perl should be working now. The '+ExecCGI' option tells apache to allow perl in your www folder.

Options: ReplyQuote
Re: Help with Perl
Posted by: FrontSlash (---.bredband.skanova.com)
Date: February 16, 2006 10:53AM

Thanks! It seems to work now, cause now i get a different errormessage (I know i am an noob when it comes to stuff like this :<winking smiley
---------------------------------------------------------------------
Forbidden

You don't have permission to access /config.pl on this server.
Apache/2.0.55 (Win32) PHP/5.1.2 Server at localhost Port 80
---------------------------------------------------------------------

Is it just an apache setting i have to change? Or is it something a bit more dificult?

With greetings from sweden, o/

Options: ReplyQuote
Re: Help with Perl
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 16, 2006 05:18PM

Make sure you have the correct location to perl at the top of the perl script:

#!C:\wamp\perl\bin\perl.exe

Options: ReplyQuote
Re: Help with Perl
Posted by: FrontSlash (---.bredband.skanova.com)
Date: February 16, 2006 06:13PM

Meh!

>_<

I dont get **** about this >_<

There are alot of .pl files in the site im trying to use.

It SHOULD work the way ive configured it >_<

If you or someone else would take a look at the files im posting down below i would be grateful :/

Ive deleted all the sensetive information such as MySQL pass and username (which i dont get anyhow sad smiley )

The attached file is namned Help.rar, and includes my httpd.conf and the whole script folder. The Wakaba.pl is the indexfile and the config.pl is the configuration.
If you would point out any errors i did i would be very gratefull.
Attached files:
[rapidshare.de]

PS. This is the first time ive used any script's, and its a school project :/

Options: ReplyQuote
Re: Help with Perl
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 16, 2006 08:04PM

ok, I took a look at your httpd.conf file, found this:
ScriptAlias /cgi-bin/ "c:/wamp/Apache2/cgi-bin/"

This means you need to put your perl files in this folder to get them to work:
C:\wamp\Apache2\cgi-bin

Then use this to access them:
[localhost]

Options: ReplyQuote
Re: Help with Perl
Posted by: FrontSlash (---.bredband.skanova.com)
Date: February 16, 2006 09:32PM

Ok, that much covered, but now when i write [localhost] wich is the correct path and name i get this error message:

500 Internal Server Error (The header)

Internal Server Error

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

Please contact the server administrator, webmaster@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.55 (Win32) PHP/5.1.2 Server at localhost Port 80

Im seriously thinking that this might be over my head sad smiley

Options: ReplyQuote
Re: Help with Perl
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 17, 2006 01:18AM

please post your apache error log here. also, try to change the extention of your files from .pl to .cgi and see if that works.

Options: ReplyQuote
Re: Help with Perl
Posted by: FrontSlash (---.bredband.skanova.com)
Date: February 17, 2006 12:13PM

Tried changing it into .cgi, same error still though :/

here is the error log for apache:

[Thu Feb 16 20:37:29 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -- resuming normal operations
[Thu Feb 16 20:37:29 2006] [notice] Server built: Oct 9 2005 19:16:56
[Thu Feb 16 20:37:29 2006] [notice] Parent: Created child process 3544
[Thu Feb 16 20:37:29 2006] [notice] Child 3544: Child process is running
[Thu Feb 16 20:37:29 2006] [notice] Child 3544: Acquired the start mutex.
[Thu Feb 16 20:37:29 2006] [notice] Child 3544: Starting 250 worker threads.
[Thu Feb 16 20:39:08 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Feb 16 20:39:08 2006] [notice] Child 3544: Exit event signaled. Child process is ending.
[Thu Feb 16 20:39:09 2006] [notice] Child 3544: Released the start mutex
[Thu Feb 16 20:39:10 2006] [notice] Child 3544: Waiting for 250 worker threads to exit.
[Thu Feb 16 20:39:10 2006] [notice] Child 3544: All worker threads have exited.
[Thu Feb 16 20:39:10 2006] [notice] Child 3544: Child process is exiting
[Thu Feb 16 20:39:11 2006] [notice] Parent: Child process exited successfully.
[Thu Feb 16 20:39:11 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -- resuming normal operations
[Thu Feb 16 20:39:11 2006] [notice] Server built: Oct 9 2005 19:16:56
[Thu Feb 16 20:39:11 2006] [notice] Parent: Created child process 956
[Thu Feb 16 20:39:11 2006] [notice] Child 956: Child process is running
[Thu Feb 16 20:39:11 2006] [notice] Child 956: Acquired the start mutex.
[Thu Feb 16 20:39:11 2006] [notice] Child 956: Starting 250 worker threads.
[Thu Feb 16 20:40:20 2006] [error] [client 127.0.0.1] Premature end of script headers: wakaba.pl
[Thu Feb 16 20:40:20 2006] [error] [client 127.0.0.1] Can't locate DBI.pm in @INC (@INC contains: C:/wamp/perl/lib C:/wamp/perl/site/lib .) at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Thu Feb 16 20:40:20 2006] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Thu Feb 16 20:41:57 2006] [error] [client 127.0.0.1] Premature end of script headers: wakaba.pl
[Thu Feb 16 20:41:57 2006] [error] [client 127.0.0.1] Can't locate DBI.pm in @INC (@INC contains: C:/wamp/perl/lib C:/wamp/perl/site/lib .) at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Thu Feb 16 20:41:57 2006] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Thu Feb 16 20:42:12 2006] [error] [client 127.0.0.1] C:/wamp/Apache2/cgi-bin/config.pl is not executable; ensure interpreted scripts have "#!" first line
[Thu Feb 16 20:42:12 2006] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/wamp/Apache2/cgi-bin/config.pl
[Thu Feb 16 20:43:09 2006] [error] [client 127.0.0.1] Premature end of script headers: wakaba.pl
[Thu Feb 16 20:43:09 2006] [error] [client 127.0.0.1] Can't locate DBI.pm in @INC (@INC contains: C:/wamp/perl/lib C:/wamp/perl/site/lib .) at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Thu Feb 16 20:43:09 2006] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Thu Feb 16 20:44:22 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Feb 16 20:44:22 2006] [notice] Child 956: Exit event signaled. Child process is ending.
[Thu Feb 16 20:44:23 2006] [notice] Child 956: Released the start mutex
[Thu Feb 16 20:44:24 2006] [notice] Child 956: Waiting for 250 worker threads to exit.
[Thu Feb 16 20:44:24 2006] [notice] Child 956: All worker threads have exited.
[Thu Feb 16 20:44:24 2006] [notice] Child 956: Child process is exiting
[Thu Feb 16 20:44:25 2006] [notice] Parent: Child process exited successfully.
[Thu Feb 16 21:27:57 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -- resuming normal operations
[Thu Feb 16 21:27:57 2006] [notice] Server built: Oct 9 2005 19:16:56
[Thu Feb 16 21:27:58 2006] [notice] Parent: Created child process 2156
[Thu Feb 16 21:27:58 2006] [notice] Child 2156: Child process is running
[Thu Feb 16 21:27:58 2006] [notice] Child 2156: Acquired the start mutex.
[Thu Feb 16 21:27:58 2006] [notice] Child 2156: Starting 250 worker threads.
[Thu Feb 16 21:29:28 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Feb 16 21:29:28 2006] [notice] Child 2156: Exit event signaled. Child process is ending.
[Thu Feb 16 21:29:29 2006] [notice] Child 2156: Released the start mutex
[Thu Feb 16 21:29:30 2006] [notice] Child 2156: Waiting for 250 worker threads to exit.
[Thu Feb 16 21:29:30 2006] [notice] Child 2156: All worker threads have exited.
[Thu Feb 16 21:29:30 2006] [notice] Child 2156: Child process is exiting
[Thu Feb 16 21:29:31 2006] [notice] Parent: Child process exited successfully.
[Thu Feb 16 21:29:31 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -- resuming normal operations
[Thu Feb 16 21:29:31 2006] [notice] Server built: Oct 9 2005 19:16:56
[Thu Feb 16 21:29:31 2006] [notice] Parent: Created child process 3692
[Thu Feb 16 21:29:31 2006] [notice] Child 3692: Child process is running
[Thu Feb 16 21:29:31 2006] [notice] Child 3692: Acquired the start mutex.
[Thu Feb 16 21:29:31 2006] [notice] Child 3692: Starting 250 worker threads.
[Thu Feb 16 21:30:39 2006] [error] [client 127.0.0.1] File does not exist: C:/wakaba/cgi-bin
[Thu Feb 16 21:30:43 2006] [error] [client 127.0.0.1] script not found or unable to stat: C:/wamp/Apache2/cgi-bin/wakaba.pl
[Thu Feb 16 21:31:04 2006] [error] [client 127.0.0.1] (OS 3)Det går inte att hitta sökvägen. : couldn't create child process: 720003: printenv.pl
[Thu Feb 16 21:31:04 2006] [error] [client 127.0.0.1] (OS 3)Det går inte att hitta sökvägen. : couldn't spawn child process: C:/wamp/Apache2/cgi-bin/printenv.pl
[Thu Feb 16 21:49:56 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Thu Feb 16 21:49:57 2006] [notice] Child 3692: Exit event signaled. Child process is ending.
[Thu Feb 16 21:49:58 2006] [notice] Child 3692: Released the start mutex
[Thu Feb 16 21:49:59 2006] [notice] Child 3692: Waiting for 250 worker threads to exit.
[Thu Feb 16 21:49:59 2006] [notice] Child 3692: All worker threads have exited.
[Thu Feb 16 21:49:59 2006] [notice] Child 3692: Child process is exiting
[Thu Feb 16 21:49:59 2006] [notice] Parent: Child process exited successfully.
[Fri Feb 17 12:10:34 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -- resuming normal operations
[Fri Feb 17 12:10:35 2006] [notice] Server built: Oct 9 2005 19:16:56
[Fri Feb 17 12:10:35 2006] [notice] Parent: Created child process 312
[Fri Feb 17 12:10:35 2006] [notice] Child 312: Child process is running
[Fri Feb 17 12:10:35 2006] [notice] Child 312: Acquired the start mutex.
[Fri Feb 17 12:10:35 2006] [notice] Child 312: Starting 250 worker threads.
[Fri Feb 17 12:10:45 2006] [error] [client 127.0.0.1] File does not exist: C:/wakaba/favicon.ico
[Fri Feb 17 12:10:52 2006] [error] [client 127.0.0.1] Premature end of script headers: wakaba.pl
[Fri Feb 17 12:10:52 2006] [error] [client 127.0.0.1] Can't locate DBI.pm in @INC (@INC contains: C:/wamp/perl/lib C:/wamp/perl/site/lib .) at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Fri Feb 17 12:10:52 2006] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.
[Fri Feb 17 12:11:16 2006] [error] [client 127.0.0.1] Premature end of script headers: wakaba.cgi
[Fri Feb 17 12:11:16 2006] [error] [client 127.0.0.1] Can't locate DBI.pm in @INC (@INC contains: C:/wamp/perl/lib C:/wamp/perl/site/lib .) at C:/wamp/Apache2/cgi-bin/wakaba.cgi line 6.
[Fri Feb 17 12:11:16 2006] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at C:/wamp/Apache2/cgi-bin/wakaba.cgi line 6.

The last lines are when i tried to access wakaba.pl and wakaba.cgi today, and got the same error as in my last post.

Options: ReplyQuote
Re: Help with Perl
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 17, 2006 04:39PM

an't locate DBI.pm in @INC (@INC contains: C:/wamp/perl/lib C:/wamp/perl/site/lib .) at C:/wamp/Apache2/cgi-bin/wakaba.pl line 6.

this means the script can not find the dbi perl module


"Premature end of script headers: wakaba.cgi"

This might help to sove this problem, use this in the beginning of all your cig and perl files:
#!C:\wamp\perl\bin\perl.exe -w

Options: ReplyQuote
Re: Help with Perl
Posted by: FrontSlash (---.bredband.skanova.com)
Date: February 17, 2006 07:37PM

Im still getting the exact same error :/

First lines of the wakaba.pl script:

#!C:\wamp\perl\bin\perl.exe -w

use strict;

use CGI;
use DBI;

Error message:

Internal Server Error

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

Please contact the server administrator, webmaster@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.55 (Win32) PHP/5.1.2 Server at localhost Port 80

Options: ReplyQuote
Re: Help with Perl
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 17, 2006 09:13PM

I am out of ideas. sorry smiling smiley try another forum, like:

DevShed is a killer community, you questions will be answered by people who specialize in apahe, perl, php, etc....
[forums.devshed.com]

Options: ReplyQuote
Re: Help with Perl
Posted by: FrontSlash (---.bredband.skanova.com)
Date: February 17, 2006 09:56PM

Thanks for all the help dude \o/

Its not working, but now i have a week of from school, might aswell relax and ignore this project untill next monday.

Il ask some of my teachers for help.

Many thanks for the help anyhow o

Options: ReplyQuote


Sorry, only registered users may post in this forum.