|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Same code (Apache & Perl) or (Apache Mod_Perl):
my $db_name= "DBI:$db_driver:$data_base"; $dbh = DBI->connect(db_name,$user,$password) or die {RaiseError => 1}; Some times get errors connecting in the "Apache Mod_Perl" configuration. Other times no errors. Have not experienced same condition in "Std Apache config w/o mod_perl". Comments from anyone experiencing these conditions, with possible solutions, would be appreciated. FYI: Apache + Mod_perl gives 10X (+/-) performance improvement over standard config. To see these conditions, see my development site setups: Std Apache see http://mollie.vanabel.com/cgi-bin/lubenew1.cgi for new recs http://mollie.vanabel.com/cgi-bin/lubedit1.cgi Apache + Mod Perl http://develop.vanabel.com (Web Register or Wed Edit options) Thks in advance for comments, Dave ------------------ |
|
#2
|
|||
|
|||
|
Found answer already, so will post it. It is abit lengthy, but worth knowing:
see http://perl.apache.org/guide/portin...ks_Sometimes_it When you start running your scripts under mod_perl, you might find yourself in a situation where a script seems to work, but sometimes it screws up. And the more it runs without a restart, the more it screws up. Often the problem is easily detectable and solvable. You have to test your script under a server running in single process mode (httpd -X). Generally the problem you have is of using global variables. Because global variables don't change from one script invocation to another unless you change them, you can find your scripts do strange things. The first example is amazing--Web Services. Imagine that you enter some site where you have an account, perhaps a free email account. Now you want to see other users' mail. You type in a username you want to peek at and a dummy password and try to enter the account. On some services this will work!!! You say, why in the world does this happen? The answer is simple: Global Variables. You have entered the account of someone who happened to be served by the same server child as you. Because of sloppy programming, a global variable was not reset at the beginning of the program and voila, you can easily peek into others' email! Here is an example of sloppy code: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by dvanabel: Same code (Apache & Perl) or (Apache Mod_Perl): my $db_name= "DBI:$db_driver:$data_base"; $dbh = DBI->connect(db_name,$user,$password) or die {RaiseError => 1}; Some times get errors connecting in the "Apache Mod_Perl" configuration. Other times no errors. Have not experienced same condition in "Std Apache config w/o mod_perl". Comments from anyone experiencing these conditions, with possible solutions, would be appreciated. FYI: Apache + Mod_perl gives 10X (+/-) performance improvement over standard config. To see these conditions, see my development site setups: Std Apache see http://mollie.vanabel.com/cgi-bin/lubenew1.cgi for new recs http://mollie.vanabel.com/cgi-bin/lubedit1.cgi Apache + Mod Perl http://develop.vanabel.com (Web Register or Wed Edit options) Thks in advance for comments, Dave [/quote] ------------------ |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > MySQL with Apache mod perl vs. regular Apache & perl, generates connection errors etc |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|