T
Tony
Hi All,
I have just compiled perl 5.8.0 on aix 4.3.3. I got the stable.tar
from cpan. It complied fine without any errors. The trouble starts
when I try to use it to write cgi scripts.
Here's the really basic test cgi script I tried
#!/usr/local/bin/perl
use CGI qw
standard);
print header;
print "<h1> Hello World<h1>\n";
When I run it from a web browser I get the following in the apache
error log and a "Internal Sever Error" error on the browser.
Can't locate CGI.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.0/aix /usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/aix
/usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .)
at test.cgi line 3.
BEGIN failed--compilation aborted at test.cgi line 3.
Now if I run it from a unix shell as ./test.cgi I get this
ts> ./test.cgi
Content-Type: text/html; charset=ISO-8859-1
<h1> Hello</h1>
ts>
I don't understand why this is happening when it works from the
command line but not when it is used by the web server.
The error that is in the apache logs shows the correct @INC
If I do a "which perl" from the command line it's the right one
ts> which perl
/usr/local/bin/perl
ts>
Here's the out put from perl -V
ts> perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
Platform:
osname=aix, osvers=4.3.3.0, archname=aix
uname='aix tonysbox 3 4 004079284c00 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=unde
f
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-DUSE_NAT
IVE_DLOPEN -fno-strict-aliasing -D_LARGE_FILES',
optimize='-O',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-DUSE_NATIVE_DLOPEN
-fno-strict-aliasing'
ccversion='', gccversion='3.2.3', gccosandvers='aix4.3.2.0'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize
=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -Wl,-brtl -L/usr/local/lib -Wl,-b32'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW
perllibs=-lbind -lnsl -ldl -lld -lm -lc -lcrypt -lbsd -lPW
libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Xlinker
-bE:/usr/loc
al/lib/perl5/5.8.0/aix/CORE/perl.exp'
cccdlflags=' ', lddlflags=' -Wl,-bhalt:4 -Wl,-bM:SRE
-Wl,-bI:$(PERL_INC)/pe
rl.exp -Wl,-bE:$(BASEEXT).exp -Wl,-bnoentry -lc -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under aix
Compiled at Aug 19 2003 17:49:03
@INC:
/usr/local/lib/perl5/5.8.0/aix
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/aix
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
I have just compiled perl 5.8.0 on aix 4.3.3. I got the stable.tar
from cpan. It complied fine without any errors. The trouble starts
when I try to use it to write cgi scripts.
Here's the really basic test cgi script I tried
#!/usr/local/bin/perl
use CGI qw
print header;
print "<h1> Hello World<h1>\n";
When I run it from a web browser I get the following in the apache
error log and a "Internal Sever Error" error on the browser.
Can't locate CGI.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.0/aix /usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/aix
/usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .)
at test.cgi line 3.
BEGIN failed--compilation aborted at test.cgi line 3.
Now if I run it from a unix shell as ./test.cgi I get this
ts> ./test.cgi
Content-Type: text/html; charset=ISO-8859-1
<h1> Hello</h1>
ts>
I don't understand why this is happening when it works from the
command line but not when it is used by the web server.
The error that is in the apache logs shows the correct @INC
If I do a "which perl" from the command line it's the right one
ts> which perl
/usr/local/bin/perl
ts>
Here's the out put from perl -V
ts> perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
Platform:
osname=aix, osvers=4.3.3.0, archname=aix
uname='aix tonysbox 3 4 004079284c00 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=unde
f
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-DUSE_NAT
IVE_DLOPEN -fno-strict-aliasing -D_LARGE_FILES',
optimize='-O',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-DUSE_NATIVE_DLOPEN
-fno-strict-aliasing'
ccversion='', gccversion='3.2.3', gccosandvers='aix4.3.2.0'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize
=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -Wl,-brtl -L/usr/local/lib -Wl,-b32'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW
perllibs=-lbind -lnsl -ldl -lld -lm -lc -lcrypt -lbsd -lPW
libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Xlinker
-bE:/usr/loc
al/lib/perl5/5.8.0/aix/CORE/perl.exp'
cccdlflags=' ', lddlflags=' -Wl,-bhalt:4 -Wl,-bM:SRE
-Wl,-bI:$(PERL_INC)/pe
rl.exp -Wl,-bE:$(BASEEXT).exp -Wl,-bnoentry -lc -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under aix
Compiled at Aug 19 2003 17:49:03
@INC:
/usr/local/lib/perl5/5.8.0/aix
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/aix
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl