Re: Problem with Apache::LogFile
i think you need to compile with perl Makefile.PL PERL_DIRECTIVE_HANDLERS=1 or EVERYTHING=1 On Tue, 23 Jan 2001, Liddick, Scott wrote: > I am currently writing a PerlLogHandler that will (hopefully) write request > info to a rolling logfile in a pipe delimeted format for hourly loading via > Oracle SQL*Load into a database (I know about Apache::LogDBI, but my DBA > group will not let me do this). I wish to use Apache::LogFile to utilize > the Apache logging mechanisms to allow all httpd children to write to a > common file w/o having to worry about flocking or other methods to allow > write access by many processes. The environment is Apache 1.3.12/mod_perl > 1.21. Apache::LogFile seems to compile ok, but when I try to initialize the > log handle in a startup.pl script, I get this error: > > Can't load > '/opt/merc/perl/5.005_03/lib/site_perl/5.005/i686-linux/auto/Apache/LogFile/ > Config/Config.so' for module Apache::LogFile::Config: > /opt/merc/perl/5.005_03/lib/site_perl/5.005/i686-Linux/auto/Apache/LogFile/C > onfig/Config.so: undefined symbol: perl_cmd_perl_TAKE2 at > /opt/merc/perl/5.005_03/lib/5.00503/i686-linux/DynaLoader.pm line 169. > > I read about the args_how directive parsing stuff, and found this symbol in > mod_perl.h and a few other places but really don't know what I am doing. > Can anyone point me in the right direction for getting this module properly > installed? Is there a special way that I need to build Apache/mod_perl? > Help. > > Thanks, > Scott >
Re: header_out/AUTH_REQUIRE
On Mon, 22 Jan 2001, Thomas Plathe wrote: > Hello, > > In my PerlAuthenHandler I need to send back the WWW-Authenticate-line. > I use $r->headers_out("WWW-Authenticate" => 'basic realm => "MyName"'). > But if i returned from the Handler with "return AUTH_REQUIRED" , Apache > doesn't send this line in the header. > Do I need something else ? you shouldn't need to set the WWW-Authenticate header yourself, apache has an api for that. see modperl.com chapter 6.
Re: dir_config at startup: I know what doesn't work, so what does?
On Mon, 22 Jan 2001, Christopher L. Everett wrote: > variable at server startup, using my startup.pl: ... > $config{DBI_DSN} = Apache->server->dir_config('DBI_DSN'); ... > PerlSetVar DBI_DSN "DBI:mysql:exchange_db" is your PerlSetVar before or after PerlRequire for startup.pl? it must come before for your code to work, which it should, works just fine for me.
Re: mod_perl confusion.
this is supposed to be fixed (again) in 1.23. an alternative is to switch Apache::Registry to Apache::RegistryNG which uses $r->filename rather than $r->uri for the namespace. On Thu, 4 Jan 2001, Tom Karlsson wrote: > Hello All, > > I've recently looked through the mod_perl mail archives in order to find > someone who has/had the same problem as me. > > It seems that a lot of people have had problems with and > in situations where both virtualhost sections has a similar > URI and scriptname. > > This problem causes random execution of either of the scripts no matter > what virtualhost you're accessing. Like > > exampleA.com/cgi-bin/script > exampleB.com/cgi-bin/script > > (content of script is different for each host) > > Accessing exampleB.com/cgi-bin/script might provide you with the output of > script you'd get accessing exampleA.com/cgi-bin/script. > > According to documentation this was a bug in mod_perl versions < 1.15_01, > however I still experience the very same problems with version 1.24. It > seems others has experienced it aswell. > > Anyway, I haven't been able to find any actual solutions to this. > > Could someone please clarify whether mod_perl works in a virtualhost > environment under the conditions describe above (with same URI and > scriptname)?. if yes, would this person be kind enough to provide an > example configuration?. > > > Thanks. > > Friendly Regards > /TK >
Re: detecting Apache::Log et al
On Thu, 18 Jan 2001, Matt Sergeant wrote: > I know we've been over this before, but I think I've forgotten! > > How do I detect if Apache::Log got compiled in a module's Makefile.PL ? > > I can't do eval("use Apache::Log;") because Apache/Log.pm gets installed > regardless, its just that the Log.so doesn't get compiled. So, how do I do > it? with current cvs: use Apache::MyConfig (); if ($Apache::MyConfig::Setup{PERL_LOG_API}) { ... }
Re: cannot execute my cgi perls
On Wed, 17 Jan 2001, G.W. Haywood wrote: > Hi G, > > On Wed, 17 Jan 2001, Gustavo Vieira Goncalves Coelho Rios wrote: > > > [Wed Jan 17 18:04:41 2001] [error] [client 192.168.1.11] Premature end > > of script headers: /home/grios/.public_html/cgi-bin/bench3.cgi > > Who knows? Something isn't finishing what it started. Post the script. 'Premature end of script headers' is an error from mod_cgi, so this script is not even running under mod_perl.
Re: Redirecting a multipart/form-data POST request
On Tue, 16 Jan 2001, Darren Stuart Embry wrote: > On 2001-01-15, Ask Bjoern Hansen <[EMAIL PROTECTED]> wrote: > > > > When I do neither, i.e., leave the POST request as is and use > > > the standard redirect mechanism, the browser hangs and the > > > server actually does not send the redirect until I hit the Stop > > > button (I'm using ngrep to determine this). This also happens > > > if I use the $r->print($header) method and still return > > > REDIRECT. > > > Try adding > > > > $r->method('GET'); > > $r->headers_in->unset('Content-length'); > > > > to your code before doing the return REDIRECT. > > Ask Bjoern, I privately replied to you on this as well. > > I should have been more clear and said I was doing exactly this, > as per [1], when I mentioned I was converting POST requests to > GET requests. > > This is so that I could get redirects to work in response to a > urlencoded POST request using the standard redirection technique > of setting the Location header and mime type and returning > REDIRECT instead of manually constructing and $r->print()ing a > header. > > In any case, [1] does me no good with multipart/form-data which > is what I was asking about in the first place. you need 1.24_01 which contains this fix: fix $r->read() so it will not block if all data has already been read and so that Apache will not hang during ap_discard_request_body() on error or redirect after all data has been read
Re: Bug (easily fixable) in Apache::Server
On Fri, 12 Jan 2001, Richard L. Goerwitz wrote: > The mod_perl-1.24_01 ./src/modules/perl/Server.xs file is using a > short int, which leads to ports between 32768 and 65535 (inclusive) > turning up in Perl as negative numbers - thanks, this should fix the problem.. Index: src/modules/perl/Server.xs === RCS file: /home/cvs/modperl/src/modules/perl/Server.xs,v retrieving revision 1.7 diff -u -r1.7 Server.xs --- src/modules/perl/Server.xs 2000/09/26 17:34:32 1.7 +++ src/modules/perl/Server.xs 2001/01/25 07:04:56 @@ -96,7 +96,7 @@ OUTPUT: RETVAL -short +unsigned short port(server, ...) Apache::Server server @@ -104,7 +104,7 @@ RETVAL = server->port; if(items > 1) -server->port = (short)SvIV(ST(1)); +server->port = (unsigned short)SvIV(ST(1)); OUTPUT: RETVAL Index: t/net/perl/api.pl === RCS file: /home/cvs/modperl/t/net/perl/api.pl,v retrieving revision 1.42 diff -u -r1.42 api.pl --- t/net/perl/api.pl 2000/04/03 21:41:53 1.42 +++ t/net/perl/api.pl 2001/01/25 07:05:19 @@ -16,7 +16,7 @@ my $is_xs = ($r->uri =~ /_xs/); -my $tests = 68; +my $tests = 71; my $is_win32 = WIN32; $tests += 2 unless $is_win32; my $test_get_set = Apache->can('set_handlers') && ($tests += 4); @@ -177,6 +177,14 @@ test ++$i, $s->server_admin; test ++$i, $s->server_hostname; test ++$i, $s->port; +my $port = $s->port; +for (32768, 65535) { +$s->port($_); +test ++$i, $s->port == $_; +} +$s->port($port); +test ++$i, $s->port == $port; + test ++$i, $s->timeout; for (my $srv = $r->server; $srv; $srv = $srv->next) {
Re: Apache::ASP help!
Philippe Ratté wrote: > > Hello :) > > My Apache::ASP is working; i've copied the ./site/eg/ dir to my htdocs, and > all that works.. > > In my root dir, ( / ) i've made a simple ASP document. When I run it, it > gives me the following errors: > > Errors Output > Undefined subroutine &Apache::ASP::date called at (eval 9) line 1. , > /usr/lib/perl5/site_perl/Apache/ASP.pm line 1471 Congrats on getting this far! ( not an easy task for some ) date() is probably a VBScript command, but Apache::ASP supports perl scripting only. You could likely use &HTTP::Date::time2str() for similar effect, do a "perldoc HTTP::Date" for more info. Better yet, if you really were expecting VBScript, then you might want to learn perl, or get a web app environment that supports VBScript like Chilisoft's ASP. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Apache::ASP help!
Hello :) My Apache::ASP is working; i've copied the ./site/eg/ dir to my htdocs, and all that works.. In my root dir, ( / ) i've made a simple ASP document. When I run it, it gives me the following errors: Errors Output Undefined subroutine &Apache::ASP::date called at (eval 9) line 1. , /usr/lib/perl5/site_perl/Apache/ASP.pm line 1471 Debug Output RUN ASP (v2.07) for /usr/local/apache/htdocs/date.asp call srand() post fork GlobalASA package Apache::ASP global.asa was not cached for _usr_local_apache_htdocs___global_asa opening lock file /tmp/server/internal.lock opening lock file /tmp/server/application.lock session id from cookie: 3ccc7d73e98 refreshing 3ccc7d73e98 with timeout 980387526 opening lock file /tmp/3c/3ccc7d73e98.lock session not expired - time: 980387226; timeout: 980387286; tieing session 3ccc7d73e98 updating LastSessionTimeout from 980387317 parsing date.asp undefing sub Apache::ASP::_usr_local_apache_htdocs_date_aspxDYN code CODE(0x81e4af4) compiling into package Apache::ASP subid Apache::ASP::_usr_local_apache_htdocs_date_aspxDYN executing _usr_local_apache_htdocs_date_aspxDYN tieing response package for STDOUT Undefined subroutine &Apache::ASP::date called at (eval 9) line 1. , /usr/lib/perl5/site_perl/Apache/ASP.pm line 1471 ASP Done Processing - asp: Apache::ASP=HASH(0x8390318); ASP to Perl Script 1: package Apache::ASP; ;; sub Apache::ASP::_usr_local_apache_htdocs_date_aspxDYN { ;; @_ = (); ;; no strict;;use vars qw($Application $Session $Response $Server $Request);;use lib qw(/usr/local/apache/htdocs//.);;;$main::Response->WriteRef(\(' 2: 3: Untitled Document 4: 5: 6: 7: 8: VOICI LA DATE D\'AUJOURD\'HUI '.(date()).' 9: 10: '));;;no lib qw(/usr/local/apache/htdocs//.); ;; } An error has occured with the Apache::ASP script just run. If you are the developer working on this script, and cannot work through this problem, please try researching the it at the Apache::ASP web site, specifically the FAQ section. Failing that, check out your support options, and if necessary include this debug output with any query. Hope to hear from you, Thanks.
Re: Apache::ASP
"Earle F. Ake" wrote: > > I have an application which I am using the perl based ASP for. All > of my pages except for one as written using this. I need one using plain > perl based cgi so the process runs as the user and not the web server for > file security reasons. The problem is I need to get to some of the Session > information and I can't seem to get it in the cgi. > You can't load Apache::ASP like this in a CGI. You might try to run a program from your ASP script, passing it the needed session information as a argument, or STDIN. You could also set up a CGI that take the session data on the QUERY string, and then use Apache::Filter & Apache::SSI to run that CGI using SSI tactics. --Josh
Re: Apache::ASP
Hi there, On Wed, 24 Jan 2001, Earle F. Ake wrote: > open(OUT, "/tmp/debug.log"); Do you mean open(OUT, ">/tmp/debug.log"); ? 73, Ged.
Apache::ASP
I have an application which I am using the perl based ASP for. All of my pages except for one as written using this. I need one using plain perl based cgi so the process runs as the user and not the web server for file security reasons. The problem is I need to get to some of the Session information and I can't seem to get it in the cgi. I have something like: #!/usr/bin/perl use Apache::ASP; open(OUT, "/tmp/debug.log"); printf OUT ("This should have the session username '%s' information\n", $::Session->{'username'}); close(OUT); What else do I have to include to get access to the currently stored session information? All my ASP scripts can print the Session information so I know it is stored properly, but the cgi can not see it. -Earle -- Earle Ake Manager, Internet Services HCST*Net
Apache::Status and custom menu_items
I'm attempting to insert a custom menu item as described in the eagle book, pages 641-3. To my knowledge, I've properly coded, yet I don't see any change in the /perl-status output. Also, a number of modules I know are loaded, such as Apache::Resource and Tivoli::Apache::AuthenCache, don't show up in the "Loaded Modules" section. Here's my httpd configuration (the kitchen sink approach while attempting to determine the problem): PerlModule Apache::Status PerlModule Apache::Resource PerlModule HTML::Embperl PerlModule B::Terse PerlSetEnv PERL_RLIMIT_CPU 120 PerlModule Tivoli::Apache::AuthenLDAP PerlModule Tivoli::Apache::AuthzLDAP PerlModule Tivoli::Apache::AuthenCache PerlModule Tivoli::Apache::AuthzCache SetEnvEMBPERL_OPTIONS 19472 SetEnvEMBPERL_ESCMODE 0 SetHandlerperl-script PerlHandler Apache::Status PerlSetVarStatusDumperOn PerlSetVarStatusPeek On PerlSetVarStatusLexInfo On PerlSetVarStatusDeparse On PerlSetVarStatusTerse On PerlSetVarStatusTerseSize On PerlSetVarStatusTerseSizeMainSummary On Any ideas where these menu_items are supposed to show up? I understood it to be the top level. Neither my module's menu_items nor Apache::Resource's menu_items appear, although if I dig through the symbol table dump, I find both packages have the routine for menu_items listed and available for deparsing, dumps, etc. Also, the "Memory Usage" item that should show up when StatusTerseSizeMainSummary is on is not showing up. Regards, Christian - Christian Gilmore Infrastructure & Tools Team Lead Web & Multimedia Development Tivoli Systems, Inc.
Re: DBI + MSsql Server
[EMAIL PROTECTED] writes: > Hi there! > Does any body have an idea how to access MSsql server using DBI or > other method. > I've to build an application and I don't want to go to IIS so is > there any way to work with Apache+Modperl in gnu-Linux and querying > a NT box running MSsql. One option is to use DBD::Sybase with either the free sybase libraries (on linux) or with FreeTDS (www.freetds.org). I think that there are also odbc solutions. Michael -- Michael Peppler - Data Migrations Inc. - [EMAIL PROTECTED] http://www.mbay.net/~mpeppler - [EMAIL PROTECTED] International Sybase User Group - http://www.isug.com Sybase on Linux mailing list: [EMAIL PROTECTED]
Re: Compiling mod_perl 1.24 with the Sun Solaris C Compiler
Hi all, On Wed, 24 Jan 2001, Matisse Enzer wrote: > Thanks, I'll try compiling perl with the Solaris compiler, and then > Apache + mod_perl . Check the List archives for stuff about Solaris recently, I'm sure you'll find some useful pointers. 73, Ged.
Problem: Variables randomly un-set
I'm running a CGI program under mod_perl, and am getting erratic behavior. Every 3 or 4 hits, a variable will be undefined. Fortunately, the program does enough sanity checks to barf when some vital data is missing... One variable that seems particularly prone to disappear is the $table variable (see below). The CGI program has multiple "pages" of potential output depending on the action requested, and variables are passed around these pages using hidden input tags. Pretty standard stuff. Here's some sample code: # UltraForm2 is a module/API I've made. Not a CPAN module... use UltraForm2; $uf = new UltraForm2; $profile = $uf->getformdata('UF','profile') || &print_loginpage; $uf->readprofile($profile) || $uf->error("Cannot read the specified profile: $profile"); $table = $uf->getprofilekeyword('db_table'); ($table) || $uf->error("No db_table was specified in the profile \'$profile\'"); Not pictured here: All of these variables are my()'d at the top of the program, "use strict" is used, and the programs checks out just fine with "perl -cw" Like I said, it works just fine, then after 3 or 4 hits, the $table variable is suddenly null/undef. This does not occur when the program is run via standard CGI. I read the cgi_to_modperl document, and none of the mentioned pitfalls about loading packages seemed to apply here... Where do I start looking to find the problem? -gm
DBI + MSsql Server
Hi there! Does any body have an idea how to access MSsql server using DBI or other method. I've to build an application and I don't want to go to IIS so is there any way to work with Apache+Modperl in gnu-Linux and querying a NT box running MSsql. Thanks in advance Regards Jose Albert www.datacourse.com
Re: Compiling mod_perl 1.24 with the Sun Solaris C Compiler
Thanks, I'll try compiling perl with the Solaris compiler, and then Apache + mod_perl . At 2:44 PM +0100 1/24/01, Jens-Uwe Mager wrote: >On Tue, Jan 23, 2001 at 02:02:57PM -0800, Matisse Enzer wrote: >> >> This is a re-posting with a bit more information: >> >> I'm having trouble getting mod_perl 1.24 to compile using the >>Solaris compiler. >> >> >> Compiler Version is: Sun WorkShop 6 2000/04/07 C 5.1) >> OS is: Solaris 2.7 >> >> >> Details: > > >> For various reasons I'm using the Apache 1.3.12 source tree, and I >>can compile >> fine using gcc, but the Solaris compiler complains: >> >> >> /opt/SUNWspro/WS6/bin/cc -c -I../../os/unix -I../../include >> -DSOLARIS2=270 -DUSE_EXPAT -I../../lib/expat-lite >> `/export/home/matisse/devel/apache/apache_1.3.12/src/apaci` >> -I/usr/local/include >> -I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE -I. -I../.. >> -DUSE_PERL_SSI -DMOD_PERL -KPIC -DSHARED_MODULE mod_include.c && mv >> mod_include.o mod_include.lo >> "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line >> 319: formal parameter lacks name: param #1 >> "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line >> 319: formal parameter lacks name: param #2 >> "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line >> 319: formal parameter lacks name: param #3 >> "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line >> 319: syntax error before or at: __attribute__ >> "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line >> 319: warning: syntax error: empty declaration >> "/usr/include/ctype.h", line 48: cannot recover from previous errors >> cc: acomp failed for mod_include.c >> >> Line 319 of >>/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h is: >> >> __attribute__((format >>(printf, 3, 4))); >> > > > >This probably means that perl is configured using the gcc compiler. As >with most plug-in systems it is recommended to compile all parts that >are loaded into one address space using the exactly same compiler, that >means in the modperl case all of Apache, Apache plug-ins, perl and perl >plug-ins should be compiled using the Sun Workshop C compiler. Mixing >compilers arbitrarily is asking for trouble. > >-- >Jens-Uwe Mager > >HELIOS Software GmbH >Steinriede 3 >30827 Garbsen >Germany > >Phone: +49 5131 709320 >FAX: +49 5131 709325 >Internet: [EMAIL PROTECTED] -- --- Matisse Enzer TechTv Web Engineering [EMAIL PROTECTED] 415-355-4364 (desk) 415-225-6703 (cellphone)
Re: Verify DSO
Wang, Pin-Chieh ([EMAIL PROTECTED]) said something to this effect on 01/24/2001: > From: "Wang, Pin-Chieh" <[EMAIL PROTECTED]> > To: "Mod_perl list (E-mail)" <[EMAIL PROTECTED]> > Subject: Verify DSO > Date: Wed, 24 Jan 2001 15:40:53 -0600 > > Any body know How to verify the Apache I just build is a DSO? > > I did > ./configure --prefix=/usr/local/apache --enable-rule=SHARED_CORE You can't, unless you followed that up with 'make'. If you did, you can do src/httpd -l from the root of the apache source, and the resulting list should contain mod_so.c. (If you already ran make install, you can get this list by running /usr/local/apache/bin/httpd -l). (darren) -- In general, things are not what people want them to be. They just are what they are. That's a general property of things, and that's causing lots of trouble for people in all kinds of contexts. -- Bob Dylan
Verify DSO
Any body know How to verify the Apache I just build is a DSO? I did ./configure --prefix=/usr/local/apache --enable-rule=SHARED_CORE Thanks PC
Problems whith Apache::Registry and CGI::Carp
Hi, I'm runing on apache 1.3.14, modperl 1.24_01, perl 5.6, latest CGI.pm when i use Apache::Request with my modperl scripts the httpds do segfault. when i use CGI::Carp too... someone have an idea ?
Re:[Mason] ANNOUCE: HTML::Mason 0.896
At 5:49 PM -0800 1/5/2001, Jonathan Swartz wrote: >Changes in 0.896: > - Fixed bug preventing Mason from working with PerlFreshRestart. > - Fixed use_reload_file to work as documented and not stat() source > files. (submitted by Benjamin John Turner) Thanks for addressing this issue! I finally got a chance to try out 0.896 on our development servers and was so happy to see the stat() calls all but disappear. We are supposed to be benchmarking our front ends today and if I can, I will post the relative performance of our site with and without the reload file. Benjamin Turner -- Benjamin John Turner | [EMAIL PROTECTED] http://www.usfca.edu/turner/ | [EMAIL PROTECTED]
Re: Apache.pm location on installation
> From: "Sinclair, Alan (CORP, GEAccess)" <[EMAIL PROTECTED]> > Date: Wed, 24 Jan 2001 11:10:21 -0700 > Subject: Apache.pm location on installation > > All, > > I have successfully installed mod_perl on Solaris. The mod_perl installation > process has installed the Apache.pm module in the perl lib directory. Is > that normal? I was expecting the Apache perl stuff to be installed under > APACHE_PREFIX. Normal. The perl stuff (even related to Apache) has to be installed in the perl lib dir for perl to find it. The perl that is embedded into your Apache is the same perl that is on your system, so it needs the same libs, and uses the same lib paths. The binaries, config files, man pages, libs, etc, for Apache are installed in APACHE_PREFIX. David McCabe Unix System Administrator Le Groupe Videotron [EMAIL PROTECTED] (514) 380 4433 How can we (men) possibly use sex to get what we want?? Sex _is_ what we want!!! Dr Frasier Crane
RE: Apache.pm location on installation
> -Original Message- > From: Sinclair, Alan (CORP, GEAccess) > [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 24, 2001 1:10 PM > To: '[EMAIL PROTECTED]' > Subject: Apache.pm location on installation > > > All, > > I have successfully installed mod_perl on Solaris. The > mod_perl installation > process has installed the Apache.pm module in the perl lib > directory. Is > that normal? I was expecting the Apache perl stuff to be > installed under > APACHE_PREFIX. APACHE_PREFIX is the prefix that Apache gets for stuff like the httpd binary (like /usr/local/apache) perl needs to install Apache.pm where it can see it. see http://perl.apache.org/guide/install.html#APACHE_PREFIX and http://perl.apache.org/guide/install.html#Installing_Perl_Modules_into_a_D HTH --Geoff > > Thanks! > >
Apache.pm location on installation
All, I have successfully installed mod_perl on Solaris. The mod_perl installation process has installed the Apache.pm module in the perl lib directory. Is that normal? I was expecting the Apache perl stuff to be installed under APACHE_PREFIX. Thanks!
Re: Apache::Registry and variables...
--- Joseph Crotty <[EMAIL PROTECTED]> wrote: > I read that if you run scripts under Apache::Registry, > its a good idea to write memory leak proof code. Since the code is resident in memory between calls to the script, it's a *very* good idea to be careful of such things. > I also read that one should "clean up their" globals. > Any examples in Stas's guide or elsewhere of "cleaning up" > globals or classic memory leaks associated with Apache::Registry. Always initialize, and if possible set back to a null value of some sort when done. ALWAYS use fresh opens on filehandles, and ALWAYS close them! For good examples, check the section from http://perl.apache.org/guide/porting.html#Exposing_Apache_Registry_secret down through http://perl.apache.org/guide/porting.html#Thinking_mod_cgi __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
Apache::Registry and variables...
All, I read that if you run scripts under Apache::Registry, its a good idea to write memory leak proof code. I also read that one should "clean up their" globals. Any examples in Stas's guide or elsewhere of "cleaning up" globals or classic memory leaks associated with Apache::Registry. Thanks, Joe Crotty
Re: File handles in mod_perl
Hi there, On Tue, 23 Jan 2001, Barry Veinotte wrote: > Besides die being a bad thing, is this gentleman right to tell me > I have to loose my file opens and go with FileHandle ?? Yes and no. If your Apache child opens files and doesn't close them you will eventually run out of handles (operating system limit). It's all in the guide: http://perl.apache.org/guide If you read it (all right, if you read it at least a couple of times :) then you'll be able to baffle your sysadmin. 73, Ged.
Re: Problem with Apache::ASP
isaac wrote: > > Has anyone noticed that they get errors when trying to use else or elsif statements >with Apache::ASP. > > If I form my statements like this: > > <% if($foo eq bar){ %> > bar > <% } %> > <% elsif($foo eq bar2){ %> > bar2 > <% } %> > > I get syntax errors. > ... > Then I get no syntax errors. Is there a way around this? Any help would be much >appreciated. > ... Realize that html between %> ... <% , the ... get's printed even if its white space. Try writing it like this: <% if($foo eq bar){ %> bar <% } elsif($foo eq bar2){ %> bar2 <% } %> -- Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Problem with Apache::ASP
Hi there, On Tue, 23 Jan 2001, isaac wrote: > Has anyone noticed that they get errors when trying to use else or elsif > statements with Apache::ASP. Nope. > If I form my statements like this: > > <% if($foo eq bar¹){ %> > bar > <% } %> > <% elsif($foo eq bar2¹){ %> > bar2 > <% } %> Hmmm. What's this \214 and \271 stuff? Don't use extended character sets in your code. > syntax error at (eval 28498) line 39, near "; elsif" (Might be a runaway > multi-line '' string starting on line 38) , I think it's trying to tell you... 73, Ged.
Problem with Apache::ASP
Title: Problem with Apache::ASP Has anyone noticed that they get errors when trying to use else or elsif statements with Apache::ASP. If I form my statements like this: <% if($foo eq ‘bar’){ %> bar <% } %> <% elsif($foo eq ‘bar2’){ %> bar2 <% } %> I get syntax errors. syntax error at (eval 28498) line 39, near "; elsif" (Might be a runaway multi-line '' string starting on line 38) , /usr/local/www/users/jpmktg/html/Global/Lib/5.005/Apache/ASP.pm line 1840 If I form my statements like this: <% if($foo eq ‘bar’){ print(’Hello’); } elsif($foo eq ‘bar2’){ print(’bar2’); } %> Then I get no syntax errors. Is there a way around this? Any help would be much appreciated. --
Re: Using rewrite...
- Original Message - From: "Tomas Edwardsson" <[EMAIL PROTECTED]> To: "Les Mikesell" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 22, 2001 3:01 AM Subject: Re: Using rewrite... > > > The problem is that I can't find a way to send the request > > > to a relevant port if the request calls for a URL which ends > > > with a slash ("/"). Any hints ? > > > > I have to problem with matching the slash. The problem is if you ask > for http://www.domain.com/ the proxy daemon has no idea if the client > is asking for a perl, php or static document. Therefore I need a method > to extract the filename which is relevant from DirectoryIndex. I see what you mean now. That could be a problem if you are supporting a lot of sites or ones that someone else configured. I avoided the issue by never referencing directory names internally except for the server root (/), and I handle that by letting mod_rewrite on the front end send a client redirect to /index.shtml (I have mod_perl handle .shtml files because most have virtual includes of perl scripts). When the redirected client comes back, the rewrite rule for shtml will match. Les Mikesell [EMAIL PROTECTED]
Re: Compiling mod_perl 1.24 with the Sun Solaris C Compiler
On Tue, Jan 23, 2001 at 02:02:57PM -0800, Matisse Enzer wrote: > > This is a re-posting with a bit more information: > > I'm having trouble getting mod_perl 1.24 to compile using the Solaris compiler. > > > Compiler Version is: Sun WorkShop 6 2000/04/07 C 5.1) > OS is: Solaris 2.7 > > > Details: > > For various reasons I'm using the Apache 1.3.12 source tree, and I can compile > fine using gcc, but the Solaris compiler complains: > > > /opt/SUNWspro/WS6/bin/cc -c -I../../os/unix -I../../include > -DSOLARIS2=270 -DUSE_EXPAT -I../../lib/expat-lite > `/export/home/matisse/devel/apache/apache_1.3.12/src/apaci` > -I/usr/local/include > -I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE -I. -I../.. > -DUSE_PERL_SSI -DMOD_PERL -KPIC -DSHARED_MODULE mod_include.c && mv > mod_include.o mod_include.lo > "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line > 319: formal parameter lacks name: param #1 > "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line > 319: formal parameter lacks name: param #2 > "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line > 319: formal parameter lacks name: param #3 > "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line > 319: syntax error before or at: __attribute__ > "/usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h", line > 319: warning: syntax error: empty declaration > "/usr/include/ctype.h", line 48: cannot recover from previous errors > cc: acomp failed for mod_include.c > > Line 319 of /usr/local/lib/perl5/5.00503/sun4-solaris/CORE/iperlsys.h is: > > __attribute__((format (printf, 3, 4))); > > This probably means that perl is configured using the gcc compiler. As with most plug-in systems it is recommended to compile all parts that are loaded into one address space using the exactly same compiler, that means in the modperl case all of Apache, Apache plug-ins, perl and perl plug-ins should be compiled using the Sun Workshop C compiler. Mixing compilers arbitrarily is asking for trouble. -- Jens-Uwe Mager HELIOS Software GmbH Steinriede 3 30827 Garbsen Germany Phone: +49 5131 709320 FAX:+49 5131 709325 Internet: [EMAIL PROTECTED]
Re: [OT] XML::DOM
On Tue, Jan 23, 2001 at 02:49:44PM -0800, Paul J. Lucas wrote: > On Tue, 23 Jan 2001, Matt Sergeant wrote: > > > Its perl adding the -fno-rtti, FWIW, not your Makefiles. > > Then there's something odd about your Perl installation. Perl > shouldn't be giving the option. How does Perl "know" whether > RTTI is needed or not? I believe that this is from times as RTTI did require that the main program was a proper C++ program as well (which perl isn't, it is a plain C program). I believe RTTI did bloat programs considerably, so most people turned it off. If this still applies today, I have no idea. I still know a few platforms that do not support loading C++ code from a loadable plug-in (dll, shared object) if the main program is not a C++ program. -- Jens-Uwe Mager HELIOS Software GmbH Steinriede 3 30827 Garbsen Germany Phone: +49 5131 709320 FAX:+49 5131 709325 Internet: [EMAIL PROTECTED]
Re: [OT] gdb and httpd (mod_perl, PHP)
Sorry! It was a FAQ from http://perl.apache.org/guide/debug.html#gdb_says_there_are_no_debugging_ However I couldn't find IFLAGS_PROGRAM = -m 755 -s or just " -s" anywhere in ~/src/apache_1.3.14/Makefile.tmpl so I had to edit the Makefile. (Stas, don't you want to correct The Guide on this?) Regards Alex
[OT] gdb and httpd (mod_perl, PHP)
Hi, I have a bit offtopic question: we have a problem enabling the PHP safe mode under Solaris 2.6 even though it works under Linux. This must be something very simple: everything works fine, but the uid for files is always 1 under Solaris... I tried looking into the source code, but haven't found the reason yet. I would like to step through the source code using the gdb. So I have recompiled the httpd like this: cd ~/src/mod_perl-1.24_01/ perl Makefile.PL APACHE_SRC=/home/eedalf/src/apache_1.3.14 \ APACHE_PREFIX=/home/eedalf/apache PREFIX=/home/eedalf \ DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 PERL_DEBUG=1 make make test (worked fine) make install Then I go to: cd ~/apache/bin gdb ./httpd GNU gdb 4.17 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.6"...(no debugging symbols found)... (gdb) source /home/eedalf/src/mod_perl-1.24_01/.gdbinit (gdb) set args -X (gdb) list No symbol table is loaded. Use the "file" command. (gdb) file ./httpd Reading symbols from ./httpd...(no debugging symbols found)...done. I know that PHP is not compiled in yet... I wanted to try executing "httpd -X" step by step first - just to see if it works. What am I doing wrong? Doesn't PERL_DEBUG=1 add the debugging symbols? Thank you Alex
Re: changing query string
Vincent Apesa ([EMAIL PROTECTED]) said something to this effect on 01/23/2001: > Hello all, > I'm trying to modify the query string from the client before sending it > off again. I would like to do something like so: > > http://www.xyz.com?one=1 and modify the uri to > http://www.xyz.com?one=2 > > the problem is I'm not sure how to reference values in the query string. I > would like to be able to say > queryArgs( 'one' ) = 2; This looks like a problem for mod_rewrite, if you have it compiled into your httpd. Do something like: RewriteEngine On RewriteCond %{QUERY_STRING} one=.* RewriteRule ^/$ http://www.xyz.com/?one=2 [R] (darren) -- There is no expedient to which a man will not go to avoid the real labour of thinking.