Re: Where is Perl compilation output when using modperl ?
Hello everyone, To sum this up: I had no luck in my efforts to get the perl compilation output to show up somewhere (on win32). I have tried several (basic) thinks. I have put it aside for now and will switch to linux as I do not have the time to spend more hours on researching this. Thanks for everyone's help ! Jens Lionel MARTIN schrieb: Hello, Just to confrm that I have the same symptom as yours when I was developing on Win32: when a module couldn't load, the only thing I could get was a bare "Can't load module", without any explanation. Then, th eonly thing I could do was trying to isolate the problem, progressively stripping stuff from my code. I never investigated so as to get the true perl diagnose. Lionel. - Original Message - From: "Jens Helweg" <[EMAIL PROTECTED]> To: Sent: Thursday, June 28, 2007 12:09 PM Subject: Where is Perl compilation output when using modperl ? Hi erveryone, I am using modperl2 with apache2 on win32 (activestate Perl 5.8). I have my own perl module included in the apache conf. Whenever I have an error in my module apache does not start and the only error message I can find is in apache's error.log: Can't load Perl file: D:/path_to_my_perl_module for server myserver, exiting... It doesn't say anything about what is wrong in the code. Is there a way to get the compilers output from perl, so I can get details on what is wrong in the code ? (when I run perl -c mymodule.pm on command line it complains about missing modules - so that doesn't seem to be an option when using modperl.) Thanks in advance, Jens
header issues etc...
I was able to narrow down the problem I was having, and produce a test case for you folks. Below are two relatively self-explanatory files. If I navigate to test.cgi, it will appear to load the page properly, but if I hit the reload button a bunch of times in a row, the error_log will log segfaults. I pasted a sample at the bottom of this message. I'd appreciate any help at all. Obviously the issue is coming from CGI.pm's header function, which *should* be ok with mod_perl2. Thanks again. --Pubert ##>BEGIN FILE test.cgi< #!/usr/bin/perl use lib qw(/var/www/cgi-bin/);; use strict; use CGI; use testclass; my $cgi=new CGI; my $tc = testclass->new({CGI=>$cgi}); $tc->doit(); 1; ##>BEGIN FILE testclass.pm< package testclass; my $self; # sub new { # # This is the constructor. my ( $class, $args ) = @_; return $self if defined $self; $self = {}; bless $self, $class; $self->{CGI}=$args->{CGI}; return $self; } sub doit{ print $self->{CGI}->header; print "hello"; } 1; Begin error_log snipper< [Mon Jul 02 18:45:34 2007] [notice] SIGHUP received. Attempting to restart [Mon Jul 02 18:45:34 2007] [notice] Digest: generating secret for digest authentication ... [Mon Jul 02 18:45:34 2007] [notice] Digest: done [Mon Jul 02 18:45:34 2007] [notice] Apache/2.2.4 (Unix) DAV/2 mod_apreq2-20051231/2.6.1 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations [Mon Jul 02 18:45:39 2007] [notice] child pid 7925 exit signal Segmentation fault (11) [Mon Jul 02 18:45:39 2007] [notice] child pid 7926 exit signal Segmentation fault (11) [Mon Jul 02 18:45:39 2007] [notice] child pid 7927 exit signal Segmentation fault (11) [Mon Jul 02 18:45:40 2007] [notice] child pid 7928 exit signal Segmentation fault (11) [Mon Jul 02 18:45:40 2007] [notice] child pid 7929 exit signal Segmentation fault (11) [Mon Jul 02 18:45:40 2007] [notice] child pid 7931 exit signal Segmentation fault (11)
questions on serving big file & SQL statement parsing
Hi, all I got curious when reading 'performance tuning' in mod_perl doc. two questions. 1. "SQL statement parsing" is mentioned in the doc: http://perl.apache.org/docs/1.0/guide/performance.html#toc_Eliminating_SQL_Statement_Parsing i am curious that if it is a general practice(caching sql statement in package variable to avoid parsing) to do the My::DB thing in mod_perl app ? 2. "Upload and Download of Big Files" http://perl.apache.org/docs/1.0/guide/performance.html#toc_Upload_and_Download_of_Big_Files it mentions that serving static file from the front-end server but also mentions the following: "This of course assumes that the script requires none of the functionality of the mod_perl server, such as custom authentication handlers." I am wondering how do you do it if i have to auth user first? thanks, James. Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting
Re: questions on serving big file & SQL statement parsing
Good morning, On 2/7/07 at 4:27 PM -0700, James. L <[EMAIL PROTECTED]> wrote: >I am wondering how do you do it if i have to auth user >first? mod_auth_tkt Charlie -- Charlie Garrison <[EMAIL PROTECTED]> PO Box 141, Windsor, NSW 2756, Australia O< ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt
Re: header issues etc...
I fixed it... apparently it not like the "return $self if defined $self;" ... return $class id ref $class is better form anyway... thanks and sorry about all the emails ;) On 7/2/07, pubert na <[EMAIL PROTECTED]> wrote: I was able to narrow down the problem I was having, and produce a test case for you folks. Below are two relatively self-explanatory files. If I navigate to test.cgi, it will appear to load the page properly, but if I hit the reload button a bunch of times in a row, the error_log will log segfaults. I pasted a sample at the bottom of this message. I'd appreciate any help at all. Obviously the issue is coming from CGI.pm's header function, which *should* be ok with mod_perl2. Thanks again. --Pubert ##>BEGIN FILE test.cgi< #!/usr/bin/perl use lib qw(/var/www/cgi-bin/);; use strict; use CGI; use testclass; my $cgi=new CGI; my $tc = testclass->new({CGI=>$cgi}); $tc->doit(); 1; ##>BEGIN FILE testclass.pm< package testclass; my $self; # sub new { # # This is the constructor. my ( $class, $args ) = @_; return $self if defined $self; $self = {}; bless $self, $class; $self->{CGI}=$args->{CGI}; return $self; } sub doit{ print $self->{CGI}->header; print "hello"; } 1; >Begin error_log snipper< [Mon Jul 02 18:45:34 2007] [notice] SIGHUP received. Attempting to restart [Mon Jul 02 18:45:34 2007] [notice] Digest: generating secret for digest authentication ... [Mon Jul 02 18:45:34 2007] [notice] Digest: done [Mon Jul 02 18:45:34 2007] [notice] Apache/2.2.4 (Unix) DAV/2 mod_apreq2-20051231/2.6.1 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations [Mon Jul 02 18:45:39 2007] [notice] child pid 7925 exit signal Segmentation fault (11) [Mon Jul 02 18:45:39 2007] [notice] child pid 7926 exit signal Segmentation fault (11) [Mon Jul 02 18:45:39 2007] [notice] child pid 7927 exit signal Segmentation fault (11) [Mon Jul 02 18:45:40 2007] [notice] child pid 7928 exit signal Segmentation fault (11) [Mon Jul 02 18:45:40 2007] [notice] child pid 7929 exit signal Segmentation fault (11) [Mon Jul 02 18:45:40 2007] [notice] child pid 7931 exit signal Segmentation fault (11)
apache and php
Hey, I have installed mod_perl 1.3 statically to apache while using php as a DSO After I've gracefully reloaded apache, php stopped working What is the best way to get them both working together ? Should I statically link php as well or do I have to use mod_perl as a DSO ? Thanks.
Re: apache and php
Eli Shemer wrote: > > I have installed mod_perl 1.3 statically to apache while using php as a DSO > > After I've gracefully reloaded apache, php stopped working > > What is the best way to get them both working together ? > > Should I statically link php as well or do I have to use mod_perl as a DSO ? Did you forget to build mod_so into 1.3? Bill
FW: apache and php
יום טוב ולהתראות. אלי שמר. -Original Message- From: Eli Shemer [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 6:48 AM To: 'William A. Rowe, Jr.' Subject: RE: apache and php No. Mod_so and mod_perl are both loaded and listed by httpd -l I now installed mod_perl as a DSO and it's working fine. but I rather have them statically installed for better performance. Previously I tried mod_perl statically installed with php as a DSO maybe I should try them both statically installed. יום טוב ולהתראות. אלי שמר. -Original Message- From: William A. Rowe, Jr. [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 6:41 AM To: Eli Shemer Cc: modperl@perl.apache.org Subject: Re: apache and php Eli Shemer wrote: > > I have installed mod_perl 1.3 statically to apache while using php as a DSO > > After I've gracefully reloaded apache, php stopped working > > What is the best way to get them both working together ? > > Should I statically link php as well or do I have to use mod_perl as a DSO ? Did you forget to build mod_so into 1.3? Bill
Re: questions on serving big file & SQL statement parsing
> 2. "Upload and Download of Big Files" > http://perl.apache.org/docs/1.0/guide/performance.html#toc_Upload_and_Download_of_Big_Files > > it mentions that serving static file from the > front-end server but also mentions the following: > > "This of course assumes that the script requires > none > of the functionality of the mod_perl server, such as > custom authentication handlers." > > I am wondering how do you do it if i have to auth > user > first? > i probably should give more detail about my question. in my case, i need to do authorization. do i need extra mod_perl front-end server to do this? how does this perform? also, will serving the file from backend mod_perl server to the front-end proxy a such bad idea? I am thinking that the modperl server will spit out the file to the proxy without have it tieup with the upload and let the proxy handle the file upload. am i right about this? ( couldn't find much detail on proxy to back it up at this moment ) thanks, James. Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
Re: questions on serving big file & SQL statement parsing
On Jul 3, 2007, at 12:21 AM, James. L wrote: i probably should give more detail about my question. in my case, i need to do authorization. do i need extra mod_perl front-end server to do this? how does this perform? also, will serving the file from backend mod_perl server to the front-end proxy a such bad idea? I am thinking that the modperl server will spit out the file to the proxy without have it tieup with the upload and let the proxy handle the file upload. am i right about this? ( couldn't find much detail on proxy to back it up at this moment ) there was a discussion about Perlbal a few weeks ago on this list... somone posted a case study, i think. or a link to one from what i recall, perlbal will do a subrequest to a backend modperl server for auth, then handle the file upload itself. you don't want to do any large file handling, or even general static file handling, under mp if at all possible. let it handle content generation and authorization as the 'brains' -- thats what it does best. use other apps like perlbal, nginx, whatever to handle your static files and large uploads. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | CEO/Founder SyndiClick Networks | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Founder/CTO/CVO | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Re: apache and php
On Jul 2, 2007, at 11:38 PM, Eli Shemer wrote: I have installed mod_perl 1.3 statically to apache while using php as a DSO After I've gracefully reloaded apache, php stopped working What is the best way to get them both working together ? Should I statically link php as well or do I have to use mod_perl as a DSO ? there was some sort of library conflict between php/mysql/modperl a while back on a few distros. i think the only way around it was to recompile everything from scratch. generally speaking though... don't run mod_php and mod_perl on the same server. you're just going to bloat apache and tie up resources. i run nginx on port80 for static content, push php content to fastcgi and proxy certain urls to mod_perl. my server's efficiency spiked drastically when i moved away from an all-apache setup. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | CEO/Founder SyndiClick Networks | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Founder/CTO/CVO | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Re: apache and php
Jonathan Vanasco wrote: i think the only way around it was to recompile everything from scratch. generally speaking though... don't run mod_php and mod_perl on the same server. you're just going to bloat apache and tie up resources. I'm running both on Fedora Core 5 and 6, but I had to tweak it slightly. I have a virtualhost which is fully under mod_perl's control but includes some php URLs: In /etc/httpd/conf.d/php.conf: uncomment "AddType application/x-httpd-php .php" (this puts that mime type on .php files, which makes php process the file because the regular AddHandler method is ignored while SetHandler perl-script is in effect) In httpd.conf: SetHandler perl-script SetHandler default (I've tried with and without this, can work both ways) cheers John