Re: make mod_perl
when I run make test I get this: cc -c -fno-strict-aliasing -I/usr/local/include -O -DVERSION=\"1.31\" -DXS_VERSION=\"1.31\" -DPIC -fpic -I/usr/local/lib/perl5/5.6.0/i386-freebsd /CORE Symbol.c Symbol.xs: In function `XS_Apache__Symbol_cv_const_sv': Symbol.xs:106: `na' undeclared (first use in this function) Symbol.xs:106: (Each undeclared identifier is reported only once Symbol.xs:106: for each function it appears in.) *** Error code 1 Stop in /root/temp/mod_perl-1.24_01/Symbol. *** Error code 1 Stop in /root/temp/mod_perl-1.24_01 any suggestions? - Original Message - From: "Ilya" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 26, 2001 9:35 PM Subject: make mod_perl > I am trying to build mod_perl with apache, but cant get through iunitial > make. > I got apache 1.3.14 src and mod_perl > untared them, and run > perl Makefile.PL APACHE_SRC=../apache/src DO_HTTPD=1 USE_APACI=1 > EVERYTHING=1 > > i get this: > Will configure via APACI > Enter `q' to stop search > Please tell me where I can find your apache src > [] ../apache/src > cp apaci/Makefile.libdir ../apache/src/modules/perl/Makefile.libdir > cp apaci/Makefile.tmpl ../apache/src/modules/perl/Makefile.tmpl > cp apaci/README ../apache/src/modules/perl/README > cp apaci/configure ../apache/src/modules/perl/configure > cp apaci/libperl.module ../apache/src/modules/perl/libperl.module > cp apaci/mod_perl.config.sh ../apache/src/modules/perl/mod_perl.config.sh > cp apaci/load_modules.pl.PL ../apache/src/modules/perl/load_modules.pl.PL > cp apaci/find_source.PL ../apache/src/modules/perl/find_source.PL > cp apaci/apxs_cflags.PL ../apache/src/modules/perl/apxs_cflags.PL > cp apaci/mod_perl.exp ../apache/src/modules/perl/mod_perl.exp > * WARNING * > > Apache Version 1.3.0 required, aborting... > > * WARNING * > > though the folder is called apache, it is apache 1.3.14 nevertheless. > > any suggestions? > > thx > >
Re: make mod_perl
when I run make test I get this: cc -c -fno-strict-aliasing -I/usr/local/include -O -DVERSION=\"1.31\" -DXS_VERSION=\"1.31\" -DPIC -fpic -I/usr/local/lib/perl5/5.6.0/i386-freebsd /CORE Symbol.c Symbol.xs: In function `XS_Apache__Symbol_cv_const_sv': Symbol.xs:106: `na' undeclared (first use in this function) Symbol.xs:106: (Each undeclared identifier is reported only once Symbol.xs:106: for each function it appears in.) *** Error code 1 Stop in /root/temp/mod_perl-1.24_01/Symbol. *** Error code 1 Stop in /root/temp/mod_perl-1.24_01 any suggestions? - Original Message - From: "Ilya" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 26, 2001 9:35 PM Subject: make mod_perl > I am trying to build mod_perl with apache, but cant get through iunitial > make. > I got apache 1.3.14 src and mod_perl > untared them, and run > perl Makefile.PL APACHE_SRC=../apache/src DO_HTTPD=1 USE_APACI=1 > EVERYTHING=1 > > i get this: > Will configure via APACI > Enter `q' to stop search > Please tell me where I can find your apache src > [] ../apache/src > cp apaci/Makefile.libdir ../apache/src/modules/perl/Makefile.libdir > cp apaci/Makefile.tmpl ../apache/src/modules/perl/Makefile.tmpl > cp apaci/README ../apache/src/modules/perl/README > cp apaci/configure ../apache/src/modules/perl/configure > cp apaci/libperl.module ../apache/src/modules/perl/libperl.module > cp apaci/mod_perl.config.sh ../apache/src/modules/perl/mod_perl.config.sh > cp apaci/load_modules.pl.PL ../apache/src/modules/perl/load_modules.pl.PL > cp apaci/find_source.PL ../apache/src/modules/perl/find_source.PL > cp apaci/apxs_cflags.PL ../apache/src/modules/perl/apxs_cflags.PL > cp apaci/mod_perl.exp ../apache/src/modules/perl/mod_perl.exp > * WARNING * > > Apache Version 1.3.0 required, aborting... > > * WARNING * > > though the folder is called apache, it is apache 1.3.14 nevertheless. > > any suggestions? > > thx > >
make mod_perl
I am trying to build mod_perl with apache, but cant get through iunitial make. I got apache 1.3.14 src and mod_perl untared them, and run perl Makefile.PL APACHE_SRC=../apache/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 i get this: Will configure via APACI Enter `q' to stop search Please tell me where I can find your apache src [] ../apache/src cp apaci/Makefile.libdir ../apache/src/modules/perl/Makefile.libdir cp apaci/Makefile.tmpl ../apache/src/modules/perl/Makefile.tmpl cp apaci/README ../apache/src/modules/perl/README cp apaci/configure ../apache/src/modules/perl/configure cp apaci/libperl.module ../apache/src/modules/perl/libperl.module cp apaci/mod_perl.config.sh ../apache/src/modules/perl/mod_perl.config.sh cp apaci/load_modules.pl.PL ../apache/src/modules/perl/load_modules.pl.PL cp apaci/find_source.PL ../apache/src/modules/perl/find_source.PL cp apaci/apxs_cflags.PL ../apache/src/modules/perl/apxs_cflags.PL cp apaci/mod_perl.exp ../apache/src/modules/perl/mod_perl.exp * WARNING * Apache Version 1.3.0 required, aborting... * WARNING * though the folder is called apache, it is apache 1.3.14 nevertheless. any suggestions? thx
Problems
Not sure if this is the right list, but.. I'm running mod_perl on RedHat 7. I installed the new PHP updates and all of a sudden it broke mod_perl.. I get this in my error_log [Fri Jan 26 15:49:20 2001] [notice] child pid 7766 exit signal Segmentation fault (11) [Fri Jan 26 15:49:21 2001] [notice] child pid 7764 exit signal Segmentation fault (11) [Fri Jan 26 15:49:24 2001] [notice] child pid 7765 exit signal Segmentation fault (11) [Fri Jan 26 15:53:24 2001] [notice] SIGHUP received. Attempting to restart Subroutine connect_on_init redefined at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 31. Subroutine setPingTimeOut redefined at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 45. Subroutine connect redefined at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 58. Subroutine childinit redefined at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 132. Subroutine cleanup redefined at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 149. Subroutine all_handlers redefined at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 163. Subroutine disconnect redefined at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 179. [Fri Jan 26 15:53:27 2001] [notice] Apache/1.3.14 (Unix) (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 mod_perl/1.24 configured -- resuming normal operations When I try running the .pl file from the shell, it works fine. When I connect via the web, it dies. Can *ANYONE* help me?? Thanks! David Wolf
Re: difficulties compiling 1.24_01
On Fri, 26 Jan 2001, Doug MacEachern wrote: > On Fri, 26 Jan 2001, Mark A. Downing wrote: > > > and it appears that there is NO perlxsi.c in /apache_1.3.14/src/modules/perl > > hmm, i don't see how that's possible, mod_perl will not compile without > it. UM... I just recompiled mod_perl and behold #if defined(__cplusplus) && !defined(PERL_OBJECT) #define is_cplusplus #endif #ifdef is_cplusplus extern "C" { #endif #include #include #ifdef PERL_OBJECT #define NO_XSLOCKS #include #include "win32iop.h" #include #include #endif #ifdef is_cplusplus } # ifndef EXTERN_C #define EXTERN_C extern "C" # endif #else # ifndef EXTERN_C #define EXTERN_C extern # endif #endif EXTERN_C void xs_init _((void)); EXTERN_C void boot_DynaLoader _((CV* cv)); EXTERN_C void xs_init(void) { char *file = __FILE__; dXSUB_SYS; /* DynaLoader is a special case */ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); } > what does this print: > > % nm /apache_1.3.14/src/httpd | grep boot_ 0811d988 T Perl_boot_core_UNIVERSAL 080c4478 T boot_DynaLoader 08141614 d perl_sections_boot_module > % nm /apache_1.3.14/src/httpd | grep xs_init 08079cb8 T xs_init I still get the error about Apache::Constants when running make test. This DOESN'T occur when I compile against apache_1.3.12. I'm puzzled. --Mark Stratasource, Inc. 30 Executive Park, Suite 260 Irvine, CA 92714 Phone:(949)260-0418 x505
RE: Prototype mismatch in Apache::PerlRun line 343
Unfortunately the following line doesn't work: eval "*{\$fullname}($p) = sub {}"; It probably should be: eval "*{\$fullname} = sub ($p) {}"; The latter works on my Linux and Solaris tests. Wenzhong Tang [EMAIL PROTECTED] -Original Message- From: Doug MacEachern [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 25, 2001 11:03 PM To: Wenzhong Tang Cc: [EMAIL PROTECTED] Subject: RE: Prototype mismatch in Apache::PerlRun line 343 On Wed, 17 Jan 2001, Wenzhong Tang wrote: > Since nobody seems care about this problem, I have to find a solution > myself. Fortunately perl has a "prototype" function that returns the > prototype of a function. Here is the difference between the original > PerlRun.pm in mod_perl 1.24_01 and the updated one: thanks for you patch, however this is not valid Perl syntax: > > eval "\$mysub = sub {$proto} {}"; below is a different version, does it still quiet the warnings? Index: lib/Apache/PerlRun.pm === RCS file: /home/cvs/modperl/lib/Apache/PerlRun.pm,v retrieving revision 1.34 diff -u -r1.34 PerlRun.pm --- lib/Apache/PerlRun.pm 2001/01/12 15:45:12 1.34 +++ lib/Apache/PerlRun.pm 2001/01/26 06:58:39 @@ -340,7 +340,12 @@ if (defined &$fullname) { no warnings; local $^W = 0; -*{$fullname} = sub {}; +if (my $p = prototype $fullname) { +eval "*{\$fullname}($p) = sub {}"; +} +else { +*{$fullname} = sub {}; +} undef &$fullname; } if (*{$fullname}{IO}) {
Problems w/ mod_perl 1.24_01 & apache 1.3.14 -- causing segmentation faults.
I've been trying to install mod_perl 1.24_01 the following way: (with perl 5.6.0) perl Makefile.PL \ APACHE_PREFIX=/usr/local/apache \ APACHE_SRC=../apache_1.3.14/src \ DO_HTTPD=1 \ USE_APACI=1 \ EVERYTHING=1 \ APACI_ARGS='--enable-module=rewrite --enable-module=expires --enable-module=mime_magic --enable-module=so --enable-rule=SHARED_CORE' I'm passing the args SHARED_CORE and 'so' module b/c I'm running PHP as a DSO. Anyway.. whenever I do this and run apachectl start, it always causes segmentation faults (and if I lynx to localhost it will say 'unexpected network error'). Any ideas? Thanks for any help. / wells // [EMAIL PROTECTED] " i saved latin. what did you ever do? "
Obtaining results from trigger
Hello everyone, I was hoping someone could help me with this... I'm running postgres 7.02 on redhat 6.2, apache 1.3.14 and mod_perl 1.24_01. I'm also using perl modules DBI 1.14 and DBD-Pg-0.95 to acces the Postgres database. Everytime my inventory file gets updated, I would like to have the quantity on hand returned to my perl script. I set up the following function to do this: CREATE FUNCTION inv_lookup () RETURNS OPAQUE AS ' BEGIN RAISE NOTICE ''%'', NEW.qtyonhand; RETURN new; end; 'language 'plpgsql'; Then I create the trigger like this... CREATE TRIGGER qty after inventory for each row execute procedure inv_lookup(); If I do any sort of updates from within psql I get the correct data which is the Qtyonhand field in this format: NOTICE: 15 However, in my perl program, I'm unsure as to how to get this information back. The Postgres Documentation says that the results from a Notice get sent back to the application, but I check the DBI->err, DBI->errstr, and DBI->state and they are empty. The result code for the actual SQL command I run is just 1 for success. Does anyone know how to get these results from within a perl scripts??? Thanks in advance for any help. Chris.
RE: applicationontent-Type?
> > I've been getting these occassional errors from libapreq, 1 every couple > > days: > > > > [Thu Jan 25 15:54:33 2001] [error] [client 64.12.102.22] [libapreq] > > unknown content-type: `applicationontent-Type: > application/x-www-form-urlencoded\' Alright, I'm gonna toss my $.02 into this: This *really* looks like bad string handling. Specifically, the kind of annoyance people can see when using strncat(3) and forgetting what end of string was agreed on for the local project. Now, I don't pretend to have that much insider info, but I recently had to code an app that had to send different reponses to AOL because AOL's instantiation of the Explorer object is deliberately broken. In doing so, I found that all AOL requests are made using an HTTP Proxy. if ( $r->header_in('Via') =~ m!Traffic-Server! and $r->header_in('User-Agent') =~ /AOL \d(\.d)?/ ) So presumably something that's handling /proxy reponses/ is hiccuping. L8r Rob
Re: applicationontent-Type?
On Thu, 25 Jan 2001 [EMAIL PROTECTED] wrote: > I've been getting these occassional errors from libapreq, 1 every couple > days: > > [Thu Jan 25 15:54:33 2001] [error] [client 64.12.102.22] [libapreq] > unknown content-type: `applicationontent-Type: application/x-www-form-urlencoded\' > > It's always an AOL user agent, but not always the same one. I added > Apache::DumpHeaders today and caught one after a couple hours: > > POST /poll/iIDEre/results HTTP/1.0 > Accept: */* > Accept-Encoding: gzip, deflate > Accept-Language: en-us > Content-Length: 20 > Content-Type: applicationontent-Type: application/x-www-form-urlencoded yikes. you could work around this like so (untested): sub AOL::fixup { my $r = shift; my $ct = $r->header_in('content-type'); if ($ct =~ s/^\S+:\s*//) { $r->header_in('content-type', $ct); } 0; } PerlFixupHandler AOL::fixup libapreq could probably deal with this internally, maybe by assuming content-type is DEFAULT_ENCTYPE if it is unable to find an exact match.
Re: difficulties compiling 1.24_01
On Fri, 26 Jan 2001, Mark A. Downing wrote: > and it appears that there is NO perlxsi.c in /apache_1.3.14/src/modules/perl hmm, i don't see how that's possible, mod_perl will not compile without it. i just tried with the same Makefile.PL options and Perl version, no problems. what does this print: % nm /apache_1.3.14/src/httpd | grep boot_ and % nm /apache_1.3.14/src/httpd | grep xs_init
Re: difficulties compiling 1.24_01
On Thu, 25 Jan 2001, Doug MacEachern wrote: > hmm, seems to be a couple of these. > there is no 'loadable object file' for Apache::Constants, its linked > static by default (changed only if you pass DYNAMIC=1 to > Makefile.PL). what does src/modules/perl/perlxsi.c look like in your > apache-x.xx tree? your Makefile.PL options and perl -V would be useful > too. Hi Doug! Here you go... To build.. perl Makefile.PL EVERYTHING=1 and it appears that there is NO perlxsi.c in /apache_1.3.14/src/modules/perl perl -V: This is perl, version 5.005_03 built for i686-linux Copyright 1987-1999, 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.0 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.com/, the Perl Home Page. [mdowning@www mdowning]$ perl -V Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=linux, osvers=2.2.14, archname=i686-linux uname='linux www.wm7d.net 2.2.14 #3 smp wed feb 23 14:29:14 pst 2000 i686 unknown ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include' ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include' stdchar='char', d_stdstdio=undef, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt libc=, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Built under linux Compiled at May 10 2000 13:37:24 @INC: /usr/local/lib/perl5/5.00503/i686-linux /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/i686-linux /usr/local/lib/perl5/site_perl/5.005
Re: PerlTaintMode and PERL5LIB/PERL5OPT env vars.
On Tue, 9 Jan 2001, Stas Bekman wrote: > I've lost the original email, but this is reply from Doug to my > email. I've asked to confirm that PERL5LIB is ignored with PerlTaintMode > is on. Apparently the Perl docs say a different thing... > > Anybody has any insights about this situation? Does it has anything to do > with Perl versions? ... > But according to perlrun manpage (dist 5.00503): > >PERL5LIBA colon-separated list of directories in which mod_perl special cases this one, from mod_perl.c: char *path = (char *)table_get(r->subprocess_env, "PERL5LIB"); if (path) { perl_incpush(path); MP_INCPUSH_on(cld); } > >PERL5OPTCommand-line options (switches). Switches in there is not special case for this, it was ignored last time i checked. 5.6.0 has some taint related bugs so it could be related to that. where/how do you set PERL5OPT ?
Re: Apache::SIG kills the process
On Tue, 9 Jan 2001, Stas Bekman wrote: > I was rewriting the detecting 'STOP' button pressed section in the guide, > to notice that Apache::SIG kills the process under Apache::Registry. > > httpd.conf: > > PerlFixupHandler Apache::SIG why are you using Apache::SIG at all? its no longer required as of 1.3.6-ish. if the client goes away writes are noops, you can test $r->connection->aborted if you want to know the client has gone away.
Re: missing docs
On Thu, 4 Jan 2001, Vivek Khera wrote: > In answering another question today, I noticed that the variable > $Apache::Registry::NameWithVirtualHost is not documented in the > perldoc for Apache::Registry. > > While scanning the Registry.pm file, I further noticed that there is a > call to $r->get_server_name for the virtual host name. This too is > not documented in perldoc Apache. The only documented way I see to > get this from the $r object is to use $r->server->server_hostname. i think you'll find plenty more that is not documented in the pods. when i started working on the eagle book with lincoln, i focused all documention effort there. i had hoped at some point the mod_perl docs would get a major overhaul, just hasn't happened yet. but patches have been coming in to fill holes, more are always welcome. > Should $r->get_server_name() be documented, or is it a "private" > method? It seems wasteful to create an Apache::Server object just to > fetch the virtual host name. $r->get_server_name is public, and is already used in Registry/PerlRun, but $r->server->is_virtual is still used.
Re: problem to configure perl with apache
I would suggest that you visit www.apachetoolbox.com and get the toolbox. Use that to install. Since it uses sources that are known to work with each other, it should be relatively painless. It should come off without a hitch. Also, next time you post, you might want to mention what your platform is (Linux, Unix, NT, etc.). You also need to be accurate about what versions you have installed. I'm pretty sure you "fat fingered" the Apache version. Perl hasn't been version 1 since...well, let's just say that version 1 is older than I am :) and leave it at that. I'd also suggest that if you are having problems with the httpd.conf you get a copy of O'Reilly's Apache The Definitive Guide. You can get it for cheap at www.bookpool.com. The whole book is pretty much devoted to the httpd.conf and goes into it in far more detail than you can get from a mailing list. HTH, "initiative.fr : COUTEL Jean-Francois" wrote: > Hello It is my first install of perl and i have problem I have install > APACHE 10.3.14 with APXS, PHP 4.0.3 pl1 with APXS, mysql and > mod_perl-1.24_01 with apxs apache, php and mysql are okperl is install > but i can't use it can you help me about- configuration of httpd.conf > for perl- other configuration file?- file exemple to > test Thanks Jean-Francois [EMAIL PROTECTED] -- Jimi Thompson Web Master Link.com "It's the same thing we do every night, Pinky."
Location vs Directory directives
All, Having read the writing apaches module book, I have noted all the examples for installing handlers use the Location directive. Are there any hidden side affects from setting up a handler within an Apache Directory directive? Thanks for any advice! AS
Re: Can't connect to Oracle in mod_perl ????
Yes, now it is OK THANK YOU !! THX :-))) Regards Irek Smaczny
Re: problem to configure perl with apache
Hi there, On Fri, 26 Jan 2001, initiative.fr : COUTEL Jean-Francois wrote: > It is my first install of perl and i have problem > > I have install APACHE 10.3.14 with APXS, PHP 4.0.3 pl1 with APXS, mysql and >mod_perl-1.24_01 with apxs > > apache, php and mysql are ok > perl is install but i can't use it There isn't enough information here to figure out what kind of a problem you have. Please read the file called SUPPORT in the mod_perl directory, (and please make sure your information is accurate next time you post:). 73, Ged.
Re: Can't connect to Oracle in mod_perl ????
Could you help me with this sollution ? I understand, that I must change Makefile.PL line $::opt_b = 1 to $::opt_b = 0 It is correct ? (and install again) Regards Irek Smaczny
RE: Can't connect to Oracle in mod_perl ????
> -Original Message- > From: Irek [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 26, 2001 6:52 AM > To: mod_perl list > Subject: Re: Can't connect to Oracle in mod_perl > > > Use of inherited AUTOLOAD for non-method DBD::Oracle::ORA_OCI() is > deprecated at > /usr/lib/perl5/site_perl/5.005/i386-linux/DBD/Oracle.pm line > 48. I think I remember seeing this when DBD::Oracle 1.04 first came out and I was playing with stuff... try rebuilding DBD::Oracle after applying the following patch to 1.06: --- Makefile.PL.old Wed Nov 29 13:11:39 2000 +++ Makefile.PL Wed Nov 29 13:11:55 2000 @@ -67,7 +67,7 @@ my %mk_target_rules; # Options (rarely needed) -$::opt_b = 1; # try to use Oracle's own 'build' rule +$::opt_b = 0; # try to use Oracle's own 'build' rule $::opt_m = 0; # path to proc.mk or oracle.mk file to read $::opt_p = ''; # alter preference for oracle.mk over proc $::opt_n = ''; # Oracle .mk macro name to use for library list to link with HTH --Geoff
problem to configure perl with apache
Hello It is my first install of perl and i have problem I have install APACHE 10.3.14 with APXS, PHP 4.0.3 pl1 with APXS, mysql and mod_perl-1.24_01 with apxs apache, php and mysql are ok perl is install but i can't use it can you help me about - configuration of httpd.conf for perl - other configuration file? - file exemple to test Thanks Jean-Francois COUTEL [EMAIL PROTECTED]
Re: Can't connect to Oracle in mod_perl ????
After using: $dbh = DBI->connect( "dbi:Oracle:$inst", $user, $pass, { AutoCommit => 0, RaiseError => 1, PrintError => 0 } ) or print "ERROR : $DBI::errstr\n"; in error_log I found: Use of inherited AUTOLOAD for non-method DBD::Oracle::ORA_OCI() is deprecated at /usr/lib/perl5/site_perl/5.005/i386-linux/DBD/Oracle.pm line 48. What can I do with this ? Regards Irek Smaczny [EMAIL PROTECTED]
Re: Can't connect to Oracle in mod_perl ????
> /var/log/httpd/error_log: > [Fri Jan 26 11:12:16 2001] [notice] Apache/1.3.12 (Unix) (Red Hat/Linux) > PHP/3.0.15 mod_perl/1.21 configured -- resuming normal operations > <> > > What else ???// > > Regards > Irek Smaczny If you have RaiseError => 1 in your DBI->connect() you will get to see what's wrong in your error log likely. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Can't connect to Oracle in mod_perl ????
Are you thinking about httpd log ? After restart httpd: /var/log/httpd/access_log: 193.59.181.45 - - [26/Jan/2001:11:12:29 +0100] "GET /cgi-bin/ora_test.cgi HTTP/1.1" 200 60 193.59.181.45 - - [26/Jan/2001:11:12:39 +0100] "GET /mod-perl/ora_test.cgi HTTP/1.1" 200 28 /var/log/httpd/error_log: [Fri Jan 26 11:12:16 2001] [notice] Apache/1.3.12 (Unix) (Red Hat/Linux) PHP/3.0.15 mod_perl/1.21 configured -- resuming normal operations <> What else ???// Regards Irek Smaczny
Re: Can't connect to Oracle in mod_perl ????
Hi there, On Fri, 26 Jan 2001, Irek wrote: > When I started this script in httpd in mod_perl like > http://_adres_/mod-perl/ora_test.cgi script writes only POINT1 !! Have you looked in the error_log? 73, Ged.
Re: Text::Template and passing in variables; going bug nuts!
> Where I'm getting hosed is that %config and %session have data > I need visible to the Text::Template objects themselves. I've > RTFM'ed until my eyes are pink, and I see no options short of > copying variables wholesale into another Package, but then I > still can't get at them and "use strict" can I? Text::Template has a flexible interface. Put everything into a specific package, or use the HASH option to fill_in(). Use references, not copies. Your sample code has some stuff in it that looks a little scary to me. Do you really want to make %config, %dispatcher, $page, $frame, $command, %session, and %templates into class variables? Maybe instance variables would make more sense. (These are closures variables as well, so they'll keep their values from one request to the next.) And building methods that change class variables instead of actually returning something is kind of obfuscated. But maybe I just don't understand what you're doing from these small snippets. - Perrin
Re: Text::Template and passing in variables; going bug nuts!
Maybe I'm missing something here, but can't you just use use strict; use vars qw(%config %session); or better yet, fully qualify your variables %MyApp::Framework::config; %MyApp::Framework::session; The mod_perl guide has excellent sections on this: http://perl.apache.org/guide/perl.html#Using_Global_Variables_and_Shari http://perl.apache.org/guide/performance.html#Global_vs_Fully_Qualified_Varia Also, there are a couple of useful modules on CPAN for inheriting class data, not sure if they will apply in your case: http://cpan2.org/Asset/display?dist=Class-Data-Inheritable http://cpan2.org/Asset/display?dist=foundation > Where I'm getting hosed is that %config and %session have data > I need visible to the Text::Template objects themselves. I've > RTFM'ed until my eyes are pink, and I see no options short of > copying variables wholesale into another Package, but then I > still can't get at them and "use strict" can I? _ T.J. Mather http://tjmather.com http://cpan2.org/ New CPAN Search Engine http://www.anidea.com/ Digital Asset Management http://www.theinnkeeper.com/Bed and Breakfast Directory
Can't connect to Oracle in mod_perl ????
Hi I'm using RedHat6.2 + mod_perl 1.21 + perl 5.005_003 + Apache 1.3.12 (all instaled with RH6.2) + X (gnome + kde). I instaled Oracle 8.1.6 + modles Hires + DBI 1.14 + DBD-Oracle 1.06. I write simple script : #!/usr/bin/perl use DBI; my ( $inst, $user, $pass, $dbh); print "Content-type: text/html\n\n"; $inst = "" ; $user = "scott" ; $pass = "tiger" ; print "POINT 1 \n"; my $dbh = DBI->connect( "dbi:Oracle:$inst", $user, $pass, { AutoCommit => 0, RaiseError => 0, PrintError => 0 } ) or print "ERROR : $DBI::errstr\n"; print "POINT 2 \n"; $dbh->disconnect; print "POINT 3 \n"; User Oracle has in .bash_profile: ORACLE_BASE=/home/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=/home/u01/app/oracle/product/8.1.6; export ORACLE_HOME ORACLE_SID=ora1; export ORACLE_SID PATH=$PATH:/home/u01/app/oracle/product/8.1.6/bin; export PATH CLASSPATH=.:/home/u01/app/oracle/product/8.1.6/jdbc/lib/classes111.zip; export CLASSPATH LD_LIBRARY_PATH=/home/u01/app/oracle/product/8.1.6/lib; export LD_LIBRARY_PATH ORA_NLS33=/home/u01/app/oracle/product/8.1.6/ocommon/nls/admin/data; export ORA_NLS33 NLS_LANG=american; export NLS_LANG In httpd.conf I have to directories/locations: ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/" SetEnv ORACLE_BASE /home/u01/app/oracle SetEnv ORACLE_HOME /home/u01/app/oracle/product/8.1.6 SetEnv ORACLE_SID ora1 SetEnv CLASSPATH .:/home/u01/app/oracle/product/8.1.6/jdbc/lib/classes111.zip SetEnv LD_LIBRARY_PATH /home/u01/app/oracle/product/8.1.6/lib SetEnv ORA_NLS33 /home/u01/app/oracle/product/8.1.6/ocommon/nls/admin/data SetEnv NLS_LANG american SetEnv PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/home/u01/app/oracle/product/8. 1.6/bin AllowOverride AuthConfig FileInfo Indexes Limit Options Options ExecCGI Order allow,deny Allow from all Alias /mod-perl/ /home/httpd/mod-perl/ PerlSetEnv ORACLE_BASE /home/u01/app/oracle PerlSetEnv ORACLE_HOME /home/u01/app/oracle/product/8.1.6 PerlSetEnv ORACLE_SID ora1 PerlSetEnv CLASSPATH .:/home/u01/app/oracle/product/8.1.6/jdbc/lib/classes111.zip PerlSetEnv LD_LIBRARY_PATH /home/u01/app/oracle/product/8.1.6/lib PerlSetEnv ORA_NLS33 /home/u01/app/oracle/product/8.1.6/ocommon/nls/admin/data PerlSetEnv NLS_LANG american PerlSetEnv PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/home/u01/app/oracle/product/8. 1.6/bin Options ExecCGI SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On When I started this script in telnet user oracle (perl ora_test.cgi) all is ok - script writes POINT1, POINT2, POINT3. When I started this script in httpd in cgi-bin like http://_adres_/cgi-bin/ora_test.cgi all is ok and script writes POINT1, POINT2, POINT3 When I started this script in httpd in mod_perl like http://_adres_/mod-perl/ora_test.cgi script writes only POINT1 !! What can I do ? PLEASE HELP !!! Regards Irek Smaczny