How do I compile libapreq under Cygwin
Alexander Solovey's clues to compile mod_perl were a godsend... But now I'm pulling out my hair trying to compile libapreq under Cygwin. I get the following string of errors... # Begin Snippet ... LD_RUN_PATH=/home/Administrator/.cpan/build/libapreq-1.0/Request/../blib/arch/a uto/libapreq ld2 -s -L/usr/local/lib Request.o -o ../blib/arch/auto/Apache/Re quest/Request.dll /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libperl5_6_1.a -L/home /Administrator/.cpan/build/libapreq-1.0/Request/../blib/arch/auto/libapreq -lapr eq dllwrap --dllname Request.dll --driver-name gcc --dlltool dlltool --export-all-s ymbols --as as --output-def libRequest.def --output-lib libRequest.a \ -s -L/usr/local/lib Request.o /usr/lib/perl5/5.6.1/cygwin-multi/CORE/libperl5_6 _1.a -L/home/Administrator/.cpan/build/libapreq-1.0/Request/../blib/arch/auto/li bapreq -lapreq dllwrap: no export definition file provided dllwrap: creating one, but that may not be what you want Request.o(.text+0x185):Request.c: undefined reference to `perl_request_rec' Request.o(.text+0xa26):Request.c: undefined reference to `sv2request_rec' Request.o(.text+0xcec):Request.c: undefined reference to `ap_pcalloc' Request.o(.text+0xcf4):Request.c: undefined reference to `ap_null_cleanup' Request.o(.text+0xd08):Request.c: undefined reference to `ap_register_cleanup' Request.o(.text+0xf70):Request.c: undefined reference to `ap_pcalloc' Request.o(.text+0xf78):Request.c: undefined reference to `ap_null_cleanup' Request.o(.text+0xf8c):Request.c: undefined reference to `ap_register_cleanup' Request.o(.text+0x16d1):Request.c: undefined reference to `hvrv2table' Request.o(.text+0x1728):Request.c: undefined reference to `mod_perl_tie_table' Request.o(.text+0x1a59):Request.c: undefined reference to `ap_table_unset' Request.o(.text+0x1b56):Request.c: undefined reference to `ap_table_add' Request.o(.text+0x1c1c):Request.c: undefined reference to `ap_table_set' Request.o(.text+0x1ce2):Request.c: undefined reference to `ap_table_get' Request.o(.text+0x1f2c):Request.c: undefined reference to `mod_perl_tie_table' Request.o(.text+0x400e):Request.c: undefined reference to `ap_table_get' Request.o(.text+0x47a9):Request.c: undefined reference to `ap_table_get' Request.o(.text+0x487d):Request.c: undefined reference to `mod_perl_tie_table' # End Snippet According to this message: http://sources.redhat.com/ml/cygwin/2002-01/msg00230.html I can search the modperl archives with the keyword 'cygwin' and find clues on how to compile 'Apache::Request' Unfortunately, the only clue I found was this: http://www.mail-archive.com/modperl@apache.org/msg23958.html Which says I need to specify the location and name of the apache lib to link against. How exactly can I accomplish this? (What are the command line switches to do this?) Thank you for your time, Daniel Fisher ps- Ultimately, I'm looking to use AxKit on mod_perl through Cygwin. Has anyone else accomplished this? (I know that ActiveState's Perl *should* support AxKit, but the get-xml column='column_name' tag didn't work because of (AFAIK) a problem with XPath)
Force a 404 error?
Hi JAPHs, Is it possible to force a 404-error from within a mod_perl CGI? I am working on my CMS and I want to generate a 404 if the user hacks the URI in a certain way: i.e, if the use passes a value in the URI that does reference a database record. I can (and have) trapped such an event and thus I can display the appropriate Not found warning by using a CGI.pm redirect to my 404 page, but using redirect obviously updates the URL (as displayed on the browsers address line) to that of the 404 page, whereas I want the URL to continue to display the users request. Can I do this? Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/ http://wypug.digital-word.com/
Re: Force a 404 error?
On Thu, 16 May 2002, Jonathan M. Hollin wrote: Is it possible to force a 404-error from within a mod_perl CGI? I'm not sure what you mean by a mod_perl CGI. Anyway, basically you need to return the 404 error code in the HTTP response and provide some helpful HTML. In CGI this can be done like so: #!/usr/bin/perl -wT use strict; use CGI; my $q = CGI-new(); # okay, send the header so the browser knows it's a 404 print $q-header(-status = 404); # now print something that looks like a normal 404 page my $url = $ENV{REQUEST_URI}; $url = $q-escapeHTML($url); # be paranoid re cross site scipting print ENDOFHTML; !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN htmlhead title404 Not Found/title /headbody h1Not Found/h1 The requested URL $url was not found on this server.p hr address$ENV{SERVER_SOFTWARE} at $ENV{SERVER_NAME} Port $ENV{SERVER_PORT}/address /body/html ENDOFHTML -- s'' Mark Fowler London.pm Bath.pm http://www.twoshortplanks.com/ [EMAIL PROTECTED] ';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/ +/ ){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}
Re: Force a 404 error?
Hi! On Thu, May 16, 2002 at 11:40:49AM +0100, Jonathan M. Hollin wrote: Is it possible to force a 404-error from within a mod_perl CGI? What about returning NOT_FOUND from your handler and let an ErrorDocument print out the warning? See Chapter 4, Handling Errors, in the Eagle book. -- D_OMM + http://domm.zsi.at -+ O_xyderkes | neu: Arbeitsplatz | M_echanen | http://domm.zsi.at/d/d162.html | M_asteuei ++
Re: Error messages for VirtualHosts written to wrong log
Michael E. Lewis wrote: I sure hope I'm not asking a stupid question here. We are preparing to upgrade our production mod_perl servers: From: To: RedHat 6.2 RedHat 7.2 kernel-2.2.19-6.2.7 kernel-2.4.9-31 Apache_1.3.12 Apache_1.3.23 mod_perl-1.24 mod_perl-1.26 I have the above To configuration installed on a staging system and I am having a problem with the error logging for VirtualHosts on that system. Specifically, messages written to STDERR for a VirtualHost are getting written to the general server error_log instead of the error_log specified for the VirtualHost. The VirtualHost configuration I am using for this works correctly in the production environment, but not in the staging environment. Here are excerpts from the httpd.conf file which is essentially the same on both the production and staging servers: this was reported by Matt here: http://marc.theaimsgroup.com/?l=apache-modperlm=98190005604037w=2 we really don't have a resolution to this, save a few comments from Doug in the STATUS file (currently only in mod_perl CVS) i would expect stderr to only ever be opened to the main server log at startup. otherwise, we'd need to redirect stderr at the start of every request and restore it at the end. seems expensive. i would be suprised if this every worked as matt expected it to. -dougm I'm not sure if this helps, but I think this is all anyone knows about the issue. sorry. --Geoff
Re: mod_perl and mod_cgi
Konstantin Yotov wrote: On my development machine everything was ok, but when I move to productional server the mod_perl version works twice slower than mod_cgi. Start by making sure you really have mod_perl installed and your scripts are running under it, and not mod_cgi. You can verify this using the instructions in the guide. One quick way is to check the value of $ENV{'MOD_PERL'}. Also, which platform are you on and what are your settings for MaxClients and MaxRequestsPerChild form httpd.conf? - Perrin
Re: mod_perl and mod_cgi
At 17:38 15.05.2002, Konstantin Yotov wrote: Hello! :) I'm webmaster for a small site about /3000 hits and 4 host daily/. I rewrote my cgi scripts for mod_perl/made all global variables local and etc/ following the instructions of mod_perl guide. On my development machine everything was ok, but when I move to productional server the mod_perl version works twice slower than mod_cgi. Please tell me where could be the problem/Apache configuration or my new scripts/ or a way to locate it. Thank you. Well, it might be because you have more requests on your production server than on your dev box... Other than that, we can't do much without a little more information. Maybe you want to read the performance sections in the guide.. -- Per Einar Ellefsen [EMAIL PROTECTED]
[2.x] Windows interpreter-wide locking due to modules?
I have installed Randy Kobes' 5-10-2002 Apache-2/modperl-2 Win32 binaries on a Win2k Professional P3 uniprocessor development machine. I have left all of the startup.pl script as is. Everything works great--however, with some scripts I seem to still suffer from 1.3-style locks on the perl interpeter that prevent some other scripts from being served until a given dynamic request completes. I've poked around a bit and found that simple scripts (ones not using modules) will still be executed while another long-running process is executing (thus multithreading properly)--so I'm figuring it's probably a module issue (or I'm simply confused). The two modules I'm running predominantly are DBI 1.14 (with DBD::DB2 .74) and CGI 2.74, and I have verified that two scripts running simultaneously with these two modules will result in one blocking until the other completes. Any/all ideas most welcome--and my sincerest thanks to Randy for his 1.3 and 2.0 binaries and other incredibly helpful docs/builds/info/etc. James
default page
I have a script that needs to be run when some one goes to the site: www.mysite.com/ it seems like the different ways that I've tried simply run the script through the normal cgi scenario without using perl-handler. Am I missing something obvious with httpd.conf?
Re: default page
Try DirectoryIndex. adam nelson wrote: I have a script that needs to be run when some one goes to the site: www.mysite.com/ it seems like the different ways that I've tried simply run the script through the normal cgi scenario without using perl-handler. Am I missing something obvious with httpd.conf?
SiteMap Builder...
Hi All, After resonablly extensive searching on the internet i have still come up with not much in terms of a good site map builder. Does anyone know of a good mod_perl (or lacking that, even a java applet) solution. The system we have here is completely written in mod_perl so it would be good to get a system that worked with that. What we need: * An application that lets you build a site map. Our customers (who will build/manage their own websites) will then be using this to create their site - aka, setup their site structure, then click on each page and edit its contents (we have the content bit figured out - just need the site map creator). If anyone knows of such a system (mod_perl or java) a link to its location would be much appreciated. kind regards, simran.
RE: default page
or try in the perl.conf Location / SetHandler perl-script PerlHandler My::HandlerPackage /Location -Original Message- From: Dzuy Nguyen [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 3:12 PM To: [EMAIL PROTECTED] Subject: Re: default page Try DirectoryIndex. adam nelson wrote: I have a script that needs to be run when some one goes to the site: www.mysite.com/ it seems like the different ways that I've tried simply run the script through the normal cgi scenario without using perl-handler. Am I missing something obvious with httpd.conf?
Apache::DB
Hello All. I am trying to install Apache::DB and am getting the following error: + make test cc -c-DVERSION=\0.06\ -DXS_VERSION=\0.06\ -DPIC -fpic -I/usr/libdata/perl/5.00503/mach/CORE DB.c In file included from /usr/include/sys/time.h:289, from /usr/include/sys/stat.h:50, from /usr/include/sys/mount.h:44, from /usr/libdata/perl/5.00503/mach/CORE/perl.h:376, from DB.xs:2: /usr/include/time.h:2: syntax error before `1989' /usr/include/time.h:26: empty character constant /usr/include/time.h:32: syntax error before `PROFITS' /usr/include/time.h:115: syntax error before `}' *** Error code 1 Stop in /usr/home/goxcom/Perl_Modules/Apache-DB-0.06/Apache-DB-0.06. + Any ideas? I downloaded from CPAN, and also tried to install directly from my shell. Thanks in advance. I really want to use this as my mod_perl debugger! Gregory