Re: [OT] P3P policies and IE 6 (something to be aware of)
On Tue, 30 Oct 2001, Robin Berjon wrote: If anyone feels like undertaking this task, imho the best first step would be to produce XML::P3P (it's not Apache dependent) and add Apache::P3P as a wrapper around that that would take care of a few simple things such as setting the headers properly and so forth. Hi. Don't normally post or read this list but Leon Brocard pointed this out to me. I've been doing a lot of work for my company on what you talking about. Code is available at: http://2shortplanks.com/temp/P3P-ToCP-0.02.tar.gz. Documentation (html of the pod) is also at http://2shortplanks.com/temp/P3P_ToCP.html This is a beta version of a module that will take a P3P document and create a CP version of it that is suitable for inserting in the HTTP P3P header. This will go up on CPAN very soon, as soon as we've worked out what to call it. I've been in discussion with the modules list about what it should be named (as there are thoughts that it shouldn't go in the XML name space.) Any ideas on this would be appreciated. Apart from that it's pretty much complete (but I really could do with some feedback on the code too.) Some additional documentation regarding P3P and p3p2cp (a command line script to trigger the module) probably could do with being written. As goes for integrating it with apache, I guess the most sensible thing to do would be to parse the P3P policies at start up and cache the headers that should be delivered each request. Hope this is of some help. Mark. -- 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: Exporting C++ class to Perl?
Hi, Actually I mean examples that contain CPP code which has been exported to Perl.. anyway I'll study 'Inline*' modules. Vlad. - Original Message - From: Sisyphus [EMAIL PROTECTED] To: Vlad Safronov [EMAIL PROTECTED] Sent: Wednesday, October 31, 2001 3:15 AM Subject: Re: Exporting C++ class to Perl? Hi, You might be able to do what you want with the 'Inline' and 'Inline::CPP' modules from cpan. Check them out - they're pretty well documented and contain examples. The inline mailing list is also available for support. For details of how to subscribe to the list, see http://lists.perl.org/ and click on the link to 'inline'. Cheers, Rob - Original Message - From: Vlad Safronov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 31, 2001 3:26 AM Subject: Exporting C++ class to Perl? Hi, How can I export C++ class and its interface to Perl? Is it just like exporting simple C function to Perl (in perlxs doc. example)? Is there good (not big) CPAN examples for this problem? Vlad.
Unpredictable Effects after Upload...
Hello all, Platform: Windows 2000, Apache, mod_perl Problem: When submitting forms that include files (uploads) my script becomes very unpredictable - CGI.pm doesn't seem to be able to recognise any data that's passed as part of the query string (it does still process form input though) once a file has been uploaded. Submit the same form but without attaching a file and everything works perfectly. There is nothing in the error logs to indicate what the problem might by (I'm using the -w flag). Can anyone offer any insight into what might me going on here? Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/
Re: Unpredictable Effects after Upload...
On Wed, 31 Oct 2001, Jonathan M. Hollin wrote: Date: Wed, 31 Oct 2001 12:34:40 - From: Jonathan M. Hollin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Unpredictable Effects after Upload... Hello all, Platform: Windows 2000, Apache, mod_perl Problem: When submitting forms that include files (uploads) my script becomes very unpredictable - CGI.pm doesn't seem to be able to recognise any data that's passed as part of the query string (it does still process form input though) once a file has been uploaded. Submit the same form but without attaching a file and everything works perfectly. There is nothing in the error logs to indicate what the problem might by (I'm using the -w flag). Can anyone offer any insight into what might me going on here? Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/ Jonathan, Please try using Apache::Request instead of CGI.pm. Furthermore, look into Apache::Upload. I'll bet these modules will fix your problems. `perldoc` those modules (install them if you have to) and also read The Guide (tm) for more information: http://perl.apache.org/guide/ ky
Re: 2 mod_perl questions
I'm a novice in mod_perl but I already surprised with its features ! Before you continue any further with new questions it's a time to read the guide: http://perl.apache.org/guide/ Could you please help me with following two things: 1) What is the most common directory structure for mod_perl web-applications ? I keep all my modules in a separate directory (which is closed for internet-users) and I have to add path to them to @INC (for automatic reloading). But what if there are several applications with modules of the same name (like config.pm or utils.pm) ? You have to fully qualify these. E.g. MyProject1::config, MyProject2::config and etc. You will find more examples in the guide. 2) Suppose I want to share variable $q between several modules. http://perl.apache.org/guide/perl.html#Using_Global_Variables_and_Shari _ 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/
Re: Unpredictable Effects after Upload...
I dunno - I recently fixed a problem with the upload_hook that was making a similar problem... Tell me: is there anything weird in the error_log right after the upload? Perhaps the file is not being parsed properly... Issac Internet is a wonderful mechanism for making a fool of yourself in front of a very large audience. --Anonymous Moving the mouse won't get you into trouble... Clicking it might. --Anonymous PGP Key 0xE0FA561B - Fingerprint: 7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B - Original Message - From: Jonathan M. Hollin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 31, 2001 14:34 Subject: Unpredictable Effects after Upload... Hello all, Platform: Windows 2000, Apache, mod_perl Problem: When submitting forms that include files (uploads) my script becomes very unpredictable - CGI.pm doesn't seem to be able to recognise any data that's passed as part of the query string (it does still process form input though) once a file has been uploaded. Submit the same form but without attaching a file and everything works perfectly. There is nothing in the error logs to indicate what the problem might by (I'm using the -w flag). Can anyone offer any insight into what might me going on here? Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/
inconsistency between CGI.pm and Apache::Request
There is some inconsistency between CGI.pm and Apache::Request's param() method, especially in handling of multivalued parameter. $q = CGI-new; $q-param(foo = qw(a b c)); @foo = $q-param('foo'); # ('a', 'b', 'c') $q-param(bar = [ qw(a b c) ]); @bar = $q-param('bar'); # (['a', 'b', 'c']) $r = Apache::Request-new(Apache-request); $r-param(foo = qw(a b c)); # die with an error $r-param(bar = [ qw(a b c) ]); @bar = $r-param('bar'); # ('a', 'b', 'c') Am I the only one who wants consistency between the two? CGI.pm 2.78 Apache::Request 0.33 -- Tatsuhiko Miyagawa [EMAIL PROTECTED]
Re: inconsistency between CGI.pm and Apache::Request
There is some inconsistency between CGI.pm and Apache::Request's param() method, especially in handling of multivalued parameter. $q = CGI-new; $q-param(foo = qw(a b c)); @foo = $q-param('foo'); # ('a', 'b', 'c') $q-param(bar = [ qw(a b c) ]); @bar = $q-param('bar'); # (['a', 'b', 'c']) $r = Apache::Request-new(Apache-request); $r-param(foo = qw(a b c)); # die with an error $r-param(bar = [ qw(a b c) ]); @bar = $r-param('bar'); # ('a', 'b', 'c') Doesn't this have something to do with the way your shorthanding Apache::Request? Try $r-param('foo',qw(a b c)); It might work... I remember running into this several years ago, and never mentioned it. Am I the only one who wants consistency between the two? No. It's my opinion that CGI.pm is wrong. Never would an input value come out as an arrayref. And never would you want to store an arrayref in something that might be used to generate hidden inputs. Lincoln can argue with me. Rob -- Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former. --Albert Einstein
[OT] open source jobsite
Hi, We launched a free open source jobsite today (open source jobs only, and non-profit). Check it out at http://www.freeusall.com/ It's built on mod_perl and Apache. Any feedback would be much appreciated. (please send directly to me as this is very OT). thanks, ~mark
ANNOUNCE: Apache::Sybase::ConPool
The uploaded file Apache-Sybase-ConPool-1.00.tar.gz has entered CPAN as file: $CPAN/authors/id/M/ME/MEWP/Apache-Sybase-ConPool-1.00.tar.gz size: 4185 bytes md5: 9c7e3cb7064b44c36b88612c92e9cf76 This module turns an Apache web server with mod_perl into a poor man's connection pool, by opening a pre-defined number of connections to your database server when apache is initialized, and then sharing these connections among the httpd child processes. I've been using a module like this on a fairly large site (a farm of 40 web servers) for about a year now, and it works quite well. This module requires Sybase::CTlib. I have not (yet) tried to do this with DBI. Michael -- Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler [EMAIL PROTECTED] - [EMAIL PROTECTED] International Sybase User Group - http://www.isug.com
RE: [OT] pdf creation
simran writes: I believe there is also a Content-disposition tag you can use to tell the browser what to name the file... As mentioned below in my original post, it doesn't work in all browsers. Steve
Re: [OT] pdf creation
Steve Smith wrote: simran writes: I believe there is also a Content-disposition tag you can use to tell the browser what to name the file... As mentioned below in my original post, it doesn't work in all browsers. Like you say, PATH_INFO works for many browsers. I ran into issues with IE not using it properly... I ended up having to tack MYPDFFILE.pdf onto the end of the URI, just so that it would use the correct extension. Something to try perhaps. e.g.: http://server/perl/pdfgen.pl/MYPDFFILE.pdf?MYPDFFILE.pdf In my case, I had to do this trick to get *.exe files to download as *.exe instead of *.com. In the couple of PDF scripts that I have written, I used other modules to create a PostScript or PNG file, then used a system call to convert it to a PDF. For something that isn't being used very often this should be acceptable. Once its a PDF on the system, the file can read in and printed to STDOUT or a redirect to http://server/tmpfiles/$randomtmpfile can be done. -- Regards, Wim Kerkhoff, Software Engineer Merilus, Inc. -|- http://www.merilus.com Email: [EMAIL PROTECTED]
no_local_copy
Hi All, I've searched the newsgroups and haven't found an answer for this. Sorry if it has already been addressed. I was wondering whether the no_local_copy element of the request_rec structure was available via the mod_perl API? (AFAIK no_local_copy is used instead of no_cache to stop the server sending 304 Not Modified back to the client.) Cheers, Dave -- David McDonnell Web Programmer - CSU Online Division of Information Technology email: [EMAIL PROTECTED] Ph: +61 2 69334217 --
Re: no_local_copy
McDonnell, David wrote: Hi All, I've searched the newsgroups and haven't found an answer for this. Sorry if it has already been addressed. I was wondering whether the no_local_copy element of the request_rec structure was available via the mod_perl API? Nope, it doesn't. BTW, all the available API is described in 'perldoc Apache'. (AFAIK no_local_copy is used instead of no_cache to stop the server sending 304 Not Modified back to the client.) _ 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/
Re: Problem with Directory in Perl sections
OK, looks like no-one has any ideas - maybe I should rephrase the question. Does anyone here have Directory working in Perl sections in mod_perl 1.25 or above? Thanks, Jim On Mon, Oct 29, 2001 at 08:58:24AM +, James Stalker wrote: Hi, I have hit a problem with the latest couple of versions of mod_perl, and I wondered if anyone might know a solution. We're using Apache 1.3.22 with mod_perl 1.26, and there appears to be a problem with the Directory directive in perl sections... e.g. $Directory{$DocumentRoot}={ Options = '-Indexes FollowSymLinks', AllowOverride = 'None', SetHandler = 'perl-script', PerlHandler = 'Apache::EnsEMBL::SendDecPage', order = 'deny,allow', allow = 'from all', }; does not work in a Perl section but it works fine outside: Directory /mysql/ensembl/www/sanger-test/htdocs Options -Indexes FollowSymLinks AllowOverride None SetHandler perl-script PerlHandler Apache::EnsEMBL::SendDecPage order deny,allow allow from all /Directory /perl-status reports that the former looks as I would expect: %Directory = ( '/mysql/ensembl/www/server/htdocs' = { 'Deny' = 'from all', 'AllowOverride' = 'None', 'Order' = 'deny,allow', 'PerlHandler' = 'Apache::EnsEMBL::SendDecPage', 'Options' = '-Indexes FollowSymLinks', 'SetHandler' = 'perl-script' }, ); There are no errors reported, but the handler simply doesn't kick in. We have been using this config for some months now, and this worked fine in 1.21. It stopped working by at least version 1.25. Anybody have any ideas? Regards, James -- James Stalker Senior Web Developer - Project Ensembl - http://www.ensembl.org
DBI 1.15+ establishes multiple connections under parent mod_perl process
I think I have found a curious bug in DBI. It seems that since DBI 1.15 - 1.20, when you bring up apache/mod_perl and execute queries against the database handle in the parent process (startup.pl), multiple connections result against the database. If I switch to DBI 1.14, no such problem occurs. I have found this problem occurs with: DBI 1.20 + DBD::Oracle 1.12 DBI 1.15 + DBD::Oracle 1.07 DBI 1.16 + DBD::Oracle 1.07 I have turned on Apache::DBI::DEBUG and trace(2) in DBI. Could someone tell me what I should be looking for or can someone else shed any light on this? I am not sure if this is necessarily a mod_perl issue or if mod_perl is just eliciting a bug in DBI. thanks, --eric
cvs commit: modperl-site index.html
stas01/10/31 06:37:54 Modified:.index.html Log: modperl 2.0 snapshot's link correction Revision ChangesPath 1.93 +7 -1 modperl-site/index.html Index: index.html === RCS file: /home/cvs/modperl-site/index.html,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- index.html2001/10/23 20:09:55 1.92 +++ index.html2001/10/31 14:37:54 1.93 @@ -185,7 +185,7 @@ p The latest mod_perl 2.0 development a href=mod_perl_cvs.htmlCVS snapshot/a is available from A - HREF=http://cvs.apache.org/snapshots/modperl/;here/A + HREF=http://cvs.apache.org/snapshots/modperl-2.0/;here/A (updated every 6 hours) for those living in the future. /p @@ -500,6 +500,12 @@ li a href=http://mathforum.org/epigone/modperl;an Epigone archive/a by Ken Williams. + /li + li + a + href=http://msgs.securepoint.com/cgi-bin/get/apache-current.html; + msgs.securepoint.com + /a /li li a href=http://groups.yahoo.com/group/modperl/;