Re: Trouble getting mod_perl and apache running with Apache::DBI
On Fri, 2003-08-15 at 10:34, K Old wrote: What's happening is that with use Apache::DBI uncommented in either the httpd.conf or startup.pl Apache does not start. Do you have something in your code that connects to a database during startup? That could be a problem. Also, what's the point of use vars qw($dbh %session); in your startup.pl? Do you actually know what package these are being declared in? Probably not one that you will be using later in your scripts. - Perrin -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Odd Reload Behavior
On Sat, 2003-08-16 at 01:46, Cory 'G' Watson wrote: %somehash = (); This declaration is outside of any subroutines. Okay, so your subs that refer to it are now closures. That could be part of the issue. If you make %somehash a real global, it might help. I re-attacked this problem by adding a caller() check in App, and it proved to me that App was indeed being loaded twice. Once by my startup.pl (use App ();), and _again_ by an eval. caller() couldn't point me to the spot of code that was doing this, other than telling me it was a 'require App;'. I started flipping switches and localized it to PerlFreshRestart being on. When I turn it off, the eval() happens _before_ my startup.pl use() and subsequence call to App-load(). Well, first of all, you're just asking for trouble if you turn on PerlFreshRestart. Don't do it. Do you hava anything like a PerlModule App in your httpd.conf? You haven't actually shown us your real conf, startup, or code, so I'm just guessing here. Are you no longer having problems now that you turned off PerlFreshRestart? - Perrin -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Odd Reload Behavior
On Sat, 2003-08-16 at 01:46, Cory 'G' Watson wrote: Well, first of all, you're just asking for trouble if you turn on PerlFreshRestart. Don't do it. I forget why I added it. My (poor) memory seems to recall something from the Eagle book causing me to add it. I'd never seen the 'evil' document before this weekend. My Eagle book is at the office, and I don't recall reading about it in the new Horse book. Do you hava anything like a PerlModule App in your httpd.conf? You haven't actually shown us your real conf, startup, or code, so I'm just guessing here. No, I only had a 'use App;' in my startup. Are you no longer having problems now that you turned off PerlFreshRestart? The problem has since gone away. I accidentally only replied to Ged Haywood when I got the thing working. When I added a caller() to the top of my module, I saw the initial startup.pl use(), and then a later eval() that I couldn't track. When I turned OFF PerlFreshRestart, the order was reversed (eval() before startup.pl's use()) and my problem, of course, went away. I assumed from the beginning that this was something of my own doing, I just wanted to know why my ignorance was causing to happen. It seems that PerlFreshRestart causes some difference in the loading of my modules. -- Cory 'G' Watson http://www.loggerithim.org -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Odd Reload Behavior
On Sun, 2003-08-17 at 22:15, Cory 'G' Watson wrote: No, I only had a 'use App;' in my startup. Your startup comes before the virtual host sections then? When I added a caller() to the top of my module, I saw the initial startup.pl use(), and then a later eval() that I couldn't track. When I turned OFF PerlFreshRestart, the order was reversed (eval() before startup.pl's use()) and my problem, of course, went away. I assumed from the beginning that this was something of my own doing, I just wanted to know why my ignorance was causing to happen. It seems that PerlFreshRestart causes some difference in the loading of my modules. As I understand it, the only thing that PerlFreshRestart does is clear %INC when you restart the sever (with a USR1 signal), kind of like this: while (($k, $v) = each(%INC)) { delete($INC{$k}); eval(require $k); } I don't know where that eval call would be coming from with PerlFreshRestart off. That's why I was wondering if you had PerlModule call somewhere in httpd.conf. - Perrin -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html