modperl compile problems!
Hello! i try to build a apache with mod_perl and ActiveState Perl. The compiler stops always with the same error message, I tried several different ways which are described in the Readme docs, and I try the Apache Toolbox (automated apache build). I saw a thread which deals which the same question but there was not a solution (only some ideas). Hope somebody can help ;-) bye Here is my compile log: gcc -c -I.. -I/usr/local/ActivePerl-5.6/lib/5.6.1/i686-linux-thread-multi/CORE -I../os/unix -I../include -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -DUSE_REENTRANT_API -D_POSIX_C_SOURCE=199506L -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED `../apaci` http_core.c In file included from /usr/include/sys/sem.h:28, from ../include/ap_config.h:495, from ../include/httpd.h:72, from http_core.c:61: /usr/include/sys/ipc.h:25: warning: #warning Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE http_core.c: In function `default_handler': http_core.c:3802: `caddr_t' undeclared (first use in this function) http_core.c:3802: (Each undeclared identifier is reported only once http_core.c:3802: for each function it appears in.) http_core.c:3802: parse error before `mm' http_core.c:3866: `mm' undeclared (first use in this function) make[3]: *** [http_core.o] Error 1 make[2]: *** [subdirs] Error 1 make[2]: Leaving directory `/data/INSTALL/APACHE/apache_1.3.24/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/data/INSTALL/APACHE/apache_1.3.24' make: *** [build] Error 2 -- Sven Sternberger Tel.: +49 (0) 40 8998 4397 Desy Email: [EMAIL PROTECTED] Notkestr. 85 D-22607 Hamburg
Re: install test fails
On Tue, 2 Apr 2002, terry mcintyre wrote: Redhat Linux 7.2 Apache 1.3.24 Perl 5.6.1 mod-perl-1.26 make test fails with result: /usr/bin/perl t/TEST 0 Can't locate object method new via package URI::URL (perhaps you forgot to load URI::URL?) at ../blib/lib/Apache/test.pm line 252. make: *** [run_tests] Error 255 I had the same problem today. What I did was to edit the test scripts concerned (blib/lib/Apache/test.pm, etc) to add use URI::URL;. There is also a libwww module problem, with $line being undefined in a chunk section, which I got around by adding if ($line) I am not sure what really caused the problem, but I also heard there was a problem with the current version of Apache handling chunks. You might also have the problem of not being able to kill the test httpd process. Anyway, I managed to make make test successful and installed the package. There was no real problem actually using the package for me so far. Regards, Jie
Re: Astronomical Information [OT]
Hi there, On 2 Apr 2002, simran wrote: I have (for weeks) been trying to find a Perl Module (preferablly one that works under mod_perl) that does various astronomical calculations - in particular i want to be able to work out the distance of a planet (in our solar system) on a given date. If you need only approximate answers then you can assume that the planets are all in the same plane, and use Kepler's laws (very simple geometry) to calculate the positions based on a known set of initial positions at a given date and time. You could modify your inital conditions occasionally to maintain reasonable accuracy. Please contact me privately if you wish to pursue the idea, this is way Off Topic for this list. 73, Ged.
Re: modperl compile problems!
On 3 Apr 2002, Sven Sternberger wrote: Hello! i try to build a apache with mod_perl and ActiveState Perl. The compiler stops always with the same error message, I tried several different ways which are described in the Readme docs, and I try the Apache Toolbox (automated apache build). I saw a thread which deals which the same question but there was not a solution (only some ideas). gcc -c -I.. -I/usr/local/ActivePerl-5.6/lib/5.6.1/i686-linux-thread-multi/CORE -I../os/unix -I../include -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -DUSE_REENTRANT_API -D_POSIX_C_SOURCE=199506L -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED `../apaci` http_core.c In file included from /usr/include/sys/sem.h:28, from ../include/ap_config.h:495, from ../include/httpd.h:72, from http_core.c:61: /usr/include/sys/ipc.h:25: warning: #warning Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE http_core.c: In function `default_handler': http_core.c:3802: `caddr_t' undeclared (first use in this function) http_core.c:3802: This has come up before - at least one person found that building mod_perl as a dso outside of the Apache source tree, as described at the end of INSTALL.apaci in the mod_perl sources, worked. best regards, randy kobes
RE: Multiple Cookie Header Bug with Apache::ProxyRewrite
Alex, Thanks for the report! I'll look into it and your provided patch as soon as I have a chance. Thanks, Christian - Christian Gilmore Technology Leader GeT WW Global Applications Development IBM Software Group -Original Message- From: Alex Menendez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 11:45 PM To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]'; Sean Corfield; Alex Menendez Subject: Multiple Cookie Header Bug with Apache::ProxyRewrite hello, Christian I found a bug with how Apache::ProxyRewite handles cookies. Our proxy server was trying to display a remote application that heavily uses cookies butthe application was failing miserably. I compared the headers of what the proxy server was sending to the client vs. what the remote server was displaying. the proxy server was only sending one (the last one) of 4 Set-Cookie headers. The problems lies in the way that all headers are set: $r-headers_out-{$header} = $value; I patched the server by changing sum code in: sub respond { } to allow for multiple cookie headers. Here is what I did: # feed reponse back into our request_record $response-scan(sub { my ($header, $value) = @_; $r-log-debug(respond: OUT $header: $value); if ($header =~ /^Set-Cookie/i) { $value =~ /path=([^;]+)/i; my $cookie_path = $1; rewrite_url($r, $remote_site, \$cookie_path, $mapref); $value =~ s/(path=)([^;]+)/$1$cookie_path/i; # Multiple Cookie Patch added by amen # 04/03/2002 $r-headers_out-add( 'Set-Cookie' = $value ); $r-log-debug(respond: OUT-MOD $header: $value); } else { $r-headers_out-{$header} = $value; } }); Makes sense :) thanx for writing this, -amen BTW we are using version 0.15
RE: modperl compile problems!
Here's what I did: 1. Retrieve the latest build of the mod_perl at - http://cvs.apache.org/snapshots/modperl/ 2. Compile mod_perl outside of the Apache Source Tree, as described in file INSTALL.apaci; suggest - perl Makefile.PL USE_APXS=1 EVERYTHING=1 WITH_APXS=/usr/bin/apxs make make test make install 3. Compile Apache cd apache_1.3.23 and issue the following to configure APACHE make distclean env CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ SSL_BASE=/usr/local/ssl \ EAPI_MM=SYSTEM LIBS=-ltcl8.3 -lm -lpthread \ ./configure \ --verbose \ --server-uid=nobody \ --server-gid=nobody \ --enable-rule=EAPI \ --enable-rule=SHARED_CORE \ --enable-module=ssl \ --enable-module=status \ --enable-module=so \ --enable-module=headers \ --enable-module=info \ --enable-module=speling *** Note: You may or may not need the EAPI - Read the Documentation *** *** If not, then remove EAPI_MM=SYSTEM and --enable-rule=EAPI \ *** *** If not SSL then remove SSL_BASE=/usr/local/ssl \ and*** *** --enable-module=ssl \ *** make make install 4. Edit /usr/local/apache/conf/httpd.conf file; comment out - AddModule directives and remove and redundant loadModule directives. 5.Restart APACHE - /usr/local/apache/bin/apachectl start/restart RB -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 9:30 AM To: Sven Sternberger Cc: [EMAIL PROTECTED] Subject: Re: modperl compile problems! On 3 Apr 2002, Sven Sternberger wrote: Hello! i try to build a apache with mod_perl and ActiveState Perl. The compiler stops always with the same error message, I tried several different ways which are described in the Readme docs, and I try the Apache Toolbox (automated apache build). I saw a thread which deals which the same question but there was not a solution (only some ideas). gcc -c -I.. -I/usr/local/ActivePerl-5.6/lib/5.6.1/i686-linux-thread-multi/CORE -I../os/unix -I../include -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -DUSE_REENTRANT_API -D_POSIX_C_SOURCE=199506L -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED `../apaci` http_core.c In file included from /usr/include/sys/sem.h:28, from ../include/ap_config.h:495, from ../include/httpd.h:72, from http_core.c:61: /usr/include/sys/ipc.h:25: warning: #warning Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE http_core.c: In function `default_handler': http_core.c:3802: `caddr_t' undeclared (first use in this function) http_core.c:3802: This has come up before - at least one person found that building mod_perl as a dso outside of the Apache source tree, as described at the end of INSTALL.apaci in the mod_perl sources, worked. best regards, randy kobes
Re: Berkeley DB 4.0.14 not releasing lockers under mod_perl
Based on others' comments, I found the solution to the problem. I just added a db_close(), and the problem is really, truly gone. For good measure, I put a db_sync() in as well. Why db_close isn't necessary with 3.x, but is with 4.0 is the weird part. Maybe this suggests a bug in 4.0? Or is it just bad style to have left it out in the first place? I was under the impression that the untie/undef should have accomplished this implicitly within BerkeleyDB.pm. Here is the modified test script: - TEST SCRIPT - #!/usr/bin/perl use strict; use BerkeleyDB qw( DB_CREATE DB_INIT_MPOOL DB_INIT_CDB ); # Change me to something appropriate for your system my $dir='/home/httpd/some/directory'; system( rm $dir/__db* $dir/TESTdb ); foreach( 1..5 ) { my $env = open_env($dir); my %hash; my $db = open_db( TESTdb, \%hash, $env ); $db-db_sync(); ### NEW $db-db_close();### NEW untie %hash; undef $db; undef $env; } print HTTP/1.1 200\nContent-type: text/plain\n\n; print `db_stat -c -h $dir`; print \n; sub open_env { my $env = new BerkeleyDB::Env( -Flags=DB_INIT_MPOOL|DB_INIT_CDB|DB_CREATE, -Home= $_[0], ); die Could not create env: $! .$BerkeleyDB::Error. \n if !$env; return $env; } sub open_db { my( $file, $Rhash, $env ) = @_; my $db_key = tie( %{$Rhash}, 'BerkeleyDB::Btree', -Flags=DB_CREATE, -Filename=$file, -Env=$env ); die Can't open $file: $! .$BerkeleyDB::Error.\n if !$db_key; return $db_key; } Dan Wilga [EMAIL PROTECTED] Web Technology Specialist http://www.mtholyoke.edu Mount Holyoke CollegeTel: 413-538-3027 South Hadley, MA 01075Seduced by the chocolate side of the Force
Session management
Hello all, I'm having something of a disconnect in my brain because I've absorbed a lot of mod_perl info in a very short period of time, so bear with me. =) Last week, I figured out how to use Apache::Session::File and got it working nicely. This week, I've figured out how to use Apache::AuthCookieDBI and also got it working nicely. Now to figure out how to make them play nicely together. :-) I think I'm getting confused because there's two different concepts of 'session' at work here. The AuthCookie concept of a session is tracking multiple page hits from an authenticated user - sessions as a security device. The Apache::Session concept of sessions is to pass data from request to request - state maintenance. (Correct me if I'm wrong) It would seem that I would want to use the key generated / returned-via-cookie in the AuthCookie processing to be used as the key to create/access the Apache::Session session. I imagine this is a pretty common task. My question is this: how do I make this connection? Do I store the key away in the Authen/Authz phases with pnotes() and then get it in the content generation phase when I'm getting/setting data into the Apache::Session object? Do I subclass further from AuthCookieDBI and provide hooks in the authorize() method to create an Apache::Session object at that time using the AuthCookie key? I'm just a tad confused, being a first-timer. =) The big picture is simple: I want to know what user is logged in and make sure his session is valid, and I want to store user preferences in his session so that I know how to customize his interface. You know, maybe we have a user_preferences table in the database, and upon successful login, I want to set up an Apache::Session object to figure out things like what color scheme this user wants and what region of the country he's in so I can present region-specific data. How do I approach this task? Thanks, Fran
Re: Modperl Footers/Headers
Philip M. Gollucci wrote: Okay I've got an FBSD4.5 box with apache-1.3.24 with mod_perl1.26 I need to add a canned Footer to every page except one (toc.html). This includes Location handlers, .cgi, .pl, .s?html http://modperl.com:9000/perl_conference/cool_tricks/mp_footer.html I saw that... but this doesn't work since .cgi, .pl files don't get processed just read and output. (Works great for .html files though) Take a look at Apache::Sandwich, it may do exactly what you want. You will probably have to specify certain file types to run with Apache::Sandwich, so you ignore things like image files. I would probably just used the Files config for that. If Apache::Sandwich does not work for you as is, you might try looking at its techniques or those of Apache::SSI with executing subrequests while adding content from various sources. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Modperl Footers/Headers
Another option is Apache-NavBar, take a look in the CPAN website Have a nice day. Alex -- [EMAIL PROTECTED] On Wed, 3 Apr 2002, Joshua Chamas wrote: Philip M. Gollucci wrote: Okay I've got an FBSD4.5 box with apache-1.3.24 with mod_perl1.26 I need to add a canned Footer to every page except one (toc.html). This includes Location handlers, .cgi, .pl, .s?html http://modperl.com:9000/perl_conference/cool_tricks/mp_footer.html I saw that... but this doesn't work since .cgi, .pl files don't get processed just read and output. (Works great for .html files though) Take a look at Apache::Sandwich, it may do exactly what you want. You will probably have to specify certain file types to run with Apache::Sandwich, so you ignore things like image files. I would probably just used the Files config for that. If Apache::Sandwich does not work for you as is, you might try looking at its techniques or those of Apache::SSI with executing subrequests while adding content from various sources. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
RE: AddModule mod_perl.c
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At 15:08 31.03.2002, John Kolvereid wrote: Hi Per, I realized right after I sent the note that mod_perl, as CGI, won't handle ordinary HTML. But I did learn later that mod_perl and PHP cannot co-exist at present. I'm not sure but I think there is a small glitch which can easily be overcome by someone responsible for the PHP OR mod_perl source files. Actually; mod_perl and php can exist on the same apache build. ApacheToolbox is a wonderful little program for playing, tweaking, and dealing with apache modules and such. http://apachetoolbox.com/ I have mod_perl, php, mod_frontpage, mod_throttle, and mod_python running peacefully on the same box. Ian - -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com Comment: Public Key at http://fed.ath.cx/pubkey.txt iQA/AwUBPKd/yzPdoDQ8L/BAEQJGrQCg6qCp/9l6F7MJk51dHp+X/HfdiREAoNrJ leMaKzod7/9ogDxN4eQQpu0i =WgkX - -END PGP SIGNATURE- -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com Comment: Public Key at http://fed.ath.cx/pubkey.txt iQA/AwUBPKl4kDPdoDQ8L/BAEQLVkQCg979r74XkaKBe594TKVQQd7FjlaQAn2Oq rVFw1/yoOVoZMoiqD8NJG0Vl =Bjm7 -END PGP SIGNATURE-
Host name lookups are Off but...
Hi all We have a mod_perl server that's under constant heavy load. In our Apache config we have switched HostnameLookups off using HostnameLookups off and for the most part, it seems to work. However, any check of the logs or /server-status shows that the server is *still* doing reverse-lookup of some addresses. Often, a number of apache processes show up as D in /server-status, and it's pretty clear that it's slowing things down. Does anyone have any idea what might be causing this? Could it be something in the mod_perl config? Nowhere in any of our code do we do hostname resolution and for the most part couldn't care less what host/ip people come from. Sorry if this is the wrong list but I have a sneaking suspicion there's something about our mod_perl config that's affecting it. RTFM's are welcome... I already tried but maybe I missed something. Cheers Kyle Dawkins Systems Engineer Central Park Software http://www.centralparksoftware.com *** IMPORTANT ! ** The content of this email and any attachments are confidential and intended for the named recipient(s) only. If you have received this email in error please notify the sender immediately. Do not disclose the content of this message or make copies. This email was scanned by eSafe Mail for viruses, vandals and other malicious content. **
Re: Host name lookups are Off but...
At 19:46 03.04.2002, kyle dawkins wrote: Hi all We have a mod_perl server that's under constant heavy load. In our Apache config we have switched HostnameLookups off using HostnameLookups off and for the most part, it seems to work. However, any check of the logs or /server-status shows that the server is *still* doing reverse-lookup of some addresses. Often, a number of apache processes show up as D in /server-status, and it's pretty clear that it's slowing things down. Does anyone have any idea what might be causing this? Could it be something in the mod_perl config? Nowhere in any of our code do we do hostname resolution and for the most part couldn't care less what host/ip people come from. Sorry if this is the wrong list but I have a sneaking suspicion there's something about our mod_perl config that's affecting it. RTFM's are welcome... I already tried but maybe I missed something. This has nothing to do with mod_perl and can't even be affected by HostnameLookups. I guess you're protecting your /server-status URI by an `Allow' or `Deny' directive. mod_access performs reverse lookups to check these values, for security. From the HostnameLookups docs http://httpd.apache.org/docs-2.0/mod/core.html#hostnamelookups Regardless of the setting, when mod_access is used for controlling access by hostname, a double reverse lookup will be performed. This is necessary for security. Note that the result of this double-reverse isn't generally available unless you set HostnameLookups double. For example, if only HostnameLookups on and a request is made to an object that is protected by hostname restrictions, regardless of whether the double-reverse fails or not, CGIs will still be passed the single-reverse result in REMOTE_HOST. There you go, RTFM :) I wouldn't be too worried about any performance hits from /server-status: this shouldn't be used too often, only by you or the other developers, so do you really think it's a problem? -- Per Einar Ellefsen [EMAIL PROTECTED]
PDF generation
Hi All I have a large number of mod_perl modules that connect to various databases and generate workflow performance reports for my organization. I give the users 3 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output I've been using PDF::Create, which has been at version .01 since 1999. It has worked flawlessly for my purposes for a couple of years, but is very limited. In fine form-follows-function fashion, the end users would now like the PDF output gussied up with graphics, etc. Does anyone have any strong (positive or negative) recommendations for which module(s) I should migrate to? TIA, Bill
Re: PDF generation
On Wed, Apr 03, 2002 at 03:43:39PM -0500, Bill McCabe wrote: Hi All I have a large number of mod_perl modules that connect to various databases and generate workflow performance reports for my organization. I give the users 3 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output I've been using PDF::Create, which has been at version .01 since 1999. It has worked flawlessly for my purposes for a couple of years, but is very limited. In fine form-follows-function fashion, the end users would now like the PDF output gussied up with graphics, etc. Does anyone have any strong (positive or negative) recommendations for which module(s) I should migrate to? I've had good success with PDFLib http://www.pdflib.org/, but the license isn't what one could have hoped for :-/ Matt Sergeant wrote an OO interface to pdflib_pl.pm which is what I am using. -- Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/ mod_pointer http://stderr.net/mod_pointer http://photos.eibner.dk/
Re: PDF generation
I have used the HTMLtoPDF converter from htmldoc ( http://www.os2site.com/sw/util/convert/ ) with great success. I also have used html2ps and ps2pdf to make this transition as well using ImageMagick ( http://www.imagemagick.org/ ). Its a really nice approache since it essentially makes the sky the limit on your PDF presentation. We did an HR process for a company once where the users would answer a bunch of questions and end up with a PDF on their desktop to print, sign and hand to HR. John- On Wed, 3 Apr 2002 15:43:39 -0500 Bill McCabe [EMAIL PROTECTED] wrote: Hi All I have a large number of mod_perl modules that connect to various databases and generate workflow performance reports for my organization. I give the users 3 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output I've been using PDF::Create, which has been at version .01 since 1999. It has worked flawlessly for my purposes for a couple of years, but is very limited. In fine form-follows-function fashion, the end users would now like the PDF output gussied up with graphics, etc. Does anyone have any strong (positive or negative) recommendations for which module(s) I should migrate to? TIA, Bill
Re: PDF generation
I can highly recommend PDFLib. It's not quite free in that you have to buy a license if you make a product out of it, but it's still cheap. Matt Sergeant has recently added an OO interface over the PDFLib functions with PDFLib. http://search.cpan.org/search?dist=PDFLib There are others that will convert HTML into PDF, but I prefer the precise options available with PDFLib. Drew At 03:43 PM 4/3/02 -0500, Bill McCabe wrote: Hi All I have a large number of mod_perl modules that connect to various databases and generate workflow performance reports for my organization. I give the users 3 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output I've been using PDF::Create, which has been at version .01 since 1999. It has worked flawlessly for my purposes for a couple of years, but is very limited. In fine form-follows-function fashion, the end users would now like the PDF output gussied up with graphics, etc. Does anyone have any strong (positive or negative) recommendations for which module(s) I should migrate to? TIA, Bill
Re: PDF generation
At 3:43 PM -0500 4/3/02, Bill McCabe wrote: Hi All I have a large number of mod_perl modules that connect to various databases and generate workflow performance reports for my organization. I give the users 3 output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output I've been using PDF::Create, which has been at version .01 since 1999. It has worked flawlessly for my purposes for a couple of years, but is very limited. In fine form-follows-function fashion, the end users would now like the PDF output gussied up with graphics, etc. Does anyone have any strong (positive or negative) recommendations for which module(s) I should migrate to? Actually, I used PDF::API2. I've used it for graphics and others and have contributed patches to the source (which may or may not have been included, but which aren't critical for general use). The only downside is that it is poorly documented (in my opinion), but determination overruled and I've used it quite for all types of applications (including dynamic fill-out-and-download applications). The speed isn't great, but if it's a low traffic application, it shouldn't be a problem. Rob -- When I used a Mac, they laughed because I had no command prompt. When I used Linux, they laughed because I had no GUI.
Open3
Hello folks, I am writing a web based interface to gpg and am using IPC::Open3 and IO::Select to manage STDIN, STDOUT and STDERR handles. But, I can not get stdin to work properly. Here is my code: $gpgCommand = gpg --homedir $home --no-default-keyring --secret-keyring rasoul.asc --decrypt $encryptedFile; print $gpgCommand\n; $pid= open3(*FIN,*FOUT,*FERR,$gpgCommand); $SIG{CHLD} = sub { print REAPER: status $? on $pid\n if waitpid($pid,0) 0 }; $selector = IO::Select-new(); $selector-add(*FOUT,*FERR); while (handles = $selector-handles) { foreach my $fh (handles) { if (fileno($fh) == fileno(FERR)) { print STDERR: , scalar FERR } elsif (fileno($fh) == fileno(FOUT)) { out= FOUT; } elsif ((fileno($fh) == fileno(FIN)) { print FIN $passPhrase\n; } $selector-remove($fh) if eof($fh); } } $pf-close; close FERR; close FIN; close FOUT; I am using perl 5.053 and Apache/1.3.14 Ben-SSL/1.42 (Unix) PHP/4.0.3pl1 mod_perl/1.24_01. Can anyone see what am I doing wrong? Thanks in advance -r
IPC::Open3 Corrected code version
Hello folks, I am writing a web based interface to gpg and am using IPC::Open3 and IO::Select to manage STDIN, STDOUT and STDERR handles. But, I can not get stdin to work properly. Here is my code: $gpgCommand = gpg --homedir $home --no-default-keyring --secret-keyring rasoul.asc --decrypt $encryptedFile; print $gpgCommand\n; $pid= open3(*FIN,*FOUT,*FERR,$gpgCommand); $SIG{CHLD} = sub { print REAPER: status $? on $pid\n if waitpid($pid,0) 0 }; $selector = IO::Select-new(); $selector-add(*FIN,*FOUT,*FERR); while (handles = $selector-handles) { foreach my $fh (handles) { if (fileno($fh) == fileno(FERR)) { print STDERR: , scalar FERR } elsif (fileno($fh) == fileno(FOUT)) { out= FOUT; } elsif ((fileno($fh) == fileno(FIN)) { print FIN $passPhrase\n; } $selector-remove($fh) if eof($fh); } } $pf-close; close FERR; close FIN; close FOUT; I am using perl 5.053 and Apache/1.3.14 Ben-SSL/1.42 (Unix) PHP/4.0.3pl1 mod_perl/1.24_01. Can anyone see what am I doing wrong? Thanks in advance -r
Re: Open3
At 01:44 PM 4/3/02 -0800, Rasoul Hajikhani wrote: Hello folks, I am writing a web based interface to gpg and am using IPC::Open3 and IO::Select to manage STDIN, STDOUT and STDERR handles. But, I can not get stdin to work properly. Here is my code: I am using perl 5.053 and Apache/1.3.14 Ben-SSL/1.42 (Unix) PHP/4.0.3pl1 mod_perl/1.24_01. Can anyone see what am I doing wrong? Make sure your IPC::Open3 is up-to-date. If it is the version that came with Perl 5.053, it probably has a bug in it. I remember having to patch it waaay back (like 5 years ago) to get it to work properly... Elizabeth Mattijsen
Re: Open3
Elizabeth Mattijsen wrote: At 01:44 PM 4/3/02 -0800, Rasoul Hajikhani wrote: Hello folks, I am writing a web based interface to gpg and am using IPC::Open3 and IO::Select to manage STDIN, STDOUT and STDERR handles. But, I can not get stdin to work properly. Here is my code: I am using perl 5.053 and Apache/1.3.14 Ben-SSL/1.42 (Unix) PHP/4.0.3pl1 mod_perl/1.24_01. Can anyone see what am I doing wrong? Make sure your IPC::Open3 is up-to-date. If it is the version that came with Perl 5.053, it probably has a bug in it. I remember having to patch it waaay back (like 5 years ago) to get it to work properly... Elizabeth Mattijsen My IPC::Open3 is OK. My problem is with IO::Select. Does anyone know whether IO::Select has any bugs? I have read the man pages and looked through the Perl Cook Book for a code snipet that would use IO::Select to write to STDIN. The one that is in the book does not work for me. So any comments/suggestions? Thanks in advance -r
Re: make test fails on redhat
Hi there, On Wed, 3 Apr 2002, Jie Gao wrote: All tests successful, 6 tests skipped. Are you sure about your subject line? Files=34, Tests=382, 9 wallclock secs ( 4.47 cusr + 0.44 csys = 4.91 CPU) kill `cat t/logs/httpd.pid` cat: t/logs/httpd.pid: No such file or directory There may be permissions problems in the directory tree, did you 'make' and 'make test' as root? I find it's best not to do that. 73, Ged.
RE: Host name lookups are Off but...
We have a mod_perl server that's under constant heavy load. In our Apache config we have switched HostnameLookups off using HostnameLookups off and for the most part, it seems to work. However, any check of the logs or /server-status shows that the server is *still* doing reverse-lookup of some addresses. Often, a number of apache processes show up as D in /server-status, and it's pretty clear that it's slowing things down. Does anyone have any idea what might be causing this? Could it be something in the mod_perl config? Nowhere in any of our code do we do hostname resolution and for the most part couldn't care less what host/ip people come from. Sorry if this is the wrong list but I have a sneaking suspicion there's something about our mod_perl config that's affecting it. RTFM's are welcome... I already tried but maybe I missed something. This one bit me a couple of years ago. *IN MY CASE* it was incorrect usage of the Allow/Deny, I specified Allow from all Deny from none The problem was, the webserver doesn't recognize none as a special value like it does for all... so none became a hostname, *** which enabled HostNameLookups for the whole webserver. *** Look in every single place where you have access control by ip/hostname. Make sure there are no hostnames, only ip. Once Apache turns on HostnameLookups, it's global. HTH! L8r, Rob #!/usr/bin/perl -w use Disclaimer qw/:standard/;
RE: AddModule mod_perl.c
Hi Ian, Thanks for the encouragement. I wasn't sure if it was worth the pursuit. Now that I know it is possible I'll certainly trudge forth. I had looked at the site you mentioned, ApacheToolbox, and tried to follow their setup suggestions. They didn't work but maybe I missed something. I am going to try again. Thanks. John Kolvereid --- Ian [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At 15:08 31.03.2002, John Kolvereid wrote: Hi Per, I realized right after I sent the note that mod_perl, as CGI, won't handle ordinary HTML. But I did learn later that mod_perl and PHP cannot co-exist at present. I'm not sure but I think there is a small glitch which can easily be overcome by someone responsible for the PHP OR mod_perl source files. Actually; mod_perl and php can exist on the same apache build. ApacheToolbox is a wonderful little program for playing, tweaking, and dealing with apache modules and such. http://apachetoolbox.com/ I have mod_perl, php, mod_frontpage, mod_throttle, and mod_python running peacefully on the same box. Ian - -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com Comment: Public Key at http://fed.ath.cx/pubkey.txt iQA/AwUBPKd/yzPdoDQ8L/BAEQJGrQCg6qCp/9l6F7MJk51dHp+X/HfdiREAoNrJ leMaKzod7/9ogDxN4eQQpu0i =WgkX - -END PGP SIGNATURE- -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com Comment: Public Key at http://fed.ath.cx/pubkey.txt iQA/AwUBPKl4kDPdoDQ8L/BAEQLVkQCg979r74XkaKBe594TKVQQd7FjlaQAn2Oq rVFw1/yoOVoZMoiqD8NJG0Vl =Bjm7 -END PGP SIGNATURE- __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
[JOB] Senior mod_perl / java developer for LRN, Southern California
Hey mod_perl ASP Crew, I have the below job posting for this company LRN I have been contracting for this past couple years. They are looking for a senior developer with heavy mod_perl experience and some java too! This is a project that has snagged a few of us over the years, including our dear Ged Haywood, and our old friend Shane Nay ( where's he been anyway?! ) They really need a full time senior developer on site with the below skill sets. Is there anyone like this out there? If so, please send me resumes, code samples, etc., and I'll pass them along. Regards, Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 Position Title: Web Software Developer Department: Development Brief Overview Of Position: The Web Software Developer will work with a team of other highly skilled developers to rapidly develop, deploy, and maintain Web applications based on LRN knowledge and content delivery platforms. List Essential Job Functions: - Responsible for new feature development, integrations, and extensions to our existing products - Instrumental in developing new features and applications, as well as designing and developing integrations between new and existing product offerings - Highly skilled professional software engineer, able to rapidly develop and deploy professional quality software - Independent learner, thinker, and quality minded individual; the difference between getting it done and doing it right! - Ability to learn new skills and development environments as technology landscape shifts - Conversant in both hardware and software in computer market - Ability to engage in and support position on design and development issues - Ability to lead and teach other both junior and senior developers - Good written and verbal communication skills Technical Skills Required: - 2 years minimum experience with mod_perl/Apache on UNIX platforms - 2 years minimum experience with Java J2EE framework (including EJB and JSP) - Practical experience with high volume transactional RDBMS based web sites using DBI, preferably with Oracle - An intimate knowledge of Perl Object Oriented programming - Cross platform browser HTML eccentricities - Expertise in a wide variety of computer tools and development environments - Proven capabilities in programming and operating systems Previous Experience Required: - 5 years minimum industry experience - Experience with templates component based architecture - Practical software engineering experience, including several full life cycles of specification, design, development paradigms, testing, deployment, documentation, and configuration management Education Required (Certifications, Degrees, Majors, etc.): - 4 year degree or equivalent industry experience Experience Preferred: - Oracle RDBMS programming (triggers, stored procedures, etc.) - Oracle 9iAS Portal Web services - Linux x86 - Solaris SPARC - Load balanced web clusters - SSL proxy servers - Caching proxy servers - Network engineering List Any Lifting or Physical Requirements of the Position: - None
Re: PDF generation
Hi y'all, At 3:43 PM -0500 4/3/02, Bill McCabe wrote: output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output I've been using PDF::Create, which has been at version .01 since 1999. It has worked flawlessly for my purposes for a couple of years, but is very limited. In fine form-follows-function fashion, the end users would now like the PDF output gussied up with graphics, etc. Does anyone have any strong (positive or negative) recommendations for which module(s) I should migrate to? Robert Landrum wrote: Actually, I used PDF::API2. I've used it for graphics and others and have contributed patches to the source (which may or may not have been included, but which aren't critical for general use). The only downside is that it is poorly documented (in my opinion), but determination overruled and I've used it quite for all types of applications (including dynamic fill-out-and-download applications). The speed isn't great, but if it's a low traffic application, it shouldn't be a problem. Just wanted to second Robert's recommendation. We use PDF::API2 as well for a client, and it arrived just in time. The key for us was that PDF::API2 allows us to edit a PDF file, so we can start with a template and just make a few changes. We needed to be able to start with a PDF file supplied by a client and just make some edits to the file on the fly based on user input. It's a bit less stable than other modules I've used, but it's young and rapidly improving. Take care, Kurt Hansen [EMAIL PROTECTED]
RE: AddModule mod_perl.c
Hi Ian, As w/ everything else mod_perl related the Apachetoolbox didn't work either. I got an error w/ the installwatch.sh and it stopped me dead in my tracks. Couldn't even download it from the net. Any advice. Thanks. John Kolvereid --- Ian [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At 15:08 31.03.2002, John Kolvereid wrote: Hi Per, I realized right after I sent the note that mod_perl, as CGI, won't handle ordinary HTML. But I did learn later that mod_perl and PHP cannot co-exist at present. I'm not sure but I think there is a small glitch which can easily be overcome by someone responsible for the PHP OR mod_perl source files. Actually; mod_perl and php can exist on the same apache build. ApacheToolbox is a wonderful little program for playing, tweaking, and dealing with apache modules and such. http://apachetoolbox.com/ I have mod_perl, php, mod_frontpage, mod_throttle, and mod_python running peacefully on the same box. Ian - -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com Comment: Public Key at http://fed.ath.cx/pubkey.txt iQA/AwUBPKd/yzPdoDQ8L/BAEQJGrQCg6qCp/9l6F7MJk51dHp+X/HfdiREAoNrJ leMaKzod7/9ogDxN4eQQpu0i =WgkX - -END PGP SIGNATURE- -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com Comment: Public Key at http://fed.ath.cx/pubkey.txt iQA/AwUBPKl4kDPdoDQ8L/BAEQLVkQCg979r74XkaKBe594TKVQQd7FjlaQAn2Oq rVFw1/yoOVoZMoiqD8NJG0Vl =Bjm7 -END PGP SIGNATURE- __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
Re: Host name lookups are Off but...
You can also configure your HTTP server to be a DNS cache server and have it resolve against itself. See if this will change your performance. Per Einar Ellefsen wrote: At 19:46 03.04.2002, kyle dawkins wrote: Hi all We have a mod_perl server that's under constant heavy load. In our Apache config we have switched HostnameLookups off using HostnameLookups off and for the most part, it seems to work. However, any check of the logs or /server-status shows that the server is *still* doing reverse-lookup of some addresses. Often, a number of apache processes show up as D in /server-status, and it's pretty clear that it's slowing things down. Does anyone have any idea what might be causing this? Could it be something in the mod_perl config? Nowhere in any of our code do we do hostname resolution and for the most part couldn't care less what host/ip people come from. Sorry if this is the wrong list but I have a sneaking suspicion there's something about our mod_perl config that's affecting it. RTFM's are welcome... I already tried but maybe I missed something. This has nothing to do with mod_perl and can't even be affected by HostnameLookups. I guess you're protecting your /server-status URI by an `Allow' or `Deny' directive. mod_access performs reverse lookups to check these values, for security. From the HostnameLookups docs http://httpd.apache.org/docs-2.0/mod/core.html#hostnamelookups Regardless of the setting, when mod_access is used for controlling access by hostname, a double reverse lookup will be performed. This is necessary for security. Note that the result of this double-reverse isn't generally available unless you set HostnameLookups double. For example, if only HostnameLookups on and a request is made to an object that is protected by hostname restrictions, regardless of whether the double-reverse fails or not, CGIs will still be passed the single-reverse result in REMOTE_HOST. There you go, RTFM :) I wouldn't be too worried about any performance hits from /server-status: this shouldn't be used too often, only by you or the other developers, so do you really think it's a problem? -- Per Einar Ellefsen [EMAIL PROTECTED] -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering -
Re: IPC::Open3 Corrected code version
This is a known issue with latest mod_perl. Search the archives for details. This is the temp. solution. Before you call open3() do: untie(*STDIN); untie(*STDOUT); Sreeji --- Rasoul Hajikhani [EMAIL PROTECTED] wrote: Hello folks, I am writing a web based interface to gpg and am using IPC::Open3 and IO::Select to manage STDIN, STDOUT and STDERR handles. But, I can not get stdin to work properly. Here is my code: $gpgCommand = gpg --homedir $home --no-default-keyring --secret-keyring rasoul.asc --decrypt $encryptedFile; print $gpgCommand\n; $pid= open3(*FIN,*FOUT,*FERR,$gpgCommand); $SIG{CHLD} = sub { print REAPER: status $? on $pid\n if waitpid($pid,0) 0 }; $selector = IO::Select-new(); $selector-add(*FIN,*FOUT,*FERR); while (@handles = $selector-handles) { foreach my $fh (@handles) { if (fileno($fh) == fileno(FERR)) { print STDERR: , scalar FERR } elsif (fileno($fh) == fileno(FOUT)) { @out= FOUT; } elsif ((fileno($fh) == fileno(FIN)) { print FIN $passPhrase\n; } $selector-remove($fh) if eof($fh); } } $pf-close; close FERR; close FIN; close FOUT; I am using perl 5.053 and Apache/1.3.14 Ben-SSL/1.42 (Unix) PHP/4.0.3pl1 mod_perl/1.24_01. Can anyone see what am I doing wrong? Thanks in advance -r __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
Re: PDF generation
[EMAIL PROTECTED] wrote: I also have used html2ps and ps2pdf to make this transition as well using ImageMagick ( http://www.imagemagick.org/ ). Its a really nice approache since it essentially makes the sky the limit on your PDF presentation. We did an HR process for a company once where the users would answer a bunch of questions and end up with a PDF on their desktop to print, sign and hand to HR. Ditto. 4 years ago, insurance qualifier for a brokerage firm. The HTML-PDF made a nice what you see on your screen is what printed at the home office for the users. And the home office loved not having to decipher mangled handwritten faxes. Another product I've used for (gasp) Java is Root River systems. Very nice report-writer type API with decent page-flow behaviours. Don't know if you can run a JServ+mod_perl or JPerl hybrid, though. Mike808/ -- perl -le $_='7284254074:0930970:H4012816';tr[0-][ BOPEN!SMUT];print
Re: PDF generation
Hi there, On Wed, 3 Apr 2002, Mike808 wrote: Don't know if you can run a JServ+mod_perl or JPerl hybrid, though. You can certainly run Java on one server and mod_perl on another, I do this routinely in production. (With mod_perl on the FRONT end... :) 73, Ged.
RE: Open3
Since we are on the topic...and before some says it is WOT, I wanted to ask a corollary question. I wrote a simple script to use Open2 as a means of interacting with some FORTRAN programs I have. I wanted to create pre and post-processing using PERL and leave the numerical stuff (and tons of legacy code) to the FORTRAN. Anyway, the Perl script from a command prompt works -- it sends pre-processed data as STDIN and catches the processed data from STDOUT without a hitch. The moment I try it running Apache 1.33, Perl 5.6.1, latest version of Open2, and mod_perl the thing just ties up all the computer's resources. If I could get it to work then I would be a LONG WAY to really altering the way we do things at work. I have read what docs there are with Perl for this. . .but I am wondering if there are any caveats that I should be aware from using a web-server to initiate the commands. Or is there an alternative method I might explore? thanks! Ward : -Original Message- : From: Rasoul Hajikhani [mailto:[EMAIL PROTECTED]] : Sent: Wednesday, April 03, 2002 1:54 PM : To: Elizabeth Mattijsen : Cc: [EMAIL PROTECTED] : Subject: Re: Open3 : : : Elizabeth Mattijsen wrote: : : At 01:44 PM 4/3/02 -0800, Rasoul Hajikhani wrote: : Hello folks, : I am writing a web based interface to gpg and am using : IPC::Open3 and : IO::Select to manage STDIN, STDOUT and STDERR handles. : But, I can not : get stdin to work properly. Here is my code: : I am using perl 5.053 and Apache/1.3.14 Ben-SSL/1.42 : (Unix) PHP/4.0.3pl1 : mod_perl/1.24_01. : Can anyone see what am I doing wrong? : : Make sure your IPC::Open3 is up-to-date. If it is the : version that came : with Perl 5.053, it probably has a bug in it. I : remember having to patch : it waaay back (like 5 years ago) to get it to work properly... : : Elizabeth Mattijsen : : My IPC::Open3 is OK. My problem is with IO::Select. Does : anyone know : whether IO::Select has any bugs? I have read the man : pages and looked : through the Perl Cook Book for a code snipet that would : use IO::Select : to write to STDIN. The one that is in the book does not : work for me. So : any comments/suggestions? : Thanks in advance : -r :
RE: modperl compile problems!
Hello! in the meantime i also solved the problem for me (hope it really works :-) I just compiled a perl source from cpan, and it worked, I donĀ“t see any advantages in using the ActivePerl Binary in the moment. bye Am Mit, 2002-04-03 um 17.37 schrieb OCNS Consulting: Here's what I did: 1. Retrieve the latest build of the mod_perl at - http://cvs.apache.org/snapshots/modperl/ 2. Compile mod_perl outside of the Apache Source Tree, as described in file INSTALL.apaci; suggest - perl Makefile.PL USE_APXS=1 EVERYTHING=1 WITH_APXS=/usr/bin/apxs make make test make install 3. Compile Apache cd apache_1.3.23 and issue the following to configure APACHE make distclean env CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ SSL_BASE=/usr/local/ssl \ EAPI_MM=SYSTEM LIBS=-ltcl8.3 -lm -lpthread \ ./configure \ --verbose \ --server-uid=nobody \ --server-gid=nobody \ --enable-rule=EAPI \ --enable-rule=SHARED_CORE \ --enable-module=ssl \ --enable-module=status \ --enable-module=so \ --enable-module=headers \ --enable-module=info \ --enable-module=speling *** Note: You may or may not need the EAPI - Read the Documentation *** *** If not, then remove EAPI_MM=SYSTEM and --enable-rule=EAPI \ *** *** If not SSL then remove SSL_BASE=/usr/local/ssl \ and*** *** --enable-module=ssl \ *** make make install 4. Edit /usr/local/apache/conf/httpd.conf file; comment out - AddModule directives and remove and redundant loadModule directives. 5.Restart APACHE - /usr/local/apache/bin/apachectl start/restart RB -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 9:30 AM To: Sven Sternberger Cc: [EMAIL PROTECTED] Subject: Re: modperl compile problems! On 3 Apr 2002, Sven Sternberger wrote: Hello! i try to build a apache with mod_perl and ActiveState Perl. The compiler stops always with the same error message, I tried several different ways which are described in the Readme docs, and I try the Apache Toolbox (automated apache build). I saw a thread which deals which the same question but there was not a solution (only some ideas). gcc -c -I.. -I/usr/local/ActivePerl-5.6/lib/5.6.1/i686-linux-thread-multi/CORE -I../os/unix -I../include -DLINUX=22 -DMOD_PERL -DUSE_PERL_SSI -DUSE_REENTRANT_API -D_POSIX_C_SOURCE=199506L -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_HSREGEX -DNO_DL_NEEDED `../apaci` http_core.c In file included from /usr/include/sys/sem.h:28, from ../include/ap_config.h:495, from ../include/httpd.h:72, from http_core.c:61: /usr/include/sys/ipc.h:25: warning: #warning Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE http_core.c: In function `default_handler': http_core.c:3802: `caddr_t' undeclared (first use in this function) http_core.c:3802: This has come up before - at least one person found that building mod_perl as a dso outside of the Apache source tree, as described at the end of INSTALL.apaci in the mod_perl sources, worked. best regards, randy kobes -- Sven Sternberger Tel.: +49 (0) 40 8998 4397 Desy Email: [EMAIL PROTECTED] Notkestr. 85 D-22607 Hamburg