#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Lakewood, CO, USA
    Posts
    8
    Rep Power
    0
    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. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Lakewood, CO, USA
    Posts
    8
    Rep Power
    0
    Found answer already, so will post it. It is abit lengthy, but worth knowing:

    see http://perl.apache.org/guide/porting...s_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]



    ------------------

Similar Threads

  1. Problems installing mod_perl 1.2.7 with perl 5.8.0
    By cptsanity in forum Perl Programming
    Replies: 7
    Last Post: February 20th, 2003, 07:49 AM
  2. Replies: 2
    Last Post: June 20th, 2002, 06:07 AM
  3. Replies: 0
    Last Post: May 12th, 2002, 04:34 PM
  4. Replies: 0
    Last Post: April 26th, 2002, 07:16 AM
  5. Hello Perl Land
    By if(Kevin) in forum Perl Programming
    Replies: 4
    Last Post: July 26th, 2001, 12:28 PM

IMN logo majestic logo threadwatch logo seochat tools logo