Re: Suggestions on an XML-RPC Service using modperl?
As far as the cacheing goes, we have had extremely good luck with IPC::ShareLite used to share info across mod_perl processes. --Jon R. Chip Turner wrote: Bruce W. Hoylman [EMAIL PROTECTED] writes: Ciao! I would like some input on an intranet web service I am currently in the process of designing, the core of which will be modperl on UN*X. Excellent choice. This works quite well. Of course, like others on this list, I might be a bit biased. The service itself is to access a couple of back end data stores given parameters received in an XML-RPC request, then return the results in an XML-RPC formated response. The data from the back end sources will be loaded into memory at service initialization, for fast access. The data is small enough and memory plentiful enough to allow this. How often does the data change? How is it stored on the back end? You may not need to cache anything if, say, you have a decent SQL database on the backend. Caching never hurts, but it isn't always necessary. The Cache::* modules may be of use for this, though, should you still need it. You also might want to consider not sharing the data in each process; the complexity gained vs the memory lost by storing it in each process may be a workable tradeoff. I probably would try it first with no cache, then a per-process on-demand cache, then finally a shared cache, in that order. That's pretty much it in terms of the high level data flow. It has to be relatively fast, OTO 5+ requests/sec. as a relative volumetric. This should be quite easy. I don't have the necessary setup handy to benchmark it, but I imagine you can easily achieve performance at that level using Frontier::RPC inside a mod_perl handler. We typically use custom code for interfacing the handler, but IIRC the Frontier module comes with a mod_perl handler that, if not enturely suitable, is easily modified to your needs. I'm going to use modperl due to the embedded perl interpreter characteristics it provides, allowing initialization overhead to be incurred at startup. I also wish to use an in-memory, read-only hash structure shared across all modperl processes for access to the cached back end data, rather than making expensive calls to these stores for each request. Again, throughput is critical. Five hits/second should be absolutely no problem. If you expect slow clients, a mod_proxy in front of things (http://perl.apache.org/guide) can help. I would like your thoughts on the cache management concept of the service. I'm looking at MLDBM::Sync as the mechanism for managing the filesystem representation of the in-memory hash content. What to manage the in-memory structure itself in terms of accessing its content? Is a Tie structure too expensive? I want to end up with a single structure accessible to all of the modperl processes, loaded at service Chip -- Chip Turner [EMAIL PROTECTED] Red Hat Network
Re: Apache::Session getting DESTROYed in wrong order
Hi Ken, refcount destruction. I've declared %session as a locally-scoped variable, so it should evaporate before global destruction, unless it's got circular data structures or something. Anyone know what might be going on? Do you have a simple case we can test yet? Aaron
ANNOUNCE: Apache::Gallery 0.3
Hello! Version 0.3 of Apache::Gallery has just hit the wires. Apache::Gallery creates a thumbnail index of each directory and allows viewing pictures in different resolutions. Pictures are resized on the fly and cached. Changes include: - Made Inline dir configurable. (Tim Coleman) - Made it configurable which information about the image should be viewed. (Thomas Eibner) - Added GallerySizes option. You can now choose which resolutions the user can scale between. The Gallery will not allow scaling to 641x480 if you only configured 640x480. (To prevent evil people filling up your disk) (Me) - Handle spaces in files and directories correct. - Now possible to rotate pictures on the fly. (Thomas Eibner) - Copyright picture can be included on each picture (Thomas Eibner) - Comments for each picture changed to be in picture.jpg.comments (Thomas Eibner) - Scale thumbnails correct when images are rotated 90-degrees. (Me) and other bugfixes. The code can be downloaded from http://legart.dk/code.html or your local CPAN mirror and a demo can be seen at http://pictures.legart.dk/ Michael
Win32 modperl-2 binary
Hi, An Apache-2/modperl-2 Win32 binary package is available at ftp://theoryx5.uwinnipeg.ca/pub/other/Apache2.tar.gz for those Win32 users who want a preview of things to come. This archive will unpack into an Apache2 directory, underneath which is a blib subdirectory containing the necessary perl files. These are included when starting Apache by a modperl directive found near the end of conf/httpd.conf, where a sample Hello World modperl handler is also found. Some editing of httpd.conf will be necessary if this package is installed in a location other than D:\Apache2. Within the blib/ subdirectory is some documentation on modperl-2.0. The package was compiled with the cvs sources of Jan 1, 2002, using VC++ 6 and an ActivePerl based on perl-5.6.1. The libmodperl.so library in the Apache modules/ directory will most probably not work with other Apache-2 binary packages. Being under development, there are bugs present; in particular, when stopping an Apache-2 service a memory error results if modperl is enabled. Please let me know of any problems you might have in getting this package installed; for questions/problems on Apache-2, see the docs at http://httpd.apache.org/docs-2.0/, and for modperl-2, see the information at http://perl.apache.org/ on subscribing to the dev mailing list. best regards, randy kobes
[RFC] Apache::MIMEMapper
hi all... hope everyone had a nice holiday. as you catch up on your email, I thought I would throw (yet another) RFC out there for anyone who is interested. Apache::MIMEMapper maps PerlHandlers to file extensions. It extends the default AddHandler directive so that you can have a configuration like AddHandler Apache::RegistryFilter .pl AddHandler Apache::SSI .html .pl here, .pl files chain their output together using Apache::Filter with Apache::RegistryFilter and Apache::SSI. This idea is touched upon in the guide http://perl.apache.org/guide/snippets.html#Setting_PerlHandler_Based_on_MIM and has its origins in a thread between Jim and Doug http://marc.theaimsgroup.com/?l=apache-modperlm=94895394029331w=2 though Apache::MIMEMapper takes a different implementation approach. Once I implemented this I started to have lots of fun with it - I hope you will too. the module can be downloaded from http://www.modperlcookbook.org/code.html or http://www.modperlcookbook.org/download/Apache-MIMEMapper-0.10.tar.gz and the README is attached. --Geoff NAME Apache::MIMEMapper - associate file extensions with PerlHandlers SYNOPSIS PerlModule Apache::MIMEMapper PerlTypeHandler Apache::MIMEMapper AddHandler Apache::RegistryFilter .pl AddHandler Apache::SSI .html .pl Alias /perl-bin/ /usr/local/apache/perl-bin/ Location /perl-bin/ SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader On /Location DESCRIPTION Apache::MIMEMapper extends the core AddHandler directive to allow you to dispatch different PerlHandlers based on the file extension of the requested resource. This means that you can now have .pl scripts under htdocs/ (or wherever) without resorting to a Files based configuration. Apache::MIMEMapper also adds the ability to stack PerlHandlers transparently using Apache::Filter. Handlers are added to the PerlHandler stack in the order they appear in the httpd.conf file - PerlSetVar Filter On is set if more than one extension is associated with a specific Perl module. EXAMPLE PerlModule Apache::MIMEMapper PerlTypeHandler Apache::MIMEMapper AddHandler Apache::RegistryFilter .pl AddHandler Apache::SSI .html .pl Alias /perl-bin/ /usr/local/apache/perl-bin/ Location /perl-bin/ SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader On /Location In this example, .html files are scheduled for processing with Apache::SSI. Additionally, .pl files outside of /perl-bin are handled by Apache::RegistryFilter and Apache::SSI (in that order). Because the SetHandler directive supercedes all other mod_mime directives, all files inside of /perl-bin are processed using Apache::Registry. NOTES The current logic checks AddHandler for something that looks like a Perl module, so AddHandler server-parsed .shtml still works. The criterion for deciding if Apache::MIMEMapper intercepts the request is whether the handler is in the form Foo::Bar - it checks for '::'. This is not ideal, but simple and sufficient for most cases. FEATURES/BUGS Apache::MIMEMapper is a PerlTypeHandler. It does just about everything that mod_mime does (via MIME::Types). The only place where it interferes is for content-negotiated requests, where the AddLanguage and associated directives are necessary. Should you need these directives, you can install Apache::MIMEMapper as a PerlFixupHandler instead. SEE ALSO perl(1), mod_perl(1), Apache(3) AUTHORS Geoffrey Young Elt[EMAIL PROTECTED]gt Paul Lindner Elt[EMAIL PROTECTED]gt Randy Kobes Elt[EMAIL PROTECTED]gt COPYRIGHT Copyright (c) 2001, Geoffrey Young, Paul Lindner, Randy Kobes. All rights reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. HISTORY This code is derived from the ICookbook::MIMEMapper module, available as part of The mod_perl Developer's Cookbook. For more information, visit http://www.modperlcookbook.org/
push_handlers, set_handlers
Apache 1.3.22 mod_perl 1.26 I have noticed some strange behavior when attempting to stack handlers below the 'ChildInit' phase. This code executes fine when placed in a server initialization script: Apache-push_handlers( PerlChildInitHandler= \My::Child::handler ); When using the code below in a server initialization script without any apache config directives the handler does not get called. Apache-push_handlers( PerlHandler= \My::handler ); When applying the following apache conf directive the handler seems to only get called occasionally (initialization of child process?). Files *.html SetHandler perl-script /Files Although, when using the 'push_handlers' method at another part of the request phase the handler gets called occasionally. Apache-push_handlers( PerlFixupHandler= \My::Other::handler ); When using the method below the handlers do not get called at all. Apache-httpd_conf(EOF); Files *.html PerlHandler My::handler SetHandler perl-script /Files EOF Apache-httpd_conf(EOF); PerlFixupHandler My::Other::handler EOF Of course when setting the directives into the apache conf all seems to work well. PerlFixupHandler My::Other Files *.html PerlHandler My SetHandler perl-script /Files Any ideas as to why this strange behavior? When trying to use the 'set_handlers' method it blows up stating the request object is not created. I cannot see the reason why the request object should be needed to set/push handlers which are used to 'handle' the request phases. Thanks,
Re: Win32 modperl-2 binary
Folks Here's hoping I have not overlooked the obvious... What follows is a report on trying to use ftp://theoryx5.uwinnipeg.ca/pub/other/Apache2.tar.gz -8- Environment === WinNT 4 Sp 6a File: D:\Apache2\manual\platform\windows.html = Comments: 1) The reference to access.conf is presumably obsolete 2) The section Running Apache for Windows as a Service does not say whether or not the service needs to be started after having been installed. I think that would help beginners File: D:\Apache2\blib\lib\Apache2.pm Comments: 1) This file contains the trivial bug in that the dir is specified twice Command: apache -V output contains: -D APACHE_MPM_DIR=server/mpm/winnt and this dir does not exist. Is this important? I assume not Starting I can't get Apache to start with options. I have not edited any files whatsoever. Here's a cut-and-paste from a DOS window: D:\APACHE2bin\Apache -k start [Thu Jan 03 11:33:45 2002] [error] (22502)The system cannot find the file specif ied. : No installed service named Apache2. D:\APACHE2bin\Apache -k install Using D:\Apache2/blib Installing the Apache2 service The Apache2 service is successfully installed. D:\APACHE2bin\Apache -k start Using D:\Apache2/blib Starting the Apache2 service [Thu Jan 03 11:33:55 2002] [crit] (22703)The system could not find the environme nt option that was entered. : Apache2: Failed to start the service process. D:\APACHE2bin\Apache Using D:\Apache2/blib Using D:\Apache2/blib D:\APACHE2bin\Apache -k uninstall Removing the Apache2 service The Apache2 service has been removed successfully. Comments: 1) Note the 2 spaces after 'environment' in the error message after bin\Apache -k start. Is something meant to appear there? 2) It's not at all obvious that Apache only starts with no command line options 3) If I try this in another DOS window while Apache is running I get a message I find hard to believe: D:\APACHE2bin\apache -k stop The Apache2 service is not started. 4) Only 1 Using statement is necessary Scripts === I can get http://127.0.0.1/ to work. I can get hello to work with http://127.0.0.1/hello. I can get d:/apache/cgi-bin/test.bat to work with http://127.0.0.1/cgi-bin/test-cgi.bat. But, if I patch the she-bang line of d:/apache/cgi-bin/printenv.pl and then try http://127.0.0.1/cgi-bin/printenv.pl, I get: Server error! Error message: couldn't create child process: 22502: D:/Apache2/cgi-bin/printenv.pl If you think this is a server error, please contact the webmaster Error 500 127.0.0.1 03/01/02 12:15:29 Apache/2.0.30-dev (Win32) mod_perl/1.99_01-dev Perl/v5.6.1 The log says (2 msgs for every try): [Thu Jan 03 12:15:29 2002] [error] [client 127.0.0.1] (22502)The system cannot find the file specified. : couldn't create child process: 22502: D:/Apache2/cgi-bin/printenv.pl [Thu Jan 03 12:15:29 2002] [error] [client 127.0.0.1] (22502)The system cannot find the file specified. : couldn't spawn child process: D:/Apache2/cgi-bin/printenv.pl Changing line 448 of httpd.conf from Options None to either Options ExecCGI or Options +ExecCGI did not get printenv.pl running either. I used ^C to stop and restarted the server after each edit. BSOD Try starting Apache as a service, twice, with the same (default) name, in 2 DOS windows. This should not be possible, surely. -8- Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html
Re: Win32 modperl-2 binary
On Thu, 3 Jan 2002, Ron Savage wrote: Folks Here's hoping I have not overlooked the obvious... What follows is a report on trying to use ftp://theoryx5.uwinnipeg.ca/pub/other/Apache2.tar.gz -8- Environment === WinNT 4 Sp 6a File: D:\Apache2\manual\platform\windows.html = Comments: 1) The reference to access.conf is presumably obsolete 2) The section Running Apache for Windows as a Service does not say whether or not the service needs to be started after having been installed. I think that would help beginners Hi Ron, That would be a suggestion for the Apache-2 developers ... File: D:\Apache2\blib\lib\Apache2.pm Comments: 1) This file contains the trivial bug in that the dir is specified twice Command: apache -V output contains: -D APACHE_MPM_DIR=server/mpm/winnt and this dir does not exist. Is this important? I assume not I'm not sure ... Starting I can't get Apache to start with options. I have not edited any files whatsoever. Here's a cut-and-paste from a DOS window: D:\APACHE2bin\Apache -k start [Thu Jan 03 11:33:45 2002] [error] (22502)The system cannot find the file specif ied. : No installed service named Apache2. As you noted next, the service has to be installed first ... D:\APACHE2bin\Apache -k install Using D:\Apache2/blib Installing the Apache2 service The Apache2 service is successfully installed. D:\APACHE2bin\Apache -k start Using D:\Apache2/blib Starting the Apache2 service [Thu Jan 03 11:33:55 2002] [crit] (22703)The system could not find the environme nt option that was entered. : Apache2: Failed to start the service process. I don't know what would cause this ... The service started successfully on both my Win98 and Win2K machine - perhaps it's something to do with NT ... Would you happen to have another Apache2 binary installed before that had installed an Apache2 service? What if you try installing a service by a different name than the Apache2 default - is that any different? D:\APACHE2bin\Apache Using D:\Apache2/blib Using D:\Apache2/blib D:\APACHE2bin\Apache -k uninstall Removing the Apache2 service The Apache2 service has been removed successfully. Comments: 1) Note the 2 spaces after 'environment' in the error message after bin\Apache -k start. Is something meant to appear there? It appears that way, but I've not seen that message before ... 2) It's not at all obvious that Apache only starts with no command line options 3) If I try this in another DOS window while Apache is running I get a message I find hard to believe: D:\APACHE2bin\apache -k stop The Apache2 service is not started. The -k start/stop options appear to be specific to services ... 4) Only 1 Using statement is necessary Scripts === I can get http://127.0.0.1/ to work. I can get hello to work with http://127.0.0.1/hello. I can get d:/apache/cgi-bin/test.bat to work with http://127.0.0.1/cgi-bin/test-cgi.bat. But, if I patch the she-bang line of d:/apache/cgi-bin/printenv.pl and then try http://127.0.0.1/cgi-bin/printenv.pl, I get: Server error! Error message: couldn't create child process: 22502: D:/Apache2/cgi-bin/printenv.pl If you think this is a server error, please contact the webmaster Error 500 127.0.0.1 03/01/02 12:15:29 Apache/2.0.30-dev (Win32) mod_perl/1.99_01-dev Perl/v5.6.1 The log says (2 msgs for every try): [Thu Jan 03 12:15:29 2002] [error] [client 127.0.0.1] (22502)The system cannot find the file specified. : couldn't create child process: 22502: D:/Apache2/cgi-bin/printenv.pl [Thu Jan 03 12:15:29 2002] [error] [client 127.0.0.1] (22502)The system cannot find the file specified. : couldn't spawn child process: D:/Apache2/cgi-bin/printenv.pl Changing line 448 of httpd.conf from Options None to either Options ExecCGI or Options +ExecCGI did not get printenv.pl running either. I used ^C to stop and restarted the server after each edit. That option should be added for a script directory ... Do you have the shebang line as, eg, #!/Perl/bin/perl.exe (ie, with the .exe extension). The printenv.pl script, with this change, works for me; without the .exe extension, I get the error you noted ... BSOD Try starting Apache as a service, twice, with the same (default) name, in 2 DOS windows. This should not be possible, surely. -8- No, I wouldn't think so ... best regards, randy
Fw: Win32 modperl-2 binary
This is a copy of a msg I just sent to Randy instead of the list. I'm sending it to the list so others, and the archiver, will see it. Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html - Original Message - From: Ron Savage [EMAIL PROTECTED] To: Randy Kobes [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 3:05 PM Subject: Re: Win32 modperl-2 binary Randy It gets worse... See below. Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html - Original Message - From: Randy Kobes [EMAIL PROTECTED] To: Ron Savage [EMAIL PROTECTED] Cc: mod_perl [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 1:58 PM Subject: Re: Win32 modperl-2 binary On Thu, 3 Jan 2002, Ron Savage wrote: Folks Here's hoping I have not overlooked the obvious... What follows is a report on trying to use ftp://theoryx5.uwinnipeg.ca/pub/other/Apache2.tar.gz -8- Environment === WinNT 4 Sp 6a File: D:\Apache2\manual\platform\windows.html = Comments: 1) The reference to access.conf is presumably obsolete 2) The section Running Apache for Windows as a Service does not say whether or not the service needs to be started after having been installed. I think that would help beginners Hi Ron, That would be a suggestion for the Apache-2 developers ... File: D:\Apache2\blib\lib\Apache2.pm Comments: 1) This file contains the trivial bug in that the dir is specified twice Command: apache -V output contains: -D APACHE_MPM_DIR=server/mpm/winnt and this dir does not exist. Is this important? I assume not I'm not sure ... Starting I can't get Apache to start with options. I have not edited any files whatsoever. Here's a cut-and-paste from a DOS window: D:\APACHE2bin\Apache -k start [Thu Jan 03 11:33:45 2002] [error] (22502)The system cannot find the file specif ied. : No installed service named Apache2. As you noted next, the service has to be installed first ... D:\APACHE2bin\Apache -k install Using D:\Apache2/blib Installing the Apache2 service The Apache2 service is successfully installed. D:\APACHE2bin\Apache -k start Using D:\Apache2/blib Starting the Apache2 service [Thu Jan 03 11:33:55 2002] [crit] (22703)The system could not find the environme nt option that was entered. : Apache2: Failed to start the service process. I don't know what would cause this ... The service started successfully on both my Win98 and Win2K machine - perhaps it's something to do with NT ... Would you happen to have another Apache2 binary installed before that had installed an Apache2 No. This was the first ever Apache2 I d/l-ed and tried to install. service? What if you try installing a service by a different name than the Apache2 default - is that any different? No. D:\APACHE2bin\apache -k install -n MyApache Using D:\Apache2/blib Installing the MyApache service The MyApache service is successfully installed. D:\APACHE2bin\apache -k start -n MyApache Using D:\Apache2/blib Starting the MyApache service [Thu Jan 03 14:51:40 2002] [crit] (22703)The system could not find the environme nt option that was entered. : MyApache: Failed to start the service process. D:\APACHE2bin\apache -k uninstall -n MyApache Removing the MyApache service The MyApache service has been removed successfully. D:\APACHE2bin\Apache Using D:\Apache2/blib Using D:\Apache2/blib D:\APACHE2bin\Apache -k uninstall Removing the Apache2 service The Apache2 service has been removed successfully. Comments: 1) Note the 2 spaces after 'environment' in the error message after bin\Apache -k start. Is something meant to appear there? It appears that way, but I've not seen that message before ... 2) It's not at all obvious that Apache only starts with no command line options 3) If I try this in another DOS window while Apache is running I get a message I find hard to believe: D:\APACHE2bin\apache -k stop The Apache2 service is not started. The -k start/stop options appear to be specific to services ... 4) Only 1 Using statement is necessary Scripts === I can get http://127.0.0.1/ to work. I can get hello to work with http://127.0.0.1/hello. I can get d:/apache/cgi-bin/test.bat to work with http://127.0.0.1/cgi-bin/test-cgi.bat. But, if I patch the she-bang line of d:/apache/cgi-bin/printenv.pl and then try http://127.0.0.1/cgi-bin/printenv.pl, I get: Server error! Error message: couldn't create child process: 22502: D:/Apache2/cgi-bin/printenv.pl If you think this is a server error, please contact the webmaster Error 500 127.0.0.1 03/01/02 12:15:29 Apache/2.0.30-dev
Re: Fw: Win32 modperl-2 binary
On Thu, 3 Jan 2002, Ron Savage wrote: This is a copy of a msg I just sent to Randy instead of the list. I'm sending it to the list so others, and the archiver, will see it. - Original Message - From: Randy Kobes [EMAIL PROTECTED] To: Ron Savage [EMAIL PROTECTED] Cc: mod_perl [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 1:58 PM Subject: Re: Win32 modperl-2 binary I don't know what would cause this ... The service started successfully on both my Win98 and Win2K machine - perhaps it's something to do with NT ... Would you happen to have another Apache2 binary installed before that had installed an Apache2 No. This was the first ever Apache2 I d/l-ed and tried to install. service? What if you try installing a service by a different name than the Apache2 default - is that any different? No. That's too bad ...:( There's probably some more work that needs to be done in getting the service working right ... By the way, if you disable modperl, does it work? I can get d:/apache/cgi-bin/test.bat to work with http://127.0.0.1/cgi-bin/test-cgi.bat. But, if I patch the she-bang line of d:/apache/cgi-bin/printenv.pl and then try http://127.0.0.1/cgi-bin/printenv.pl, I get: Server error! Error message: couldn't create child process: 22502: D:/Apache2/cgi-bin/printenv.pl If you think this is a server error, please contact the webmaster Error 500 127.0.0.1 03/01/02 12:15:29 Apache/2.0.30-dev (Win32) mod_perl/1.99_01-dev Perl/v5.6.1 Do you have the shebang line as, eg, #!/Perl/bin/perl.exe (ie, with the .exe extension). The printenv.pl script, with this change, works for me; without the .exe extension, I get the error you noted ... Weird. I added .exe to the she-bang line and it ran, but... o) Will we have to do that for every script? Not happy o) IE offers to download the output of printenv.pl. I saved it in a disk file and it is the %ENV Does it work if you specify the Perl binary as #!D:/Perl/bin/Perl.exe ie, with the drive letter, and in a case-sensitive manner? Probably this aspect of cgi scripts is also work in progress .. best regards, randy
Fw: Win32 modperl-2 binary
This too is a copy of a msg sent directly to Randy instead of the list. (Back to sleep). Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html - Original Message - From: Ron Savage [EMAIL PROTECTED] To: Randy Kobes [EMAIL PROTECTED] Sent: Thursday, January 03, 2002 3:37 PM Subject: Re: Win32 modperl-2 binary Randy Ahhh. See below. Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html I think this is also work in progress .. Actually, does #!D:/Perl/bin/Perl.exe still with the .exe extension, *and* capitalized as such, work? I got the download window if I use perl.exe (lowercase perl). It is not the capitalization which makes it 'work'. It is the D:. This works: #!D:/usr/bin/perl.exe since I have copied perl.exe to D:/usr/bin (and nothing else to D:/usr/). The .exe is needed too. This fails: #!D:/usr/bin/perl So does this: #!d:/usr/bin/perl This works: #!d:/usr/bin/perl.exe Over and out.
Re: Fw: Win32 modperl-2 binary
Randy Disabling modperl causes yet other strange behaviour. See below. Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html That's too bad ...:( There's probably some more work that needs to be done in getting the service working right ... By the way, if you disable modperl, does it work? When I comment out the modperl stuff: o) I can't use d:/usr/bin/perl.exe any more. I get the error: Can't find the dynamic link library Perl56.dll... o) I can use d:/perl/bin/perl.exe though
Re: Fw: Win32 modperl-2 binary
Randy Disabling modperl affects -k. See below. Cheers Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html That's too bad ...:( There's probably some more work that needs to be done in getting the service working right ... By the way, if you disable modperl, does it work? After disabling modperl in httpd.conf and restarting... D:\APACHE2bin\apache -k install Installing the Apache2 service The Apache2 service is successfully installed. D:\APACHE2bin\apache -k start Starting the Apache2 service The Apache2 service is running. D:\APACHE2bin\apache -k stop The Apache2 service is stopping. The Apache2 service has stopped. D:\APACHE2bin\apache -k uninstall Removing the Apache2 service The Apache2 service has been removed successfully. (Re-enable modperl and restart) D:\APACHE2bin\apache -k install Using D:\Apache2/blib Installing the Apache2 service The Apache2 service is successfully installed. D:\APACHE2bin\apache -k start Using D:\Apache2/blib Starting the Apache2 service [Thu Jan 03 15:53:12 2002] [crit] (22703)The system could not find the environme nt option that was entered. : Apache2: Failed to start the service process.
Sticky Pages.
Have a strange problem using modPerl as follows: OS: Windows 2000 Professional Webserver: Apache/1.3.22 (Win32) mod_perl: mod_perl/1.26_01-dev mod_perl is loaded in the httpd.conf file (LoadModule perl_module modules/mod_perl.so AddModule mod_perl.c), and also appears in the .htaccess file for the TWiki directory: Files * SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On /Files The Application i'm using is called TWiki (http://Twiki.org), and if you view some page within Twiki, close the browser, open a new one and hit the link that takes you to the front page of Twiki, the last page you looked at in the just-deleted browser will be shown instead of the front page. TWiki does not exhibit this behavior when run as a CGI program, and also I just checked and it has the same behavior using Mozilla 0.9.6. FWIW, I tried updating mod_perl using cpan and it claims i'm up to date. Any suggestions on how to fix this? TIA, Dave LeBlanc
Re: Sticky Pages.
David LeBlanc wrote: Have a strange problem using modPerl as follows: OS: Windows 2000 Professional Webserver:Apache/1.3.22 (Win32) mod_perl: mod_perl/1.26_01-dev mod_perl is loaded in the httpd.conf file (LoadModule perl_module modules/mod_perl.so AddModule mod_perl.c), and also appears in the .htaccess file for the TWiki directory: Files * SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On /Files The Application i'm using is called TWiki (http://Twiki.org), and if you view some page within Twiki, close the browser, open a new one and hit the link that takes you to the front page of Twiki, the last page you looked at in the just-deleted browser will be shown instead of the front page. TWiki does not exhibit this behavior when run as a CGI program, and also I just checked and it has the same behavior using Mozilla 0.9.6. FWIW, I tried updating mod_perl using cpan and it claims i'm up to date. Any suggestions on how to fix this? I'm not familiar with this sw, but I'll assume that it remembers the state (the last visited page). Does Twiki claim to be mod_perl clean? It's probably not coded with persistency in mind or happens to have the closure problem under Registry. As a temp workaround use Apache::PerlRun instead of Apache::Registry. See the guide for more info on these issues. In particular: http://perl.apache.org/guide/porting.html#Exposing_Apache_Registry_secret and http://perl.apache.org/guide/porting.html#Sometimes_it_Works_Sometimes_it _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
cvs commit: modperl/Apache Apache.pm
stas02/01/02 01:41:23 Modified:.cgi_to_mod_perl.pod mod_perl_method_handlers.pod mod_perl.pod mod_perl_traps.pod Apache Apache.pm Log: - pod escape [] chars Revision ChangesPath 1.8 +2 -2 modperl/cgi_to_mod_perl.pod Index: cgi_to_mod_perl.pod === RCS file: /home/cvs/modperl/cgi_to_mod_perl.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cgi_to_mod_perl.pod 3 Mar 2000 20:41:59 - 1.7 +++ cgi_to_mod_perl.pod 2 Jan 2002 09:41:23 - 1.8 @@ -58,7 +58,7 @@ If you are using Perl 5.004 most CGI scripts can run under mod_perl untouched. If you're using 5.003, Perl's built-in Cread() and Cprint() functions do not work as they do under CGI. If you're -using CGI.pm, use C$query-print instead of plain 'ol Cprint(). +using CGI.pm, use C$query-Egtprint instead of plain 'ol Cprint(). =item HEADERS @@ -73,7 +73,7 @@ print Content-type: text/html\n\n; -If you're using CGI.pm and 'print $q-header' you do +If you're using CGI.pm and 'print $q-Egtheader' you do _not_ need CPerlSendHeader On. =item NPH SCRIPTS 1.9 +2 -2 modperl/mod_perl_method_handlers.pod Index: mod_perl_method_handlers.pod === RCS file: /home/cvs/modperl/mod_perl_method_handlers.pod,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_perl_method_handlers.pod 3 Mar 2000 20:41:59 - 1.8 +++ mod_perl_method_handlers.pod 2 Jan 2002 09:41:23 - 1.9 @@ -169,8 +169,8 @@ =head1 AUTHOR -This document is written by Ask Bjoern Hansen [EMAIL PROTECTED] or -[EMAIL PROTECTED]. Corrections and suggestions are most +This document is written by Ask Bjoern Hansen Elt[EMAIL PROTECTED]gt or +Elt[EMAIL PROTECTED]gt. Corrections and suggestions are most welcome. In particular would more examples be appreciated, most of my own code is way too integrated with our system, which isn't suitable for public release. 1.22 +20 -20modperl/mod_perl.pod Index: mod_perl.pod === RCS file: /home/cvs/modperl/mod_perl.pod,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- mod_perl.pod 25 Nov 2000 15:39:22 - 1.21 +++ mod_perl.pod 2 Jan 2002 09:41:23 - 1.22 @@ -36,8 +36,8 @@ =head1 FAQ -The mod_perl FAQ is maintained by Frank Cringle [EMAIL PROTECTED]: -http://perl.apache.org/faq/ +The mod_perl FAQ is maintained by Frank Cringle +Elt[EMAIL PROTECTED]gt: http://perl.apache.org/faq/ =head1 Apache/Perl API @@ -69,7 +69,7 @@ See eg/startup.pl for an example to start with. -In an httpd.conf Location /foo or .htaccess you need: +In an httpd.conf EltLocation /fooEgt or .htaccess you need: PerlHandler sub_routine_name @@ -467,10 +467,10 @@ PerlTransHandler OneTrans TwoTrans RedTrans BlueTrans -With the method, Apache-push_handlers, callbacks can be added to +With the method, Apache-Egtpush_handlers, callbacks can be added to the stack by scripts at runtime by mod_perl scripts. -Apache-push_handlers takes the callback hook name as it's first +Apache-Egtpush_handlers takes the callback hook name as it's first argument and a subroutine name or reference as it's second. e.g.: Apache-push_handlers(PerlLogHandler, \first_one); @@ -493,7 +493,7 @@ CGI.pm maintains a global object for it's plain function interface. Since the object is global, it does not go out of scope, DESTROY is -never called. CGI-new can call: +never called. CGI-Egtnew can call: Apache-push_handlers(PerlCleanupHandler, \CGI::_reset_globals); @@ -526,8 +526,8 @@ PerlHandler Apache::MsqlProxy PerlHandler is never actually invoked unless translate() sees the -request is a proxy request ($r-proxyreq), if it is a proxy request, -translate() set $r-handler(perl-script), only then will PerlHandler +request is a proxy request ($r-Egtproxyreq), if it is a proxy request, +translate() set $r-Egthandler(perl-script), only then will PerlHandler handle the request. Now, users do not have to specify 'PerlHandler Apache::MsqlProxy', the translate() function can set it with push_handlers(). @@ -601,7 +601,7 @@ % perl Makefile.PL PERL_STACKED_HANDLERS=1 [PERL_FOO_HOOK=1,etc] -Another method 'Apache-can_stack_handlers' will return TRUE if +Another method 'Apache-Egtcan_stack_handlers' will return TRUE if mod_perl was configured with PERL_STACKED_HANDLERS=1, FALSE otherwise. @@ -611,13 +611,13 @@ =head1 PERL SECTIONS