Re: core dump on RH6.1/Apache 1.3.9/mod_perl 1.21
On 26 Oct, Stas Bekman wrote: But even if I eliminate all mod_perl initialisation params, just having the mod_perl DSO loaded crashes the server. Does that mean that I have to go static ? I'm really surprised: been runnnig the exact same versions on rh6.0 and no problem. That's why I'm suspecting an external cause. DSO is reported to be unstable yet, at least for some platforms/sw releases. I'm using a static build. Seems to be the case. The RedHat rpm distribution works fine on one of my machines and not at all on another. I can think of no obvious reason why it should fail on one and not the other, both machines have very similar set-ups, but that is the way it is. The hand built, statically linked version works perfectly. -- John Reid Senior Analyst/Programmer Open Connect (Ireland) Ltd http://www.openconnect.ie/
Re: core dump on RH6.1/Apache 1.3.9/mod_perl 1.21
But even if I eliminate all mod_perl initialisation params, just having the mod_perl DSO loaded crashes the server. Does that mean that I have to go static ? I'm really surprised: been runnnig the exact same versions on rh6.0 and no problem. That's why I'm suspecting an external cause. DSO is reported to be unstable yet, at least for some platforms/sw releases. I'm using a static build. I have recently upgraded from RH6.0 to RH6.1 I'm using Apache 1.3.9, mod-perl 1.21 with perl5.00503 recompiled for the occasion, as well as mod_perl, and it core dumps just before spawning child httpd processes. I had no trouble before on RH6.0 with Apache 1.3.6/mod_perl 1.21. I use a httpd.conf with some Perl tags that are executed properly. The same config file still runs on another RH6.0 server without problems. Could it be a glibc problem ? gdb tells me something like "couldn't access memory at 0x404" before the segmentation fault. I'm going nuts. Any chance you have PerlFreshRestart turned On? I run RH6.1 with Apache/1.3.10-dev (Unix) mod_perl/1.21_01-dev without any problems... Also try to eliminate the modules you preload, and if server starts without them, try to find out the offending module... Any idea ? Stephane. ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: core dump on RH6.1/Apache 1.3.9/mod_perl 1.21
I have recently upgraded from RH6.0 to RH6.1 I'm using Apache 1.3.9, mod-perl 1.21 with perl5.00503 recompiled for the occasion, as well as mod_perl, and it core dumps just before spawning child httpd processes. I had no trouble before on RH6.0 with Apache 1.3.6/mod_perl 1.21. I use a httpd.conf with some Perl tags that are executed properly. The same config file still runs on another RH6.0 server without problems. Could it be a glibc problem ? gdb tells me something like "couldn't access memory at 0x404" before the segmentation fault. I'm going nuts. Any chance you have PerlFreshRestart turned On? I run RH6.1 with Apache/1.3.10-dev (Unix) mod_perl/1.21_01-dev without any problems... Also try to eliminate the modules you preload, and if server starts without them, try to find out the offending module... Any idea ? Stephane. ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: W32 + Apache::DBI ?
I have been digging around in the FAQ and archives for information about people running mod_perl on a windows box and also using Apache::DBI, but have come up with nothing. I am under the impression that it is not going to work becase whenever I try to load up the Apache::DBI module apache starts up and then exists immediately leaving this in the error log: [Mon Oct 25 15:06:11 1999] file .\main\http_main.c, line 5890, assertion "start_mutex" failed I once spent a good deal of time, trying to use Apache::DBI under WinNT. I had to give up as I did not find any solution, nor someone who would share a similar experience. The problem was: whichever way should I call Apache::DBI during Apache initialisation (whether it should be using PerlModule, or PerlRequire, or by having Apache::DBI called in any other Perl script run during Apache initialisation), I would always get the same error: Can't locate object method "trace_msg" via package "DBI" at C:\Perl\site\5.00503\lib/DBI.pm line 311. END failed--cleanup aborted. On the contrary, Apache::DBI would work perfectly if NOT in Apache context, but I would probably not need it. :))) The author of Apache::DBI recommended me to upgrade, but I WAS using all the latest versions. I definitely have an impression that there are not enough folks in the "W32 + Apache::DBI" community, so you just have to rely upon your own debugging skills. Victor.
RE: W32 + Apache::DBI ?
I have been digging around in the FAQ and archives for information about people running mod_perl on a windows box and also using Apache::DBI, but have come up with nothing. I am under the impression that it is not going to work becase whenever I try to load up the Apache::DBI module apache starts up and then exists immediately leaving this in the error log: [Mon Oct 25 15:06:11 1999] file .\main\http_main.c, line 5890, assertion "start_mutex" failed Build mod_perl with PERL_STARTUP_DONE_CHECK set (e.g. insert #define PERL_STARTUP_DONE_CHECK 1 at the top of mod_perl.h or add it to the defines in MSVC++ Options dialog). This works for me Gerald P.S. Let me know if this solves your problem
Trouble sending mail under modperl...
Hello, mod_perloids. I'm having a gutfull of trouble sending mail under mod_perl. I'm doing it by the books, to wit, the cookbook and the bigbirdie book, under rh linux 5.2. the code is warn ("MAIL: Opening sendmail... path is \"".$sendmailpath."\""); open (SENDMAIL, $sendmailpath) || warn ("MAIL: Cannot open sendmail at \"".$sendmailpath."\""); print SENDMAIL ( "From: Eidos Web Password Assistant passwordhelp\@".$dbh-{r}-server-server_hostname."\n". "To: You ".$dbh-{param}-{csemail}."\n". "Subject: ".$EidosParser::locale{mailsendpasswordsubject}."\n\n". $EidosParser::locale{mailsendpasswordtext1}. $result[1]. $EidosParser::locale{mailsendpasswordtext2}. ($dbh-{r}-server-server_hostname).($dbh-{r}-uri()). $EidosParser::locale{mailsendpasswordtext3}. "\n.\n"); warn ("MAIL: Mail Sent okay!"); close (SENDMAIL); I ditched the fail-result tests in desperation. :) It tells me the mail has been sent okay (even when the failiure tests were in place) but nothing. Not in the outgoing or incoming mail spools. I tested this code as a vanilla cgi script, and it worked fine. I have *no* idea why it won't work under mod_perl. Anyone else had similar problems (or solutions :), or should I Just Shut Up? Dave
Re: Trouble sending mail under modperl...
Hello, mod_perloids. I'm having a gutfull of trouble sending mail under mod_perl. I'm doing it by the books, to wit, the cookbook and the bigbirdie book, under rh linux 5.2. the code is warn ("MAIL: Opening sendmail... path is \"".$sendmailpath."\""); open (SENDMAIL, $sendmailpath) || warn ("MAIL: Cannot open sendmail at \"".$sendmailpath."\""); print SENDMAIL ( "From: Eidos Web Password Assistant passwordhelp\@".$dbh-{r}-server-server_hostname."\n". "To: You ".$dbh-{param}-{csemail}."\n". "Subject: ".$EidosParser::locale{mailsendpasswordsubject}."\n\n". $EidosParser::locale{mailsendpasswordtext1}. $result[1]. $EidosParser::locale{mailsendpasswordtext2}. ($dbh-{r}-server-server_hostname).($dbh-{r}-uri()). $EidosParser::locale{mailsendpasswordtext3}. "\n.\n"); warn ("MAIL: Mail Sent okay!"); close (SENDMAIL); I ditched the fail-result tests in desperation. :) It tells me the mail has been sent okay (even when the failiure tests were in place) but nothing. Not in the outgoing or incoming mail spools. I tested this code as a vanilla cgi script, and it worked fine. I have *no* idea why it won't work under mod_perl. Anyone else had similar problems (or solutions :), or should I Just Shut Up? Hmmm, a funny way to ask questions... let me try too: Should we answer the question or Just Shut Up? :) Anyway, how do you know it's a mod_perl problem? How do you know it has something to do with mail? Oh, yeah the mail has never reached the destination... Did you try to print out what you send instead of piping it to sendmail? Check that the generated headers are correct ones... Other than that, why not to use Net::SMTP, which verifies each command and you can arrange your code to die or warn on failure to send some field, since it talks directly to the smtp server... take a look at the simple send_mail() implemented that way (BTW, it's much faster and lighter than sendmail, but this is off-topic...) http://www.singlesheaven.com/stas/TULARC/works/scripts/mail-lib.pl Hope this helps... ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: Trouble sending mail under modperl...
Dave Mee [EMAIL PROTECTED] writes: Hello, mod_perloids. I'm having a gutfull of trouble sending mail under mod_perl. I'm doing it by the books, to wit, the cookbook and the bigbirdie book, under rh linux 5.2. the code is warn ("MAIL: Opening sendmail... path is \"".$sendmailpath."\""); open (SENDMAIL, $sendmailpath) || warn ("MAIL: Cannot open sendmail at \"".$sendmailpath."\""); Let's assume that $sendmailpath is a pipe ("|/usr/lib/sendmail ...") print SENDMAIL ( "From: Eidos Web Password Assistant passwordhelp\@".$dbh-{r}-server-server_hostname."\n". "To: You ".$dbh-{param}-{csemail}."\n". "Subject: ".$EidosParser::locale{mailsendpasswordsubject}."\n\n". $EidosParser::locale{mailsendpasswordtext1}. $result[1]. $EidosParser::locale{mailsendpasswordtext2}. ($dbh-{r}-server-server_hostname).($dbh-{r}-uri()). $EidosParser::locale{mailsendpasswordtext3}. "\n.\n"); warn ("MAIL: Mail Sent okay!"); close (SENDMAIL); I ditched the fail-result tests in desperation. :) It tells me the mail has been sent okay (even when the failiure tests were in place) but nothing. The essential failure-test is missing. Only during close() do you find out if there was a problem writing to the pipe when the last (possibly only) bufferful of data gets flushed to it. Not in the outgoing or incoming mail spools. I tested this code as a vanilla cgi script, and it worked fine. I have *no* idea why it won't work under mod_perl. There shouldn't be much difference. Maybe some obscure environment variable, or your cgi is suexec'ed to a different user? -- Frank Cringle, [EMAIL PROTECTED] voice: (+49 2304) 467101; fax: 943357
RE: W32 + Apache::DBI ?
However, at the time of that test, I was using: DBI 1.13 ApacheDBI 0.85 ModPerl 1.21 Apache 1.3.9 Perl 5.005_03 built for MSWin32-x86 I still have that machine, and I will willingly re-do the tests if anybody wishes to join the discussion. I have DBI 1.08 Apache::DBI 0.81 mod_perl 1.20 Apache 1.3.9 perl 5.005_02 everything build with MSVC 5. and it work when I compile mod_perl with PERL_STARTUP_CHECK_DONE (see my previous mail). Without compiling with PERL_STARTUP_DONE_CHECK, apache exits shortly after it has started. Gerald
Re: W32 + Apache::DBI ?
Anyone having this problem can also fix it by adding this line to the top of the END block (around line 311): return unless defined DBI::trace_msg; # return unless bootstrap'd ok If this works, it seems to be the easiest solution. Thank you Tim. Victor.
Re: Problem Apache_SSL 1.37 + Apache 1.3.9 + openSSL 0.9.4 + mod_perl 1.21 crashing
On Tue, Oct 26, 1999 at 10:39:10AM -0400, Vivek Khera wrote: "TD" == The Doctor [EMAIL PROTECTED] writes: TD When I attempt to start perlified httpsd, I get TD no symbol: PL_dowarn. TD Any pointers? Yes, but it is dangling: ldd httpsd Now figure out how to make it find the missing library. Here is the output: rdlcom.com//usr/source/apache_1.3.9/src$script Script started, output file is typescript rdlcom.com//usr/source/apache_1.3.9/src$ldd ./httpsd libperl.so = /usr/lib/libperl.so (0xc1e3000) rdlcom.com//usr/source/apache_1.3.9/src$exit exit Script done, output file is typescript -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 PGP MIME spoken herehttp://www.kciLink.com/home/khera/ -- God Queen and Country Member - Liberal International Never Satan President and Republic This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] Society MUST be saved! Republics must dissolve. Australia, stop the barbarianism! Say NO to the Republic and yes to civilization.
Re: Any help showing examples of database only web site w/mod_perl/my sql
I would like to build a 100% DB contained web site. Meaning all users home directories, files etc.. exists within a database. Any examples or places to look would be greatly appreciated. I am working on a similar project, look at http://www.jazzvalley.com. I have about 5000 musicians in my database, and each one has his own homepage, automatically generated but also containing stuff which can be personalized for each musician. Same thing for musical scenes, with a completely different implementation technique (much more personalization). I am now working on an extension to this system, which will allow each of the musicians to have a unique URI access, the URI's (non-existent, a priori) being analysed by translation handlers and automatically translated into script calls with parameters. Lincoln and Doug's book contains excellent and very complete explanations on how translation handlers work, thanks to Eric Cholet who pointed me to the right direction. Victor.
Re: Any help showing examples of database only web site w/mod_perl/my sql
Clifford Lang [EMAIL PROTECTED] wrote: I have a static site now where users can create new sites (user home directories) very easily, but the growth is going to kill me and my filesystem (to many subdirectories). I would like to build a 100% DB contained web site. Meaning all users home directories, files etc.. exists within a database. Any examples or places to look would be greatly appreciated. The areas I'm having conceptual trouble with is mainly the *.conf files. How do I accomplish the same actions as below with a static conf file? (without restarting the server every time a new user is added) I would write my own PerlAcessHandler and PerlAuthenHandler that would base its authentication/authorization on the URL. If you needed further customization of the authentication/authorization, you could tie your module's configuration to the user in the database. Implementation is left as an exercise to the reader. -- James Smith [EMAIL PROTECTED], 409-862-3725 Texas AM CIS Operating Systems Group, Unix
Problems with dynamically-loaded perl modules under Solaris 2.5.1
I'm having problems with modules that use DynaLoader (Data::Dumper and Storable, specifically) under mod_perl on Solaris machines. These modules work fine in standalone scripts, or when run under mod_cgi or mod_fastcgi, but as soon as I put a "use Storable" in a mod_perl handler, I get this in my error log: [Tue Oct 26 11:21:33 1999] [error] Can't load '/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/Storable/Storable.so' for module Storable: ld.so.1: ./httpd: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/Storable/Storable.so: symbol main: referenced symbol not found at /usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169. BTW I get an identical message if I put a "use Storable" inside a Perl section in my httpd.conf. After searching the mailing list archive, I see that this sort of thing can happen if mod_perl was compiled against the "wrong" version of perl on the system. So just to make sure, I removed all remnants of an older 5.004 install, remade mod_perl, and I'm still getting the errors. My setup: Solaris 2.5.1 (Sparc) gcc 2.95 perl 5.005_03 (compiled with above gcc, as were the below) apache 1.3.9 (with all modules compiled statically) mod_perl 1.21 (EVERYTHING=1) mod_fastcgi 2.2.2 I'm not having this problem with an otherwise nearly identical setup under Redhat Linux 5.x (the differences being OS, of course, and gcc 2.7.2.3). Any help appreciated.
Re: Trouble sending mail under modperl...
On Tue, 26 Oct 1999, Stas Bekman wrote: [...] Other than that, why not to use Net::SMTP, which verifies each command and you can arrange your code to die or warn on failure to send some field, since it talks directly to the smtp server... take a look at the simple send_mail() implemented that way (BTW, it's much faster and lighter than sendmail, but this is off-topic...) Eh, if the mail server is still sendmail it doesn't make much of a difference how you connect to it. I prefer Net::SMTP too though. And you're right, it's not really on-topic. - ask -- ask bjoern hansen - http://www.netcetera.dk/~ask/ more than 50M impressions per day, http://valueclick.com
Re: Any help showing examples of database only web site w/mod_perl/my sql
That is what I did for our site. We have a members only section that allows them to have web access to some configurable pieces of their services. We store their encrypted account password as a column in the table that hold account info. When they try to access the protected area, the module steps in a prints out a form for authentication. It takes in its stuff and compares it to what it should be as returned by the db and either rejectes them or assigns them a cookie with a random token that is also stored in the db. If they try to access the area and the module sees that they have such a cookie it tests the token to see if its still valid and the process behaves pretty seamlessly. Its also a good method cause you can add alot of proprietary type functions for extra security, tracking, etc. Unfortunately I do not have a test account that you could examine the interface through. If you need any help or have any questions, I may be able to provide assistance though. On Tue, 26 Oct 1999, James G Smith wrote: Clifford Lang [EMAIL PROTECTED] wrote: I have a static site now where users can create new sites (user home directories) very easily, but the growth is going to kill me and my filesystem (to many subdirectories). I would like to build a 100% DB contained web site. Meaning all users home directories, files etc.. exists within a database. Any examples or places to look would be greatly appreciated. The areas I'm having conceptual trouble with is mainly the *.conf files. How do I accomplish the same actions as below with a static conf file? (without restarting the server every time a new user is added) I would write my own PerlAcessHandler and PerlAuthenHandler that would base its authentication/authorization on the URL. If you needed further customization of the authentication/authorization, you could tie your module's configuration to the user in the database. Implementation is left as an exercise to the reader. -- James Smith [EMAIL PROTECTED], 409-862-3725 Texas AM CIS Operating Systems Group, Unix --- "I keep banging my head on things," Tom said, bashfully. --- Jon J - Web Development for Shore.Net E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: 781 593-3110 x156
Re: W32 + Apache::DBI ?
On Tue, Oct 26, 1999 at 03:57:09PM +0200, Gerald Richter wrote: However, at the time of that test, I was using: DBI 1.13 ApacheDBI 0.85 ModPerl 1.21 Apache 1.3.9 Perl 5.005_03 built for MSWin32-x86 I still have that machine, and I will willingly re-do the tests if anybody wishes to join the discussion. I have DBI 1.08 Apache::DBI 0.81 mod_perl 1.20 Apache 1.3.9 perl 5.005_02 everything build with MSVC 5. and it work when I compile mod_perl with PERL_STARTUP_CHECK_DONE (see my previous mail). Without compiling with PERL_STARTUP_DONE_CHECK, apache exits shortly after it has started. Yes (looking at the offending line) it's in an END block and the method would only not be defined if perl was exiting before it had had a chance to call "bootstrap DBI;". Anyone having this problem can also fix it by adding this line to the top of the END block (around line 311): return unless defined DBI::trace_msg; # return unless bootstrap'd ok Tim.
Apache::SSI and lookup_uri and POST req fails
i'm so close to getting apache::ssi to work correctly but right now my work has come to a halt... I've tracked the problem down to POST-ed forms + SSI + virtual includes + $r-lookup_uri, but i don't know how to fix it! I use Apache::SSI to parse the contents of an HTML string and include any ssi variables, templates etc before printing to the screen. my modperl handler has a snippet of code like this: my $ssi = Apache::SSI-new($output_html, $r); $output_html = $ssi-output(); the modperl handler is used to - display a login page - authenticate the user and display any error information I have a POST form for people to type in username,password and trigger off this handler. i'm noticing that if i use a POST request, the returned page just hangs forever, in the $r-lookup_uri stage of implementing a virtual include via SSI. If I use a GET request, $r-lookup_uri completes normally. now i have to use POST, so that people's passwords are hidden in the browser window. does anyone have any clue as to why POSTS would make $r-lookup_uri hang for ever? Please please help, mizpoon
Re: W32 + Apache::DBI ?
On Tue, Oct 26, 1999 at 11:59:07AM +0200, Victor Zamouline wrote: I have been digging around in the FAQ and archives for information about people running mod_perl on a windows box and also using Apache::DBI, but have come up with nothing. I am under the impression that it is not going to work becase whenever I try to load up the Apache::DBI module apache starts up and then exists immediately leaving this in the error log: [Mon Oct 25 15:06:11 1999] file .\main\http_main.c, line 5890, assertion "start_mutex" failed I once spent a good deal of time, trying to use Apache::DBI under WinNT. I had to give up as I did not find any solution, nor someone who would share a similar experience. The problem was: whichever way should I call Apache::DBI during Apache initialisation (whether it should be using PerlModule, or PerlRequire, or by having Apache::DBI called in any other Perl script run during Apache initialisation), I would always get the same error: Can't locate object method "trace_msg" via package "DBI" at C:\Perl\site\5.00503\lib/DBI.pm line 311. END failed--cleanup aborted. That's a known bug that was fixed in DBI 1.10 (I believe). Tim.