Perl module Apache-PageKit installation testing error - perl

I have installed the Apache::PageKit module and while testing this module it shows below error.
But the availability of module, using below it is there
bash-3.2$
bash-3.2$ perl -MApache::PageKit -e1
bash-3.2$
bash-3.2$ ./t/TEST -start-httpd
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /install/others/Apache-PageKit-1.14/t/TEST -start-httpd --documentroot '/install/others/Apache-PageKit-1.14/eg'
/install/others/apache2/bin/httpd -d /install/others/Apache-PageKit-1.14/t -f /install/others/Apache-PageKit-1.14/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS
using Apache/2.2.25 (prefork MPM)
waiting 60 seconds for server to start: .Syntax error on line 24 of /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf:
Can't locate loadable object for module Apache::URI in #INC (#INC contains: /tmp/apache_test /install/others/Apache-PageKit-1.14/blib/lib /install/others/Apache-PageKit-1.14/blib/arch /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /install/others/Apache-PageKit-1.14/t /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14\nCompilation failed in require at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\nBEGIN failed--compilation aborted\t(in cleanup) Can't locate loadable object for module Apache::URI in #INC (#INC contains: /tmp/apache_test /install/others/Apache-PageKit-1.14/blib/lib /install/others/Apache-PageKit-1.14/blib/arch /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /install/others/Apache-PageKit-1.14/t /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14\nCompilation failed in require at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\nBEGIN failed--compilation aborted at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\n
[ error]
server has died with status 255 (t/logs/error_log wasn't created, start the server in the debug mode)
sh: line 1: 25604 Terminated /usr/bin/perl /install/others/Apache-PageKit-1.14/t/TEST -start-httpd --documentroot '/install/others/Apache-PageKit-1.14/eg'
bash-3.2$
bash-3.2$
bash-3.2$
bash-3.2$ perl -MApache::URI -e1
bash-3.2$
Here line 24 is <Perl>. so pagekit could not able to parse this line.
bash-3.2$ vi /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf
# WARNING: this file is generated (from /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf.in), do not edit
# generated on Thu Jul 11 08:09:38 2013
# 01: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:961
# 02: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:979
# 03: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:1452
# 04: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:1564
# 05: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:502
# 06: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRunPerl.pm:107
# 07: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:713
# 08: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:713
# 09: /install/others/Apache-PageKit-1.14/t/TEST:72
# Apache::Reload is very very helpfull during development,
# but it is not required. So install it and uncomment
# the following lines
#
# PerlModule Apache::Reload
# PerlInitHandler Apache::Reload
# PerlSetVar ReloadAll On
# <Perl >
<Perl>
# It is not necasary to preload this modules, but it helps
How can i resolve this.
Thanks
Shanmugam A.
Hi,
Thanks for your reply, now i have installed Perl 5.8.8, Apache 2.2.25, Modperl 2.0.8 and Apache2::PageKit for this combination i have below error while starting the apache.
bash-3.2$
bash-3.2$ /install/others/apache2/bin/apachectl start
[Mon Jul 15 11:28:10 2013] [error] Can't locate loadable object for module Apache::Constants in #INC (#INC contains: /install/others/lib/perl5/5.8.8 /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /dso/dsoapps/iesdev/qtngsas70/DSOMP/lib /dso/dsoapps/iesdev/qtngsas70/DSOMP/bin. /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /install/others/apache2) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14.\nCompilation failed in require at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//ModPerl/P2.pm line 2.\nBEGIN failed--compilation aborted at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//ModPerl/P2.pm line 2.\nCompilation failed in require at (eval 2) line 3.\n
[Mon Jul 15 11:28:10 2013] [error] Can't load Perl module ModPerl::P2 for server (null):0, exiting...
Note: Here i am setting up from Unix to Linux server.
In Unix it was the combination of Apache 1.3.27, mod_perl 1.27 Apache::PageKit And in Apache Configuration below is the additional part added with default
#################################################################
<IfModule mod_perl.c>
PerlModule ModPerl::P2
<Location /P2>
SetHandler perl-script
PerlHandler ModPerl::P2
PerlSendHeader On
</Location>
PerlModule ModPerl::P1
<Location /P1>
SetHandler perl-script
PerlHandler ModPerl::P1
PerlSendHeader On
</Location>
PerlModule Apache::DBI
#### Entered by Tom Frizzell April 25 2008
PerlFixupHandler Apache::SIG
</IfModule>
###############################################################
# PageKit setup
PassEnv ORACLE_HOME ORACLE_SID ORACLE_USERID TAPEMON_HOME TAPEMON_LIB
<Perl>
use lib "/chshttp/prod/qtngsas70/DSOMP/lib";
</Perl>
SetHandler perl-script
PerlSetVar PKIT_ROOT /chshttp/prod/qtngsas70/DSOMP/www
PerlSetVar PKIT_SERVER test
PerlHandler +Apache::PageKit
<Perl>
Apache::PageKit->startup('/chshttp/prod/qtngsas70/DSOMP/www', 'test');
</Perl>
PerlInitHandler +Apache::Reload
# Error Handling
PerlModule Apache::ErrorReport
PerlSetVar ErrorReportHandler display
This Configuration i have changed all Apache::PageKit to Apache2::PageKit and respective source code as well. I have just copied the files ModPerl::P1 and ModPerl::P2 from Unix server to Linux. But it shows the error as above.
Shall i know how to resolve this.
Thanks
Hi,
When i access the page is shows 500 internal error. and the apache log says that (Can't locate object method "is_main" in the perl module Apache::SIG). Shall i know how to resolve this.
bash-3.2$ more error_log
[Sun Jul 14 09:38:12 2013] [notice] Apache/2.2.25 (Unix) configured -- resuming normal operations
[Sun Jul 14 09:40:01 2013] [notice] caught SIGTERM, shutting down
[Tue Jul 16 06:39:59 2013] [notice] Apache/2.2.25 (Unix) mod_perl/2.0.8 Perl/v5.8.8 configured -- resuming normal operations
[Tue Jul 16 06:41:01 2013] [error] [client 10.191.51.22] Can't locate object method "is_main" via package "Apache2::RequestRec" at /install/
others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/SIG.pm line 14.\n
my updated apache configuration is
#################################################################
<IfModule mod_perl.c>
PerlModule ModPerl::P2
<Location /P2>
SetHandler perl-script
PerlHandler ModPerl::P2
# PerlSendHeader On
PerlOptions +ParseHeaders
</Location>
PerlModule ModPerl::P1
<Location /P1>
SetHandler perl-script
PerlHandler ModPerl::P1
# PerlSendHeader On
PerlOptions +ParseHeaders
</Location>
PerlModule Apache::DBI
PerlFixupHandler Apache::SIG
LogFormat "%h %l %u %t \"%r\" %s %b %{SIGPIPE}e"
</IfModule>
###############################################################
# PageKit setup TAPEMON_HOME TAPEMON_LIB
PassEnv ORACLE_HOME ORACLE_SID ORACLE_USERID
<Perl>
use mod_perl2;
# It is not necasary to preload this modules, but it helps
# to find errors in your instalation.
use Apache2::URI ();
use Apache2::Cookie ();
use Apache2::Request ();
use Apache::SessionX ();
use Apache2::Util ();
use Compress::Zlib ();
use File::Find ();
use HTML::FillInForm ();
use HTML::Parser ();
use HTML::Template ();
use XML::LibXML ();
use Apache2::PageKit();
use lib "/dso/dsoapps/iesdev/qtngsas70/DSOMP/lib";
</Perl>
SetHandler perl-script
PerlSetVar PKIT_ROOT /dso/dsoapps/iesdev/qtngsas70/DSOMP/www
PerlSetVar PKIT_SERVER test
PerlHandler +Apache2::PageKit
<Perl>
Apache2::PageKit->startup('/dso/dsoapps/iesdev/qtngsas70/DSOMP/www', 'test');
</Perl>
PerlInitHandler +Apache2::Reload
# Error Handling
PerlModule Apache2::ErrorReport
PerlSetVar ErrorReportHandler display
Shall i know how can i resolve this
Thanks
Shanmugam A.

It looks like Apache-PageKit works only with mod_perl1, but not with mod_perl2 (the latter would use Apache2::URI, not Apache::URI). So you should probably look for an alternative, or if you really need this module, then you have to find a way to install Apache1 and mod_perl1 on your system.

Related

perl installation, cpan install true.pm fails

I am very much a perl newbie, I know very little about the system.
I am trying to install App/Lingua/BO/Wylie/Transliteration.pm which seems to be dependent on true.
I am getting an error on the install of true. This seems very surprising, so I am very open to something very fundamental and wrong with the perl installation. Running perl v5.30.2 on MacOS 11.3.1.
cpan error log:
force install true.pm
Running install for module 'true'
CHOCOLATE/true-v1.0.2.tar.gz
Has already been unwrapped into directory /Users/phil/.cpan/build/true-v1.0.2-0
CHOCOLATE/true-v1.0.2.tar.gz
Has already been prepared
Running make for C/CH/CHOCOLATE/true-v1.0.2.tar.gz
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- true.bs blib/arch/auto/true/true.bs 644
cc -c -I/Users/phil/perl5/lib/perl5/darwin-thread-multi-2level/B/Hooks/OP/Annotation/Install -I/System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/B/Hooks/OP/Check/Install -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -O3 -Wall -W -DVERSION=\"v1.0.2\" -DXS_VERSION=\"v1.0.2\" -iwithsysroot "/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE" true.c
true.xs:8:10: fatal error: 'hook_op_check.h' file not found
#include "hook_op_check.h"
^~~~~~~~~~~~~~~~~
1 error generated.
make: *** [true.o] Error 1
CHOCOLATE/true-v1.0.2.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
CHOCOLATE/true-v1.0.2.tar.gz : make NO
true.xs:8:10: fatal error: 'hook_op_check.h' file not found
This looks like a bug in the system Perl installation that comes preinstalled on macOS. The module B::Hooks::OP::Check comes preinstalled in /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/B/Hooks/OP/ but the file /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/B/Hooks/OP/Check/Install/hook_op_check.h is missing for some reason. As a consequence, it is not possible to install the module true which depends on that file being there.
You can override the preinstalled version by running:
$ cpan -f B::Hooks::OP::Check
This will install the module into /Library/Perl/5.30/darwin-thread-multi-2level/B/Hooks/OP if you are using sudo with cpan, or into ~/perl5/lib/perl5/darwin-thread-multi-2level/B/Hooks/OP if you are using local::lib with cpan. This latter installation will be found before the preinstalled version due to the ordering of the perl #INC include path, so it will override the preinstalled version of the module.
This will enable you to install the module true, but after installing this the installation of App::Lingua::BO::Wylie::Transliteration still fails:
$ cpan App::Lingua::BO::Wylie::Transliteration
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/Users/hakonhaegland/.cpan/Metadata'
Database was generated on Sat, 01 Jan 2022 22:29:03 GMT
Running install for module 'App::Lingua::BO::Wylie::Transliteration'
Fetching with LWP:
http://www.cpan.org/authors/id/D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
Fetching with LWP:
HASH(0x13444b3c8)authors/id/D/DB/DBR/CHECKSUMS
Fetching with LWP:
HASH(0x13444b3c8)authors/id/D/DB/DBR/CHECKSUMS.gz
Fetching with LWP:
http://www.cpan.org/authors/id/D/DB/DBR/CHECKSUMS
Checksum for /Users/hakonhaegland/.cpan/sources/authors/id/D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz ok
Configuring D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz with Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'App-Lingua-BO-Wylie-Transliteration' version '0.1.0'
DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
/usr/bin/perl Build.PL -- OK
Running Build for D/DB/DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
Building App-Lingua-BO-Wylie-Transliteration
DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
./Build -- OK
Running Build test for DBR/App-Lingua-BO-Wylie-Transliteration-0.1.0.tar.gz
t/00-check-deps.t ........ ok
t/00-load.t .............. 1/1
# Failed test 'use App::Lingua::BO::Wylie::Transliteration;'
# at /Library/Perl/5.30/Test/UseAllModules.pm line 71.
# Tried to use 'App::Lingua::BO::Wylie::Transliteration'.
# Error: Couldn't find declarator 'method' at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare/Context/Simple.pm line 47.
# Devel::Declare::Context::Simple::skip_declarator(Method::Signatures::Simple=HASH(0x12704f6d8)) called at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare/MethodInstaller/Simple.pm line 62
# Devel::Declare::MethodInstaller::Simple::parser(Method::Signatures::Simple=HASH(0x12704f6d8), "method", 0, 1) called at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare/MethodInstaller/Simple.pm line 25
# Devel::Declare::MethodInstaller::Simple::__ANON__("method", 0) called at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/Devel/Declare.pm line 277
# Devel::Declare::linestr_callback("const", "method", 0) called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# require App/Lingua/BO/Wylie/Transliteration.pm called at /Library/Perl/5.30/Test/UseAllModules.pm line 71
# Test::UseAllModules::BEGIN() called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# eval {...} called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# eval 'package Test::UseAllModules;
# BEGIN { ${^WARNING_BITS} = $args[-1] if defined $args[-1] }
# #line 71 /Library/Perl/5.30/Test/UseAllModules.pm
# use App::Lingua::BO::Wylie::Transliteration #{$args[0]};
# 1;
# ' called at /System/Library/Perl/5.30/Test/More.pm line 1034
# Test::More::_eval("package Test::UseAllModules;\x{a}BEGIN { \${^WARNING_BITS} = \$args"..., ARRAY(0x1268938e0), "UUUUUUUUUUUUUUUUUUU") called at /System/Library/Perl/5.30/Test/More.pm line 1009
# Test::More::use_ok("App::Lingua::BO::Wylie::Transliteration") called at /Library/Perl/5.30/Test/UseAllModules.pm line 71
# Test::UseAllModules::all_uses_ok() called at t/00-load.t line 4
# main::BEGIN() called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# eval {...} called at lib/App/Lingua/BO/Wylie/Transliteration.pm line 37
# Compilation failed in require at /Library/Perl/5.30/Test/UseAllModules.pm line 71.
# BEGIN failed--compilation aborted at /Library/Perl/5.30/Test/UseAllModules.pm line 71.
Bailout called. Further testing stopped: failed: App::Lingua::BO::Wylie::Transliteration
this is due to a recent change in Devel::Declare and a corresponding change in the parser in bleed described in these bug reports, report1 and report2.
A workaround is to install a an earlier version of perl together with an earlier version of Devel::Declare. You can do this using perlbrew. For example:
$ perlbrew install perl-5.26.3
$ cpanm Devel::Declare#0.006019
$ cpanm App::Lingua::BO::Wylie::Transliteration

FreeBSD Can't locate loadable object for module DBD::mysql

I installed DBD::mysql, but Perl does not recognize it:
root#bsd:~ # freebsd-version
13.0-RELEASE
root#bsd:~ # perl -v
This is perl 5, version 34, subversion 0 (v5.34.0) built for amd64-freebsd
Copyright 1987-2021, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
root#bsd:~ # perl -MDBD::mysql -el
Can't locate loadable object for module DBD::mysql in #INC (#INC contains: /usr/lib/perl5/site_perl/5.34.0/amd64-freebsd /usr/lib/perl5/site_perl/5.34.0 /usr/lib/perl5/5.34.0/amd64-freebsd /usr/lib/perl5/5.34.0) at -e line 0.
Compilation failed in require.
BEGIN failed--compilation aborted.
root#bsd:~ # cpan CGI
Reading '/root/.cpan/Metadata'
Database was generated on Thu, 26 Aug 2021 13:56:05 GMT
CPAN: Module::CoreList loaded ok (v5.20210520)
CGI is up to date (4.53).
root#bsd:~ # cpan DBD::mysql
Reading '/root/.cpan/Metadata'
Database was generated on Thu, 26 Aug 2021 13:56:05 GMT
CPAN: Module::CoreList loaded ok (v5.20210520)
DBD::mysql is up to date (4.050).
I suggest you to install it from the ports tree - https://www.freshports.org/databases/p5-DBD-mysql/

Can't locate Geo/Gpx.pm in #INC apache mac

Though there are many queries flowing around asking the same question. But here the error is thrown by apache instead of Perl.
I am trying to create an XML Response for the client on Mac OS X Mavericks and have written the perl script as follows:
#!/usr/bin/perl -wT
use lib '/opt/local/lib/perl5/site_perl/5.16.1/Geo';
use strict;
use CGI;
use Geo::Gpx;
open (FH, "/tmp/temp/file.txt") or print ("Unable to Open File");
my $gpx = Geo::Gpx->new;
my $cgi = CGI->new;
print $cgi->header(-type=>"text/gpx",-status=>"200 OK");
my $lon;
my #arr = <FH>;
foreach(#arr){
my %waypoints;
my $var = $_;
my #lat = split(/\s+/,$var);
##waypoints=split(/\s+/,$_);
$waypoints{$lat[0]}=$lat[1];
$waypoints{$lat[2]}=$lat[3];
$gpx->add_waypoint(\%waypoints);
}
my $xml = $gpx->xml;
print $xml;
open FILE, ">/tmp/temp/xmlfile.xml" or die $!;
print FILE $xml;
close (FILE);
close(FH);
For the apache to find the actual path of the Gpx.pm, I have used 'use lib' to show it the real path of the file.
Although this script is working perfectly on command line, my apache server is throwing the following error:
[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] Can't locate Geo/Gpx.pm in #INC
(#INC contains: /opt/local/lib/perl5/site_perl/5.16.1/Geo /Library/Perl/5.16/darwin-thread-multi-2level
/Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16
/Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16
/System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/Rachit/Sites/temp.pl line 7.
[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at /Users/Rachit/Sites/temp.pl line 7.
I have used macports and have found searching through the Web that Mavericks has got perl 5.16 preinstalled. So apache may be using that and perl is using the macport installed libraries.
On checking the paths mentioned by apache error_log file as I posted above, I have copied Gpx.pm in one of the libraries installed in Geo Folder but still not getting it resolved.
On running 'which perl' The result
/opt/local/bin/perl
And 'which cpan' is giving
/opt/local/bin/cpan
Kindly fix this issue as I am not able to move forward because of this. And I am not so familiar with apache.
/opt/local/lib/perl5/site_perl/5.16.1/Geo should be /opt/local/lib/perl5/site_perl/5.16.1/ as it will append the complete module name (replacing :: with /) to each path to find the files.

Premature end of script headers in perl scripts

I have problem in execution of perl scripts. I am using Alias for the directory of the server like that:
Alias /epbin3/ /opt/v-hosts/user/epbin/
<Location /epbin3>
AddHandler cgi-script .cgi .pl
# SetHandler cgi-script
# SetHandler perl-script
# PerlResponseHandler ModPerl::PerlRun
Options All
AllowOverride None
</Location>
When I'm trying to execute any perl file the browser return error 500.the error shown below:
[Sun Jun 09 15:50:19 2013] [error] [client ipClient] Premature end of script headers: searchHotelsTh4.pl
[Sun Jun 09 15:50:22 2013] [error] [client ipClient] (2)No such file or directory: exec of '/opt/v-hosts/epilgrim/epbin/searchHotelsTh4.pl' failed
Please anyone can tell me what's the problem and how I can solve this issue?
If I guess correctly than you have no Directory directive which allows the file access to the file system:
<Directory /opt/v-hosts/user/epbin/>
AddHandler cgi-script .cgi .pl
Options All
AllowOverride None
</Directory>
A properly formed HTTP reply contains a blank line between the headers and the body. It is likely that searchHotelsTh4.pl is lacking such a blank line, either because it does not output headers at all or the blank line is missing, i.e. you might have this:
Content-type: text/plain
Hello, world!
when you need this:
Content-type: text/plain
Hello, world!

Apache fastcgi catalyst Bugzilla REST api #INC issue

I am trying to set up Bugzilla REST api (bzapi) but I've hit a roadblock. I'm setting it up as a FastCGI prosess in a virtualhost in apache. I can execute the script from /var/www/bzapi by executing ./script/bugzilla_api_fastcgi.pl, but not from /var/www/bzapi/script using ./bugzilla_api_fastcgi.pl as a I get the same error as in apache.
The apache error:
[Tue Mar 06 15:04:49 2012] [warn] FastCGI: server "/var/www/bzapi/script/bugzilla_api_fastcgi.pl" started (pid 13329)
Can't locate Bugzilla/API.pm in #INC (#INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.1/Module/Runtime.pm line 317.
at /usr/local/share/perl/5.10.1/Catalyst/ScriptRunner.pm line 50
[Tue Mar 06 15:04:50 2012] [warn] FastCGI: server "/var/www/bzapi/script/bugzilla_api_fastcgi.pl" (pid 13329) terminated by calling exit with status '2'
The apache config:
FastCgiServer /var/www/bzapi/script/bugzilla_api_fastcgi.pl -processes 10 -idle-timeout 180
Alias /bzapi /var/www/bzapi/script/bugzilla_api_fastcgi.pl/
The script:
#!/usr/bin/env perl
use Catalyst::ScriptRunner;
Catalyst::ScriptRunner->run('Bugzilla::API', 'FastCGI');
1;
What's a clean way of solving this issue?
Add use lib lines to your script. Locate Api.pm file and add that line to your script. Maybe this works.
#!/usr/bin/env perl
use lib '/var/www/bzapi';
use Catalyst::ScriptRunner;
Catalyst::ScriptRunner->run('Bugzilla::API', 'FastCGI');
1;