You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by "Justin M. Harrison" <sh...@doublebagel.com> on 2002/08/13 20:32:55 UTC
Random behavior
Hi,
I am having a problem with embperl randomly claiming that I am calling
an undefined sub routine. If I refresh the page, sometimes it does it
again - Sometimes it doesn't....Its _completely_ random (??)...
[19276]ERR: 24: Error in Perl code: Undefined subroutine
&Embperl::__5::db_connect called at
/home/user/public_html/cgi-bin/e/community.zoweb line 13.
It occurs like this:
[-
#use modules
use lib '/home/user/web/lib';
use web::sql;
#prepare variables
my $host = "localhost";
my $dbusername = "username";
my $dbpassword = "password";
my $database = "db";
#prepare database connection
$zoweb::dbi = &db_connect($host,$database,$dbusername,$dbpassword);
-]
Or:
[!
#use modules
use lib '/home/user/web/lib';
use web::sql;
#prepare variables
my $host = "localhost";
my $dbusername = "username";
my $dbpassword = "password";
my $database = "db";
!]
#prepare database connection
[- $zoweb::dbi = &db_connect($host,$database,$dbusername,$dbpassword) -]
Even after I restart the server.
Any ideas?
Justin
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: Random behavior
Posted by Justin Harrison <sh...@doublebagel.com>.
I _may_ have tracked down the behavior to this line:
[- $http_headers_out{'Location'} =
"http://zo.astyrrian.com/e/login.zoweb" -]
Are there any known problems with this? It is practically right from the
manual. If I remove it and refresh several times, its fine. If I put it
back in and refresh - It complains about not finding the function.
> -----Original Message-----
> From: Justin M. Harrison [mailto:shadowj4@doublebagel.com]
> Sent: Tuesday, August 13, 2002 2:33 PM
> To: embperl@perl.apache.org
> Subject: Random behavior
>
>
> Hi,
>
> I am having a problem with embperl randomly claiming that I
> am calling an undefined sub routine. If I refresh the page,
> sometimes it does it again - Sometimes it doesn't....Its
> _completely_ random (??)...
>
> [19276]ERR: 24: Error in Perl code: Undefined subroutine
> &Embperl::__5::db_connect called at
> /home/user/public_html/cgi-bin/e/community.zoweb line 13.
>
> It occurs like this:
>
> [-
> #use modules
> use lib '/home/user/web/lib';
> use web::sql;
>
> #prepare variables
> my $host = "localhost";
> my $dbusername = "username";
> my $dbpassword = "password";
> my $database = "db";
>
> #prepare database connection
> $zoweb::dbi = &db_connect($host,$database,$dbusername,$dbpassword);
> -]
>
> Or:
>
> [!
> #use modules
> use lib '/home/user/web/lib';
> use web::sql;
>
> #prepare variables
> my $host = "localhost";
> my $dbusername = "username";
> my $dbpassword = "password";
> my $database = "db";
> !]
> #prepare database connection
> [- $zoweb::dbi =
> &db_connect($host,$database,$dbusername,$dbpassword) -]
>
> Even after I restart the server.
>
>
> Any ideas?
>
> Justin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org