You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Aaron Johnson <so...@gina.net> on 2002/04/10 13:56:35 UTC

More on Sessions not active in 2.0b7

In rereading my last post I realized that I didn't give much informaiton 
to go on.  I am upgrading from HTML::Embperl 2.0b5 to 2.0b7 Embperl.  My 
setup was working correctly with Apache::SessionX prior to the upgrade 
attempt.  I have double checked the conf file and no SESSION values are 
set there that might conflict with SessionX.

I am able to process pages correctly that contain Embperl code, it is 
only an issue with retaining the session data.

Here is my conf file settings for the server and directory in question:

EMBPERL_DEBUG 13549
EMBPERL_LOG /embperl/log
EMBPERL_ESCMODE 0
EMBPERL_OPTIONS 16

AddType text/html .epl

<Location /my_app>
     EMBPERL_APPNAME my_app
     EMBPERL_URIMATCH "(\.htm|\.epl)$"
     EMBPERL_COOKIE_EXPIRES +30m
     EMBPERL_COOKIE_PATH /my_app
     SetHandler perl-script
     PerlHandler Embperl
     Options ExecCGI
</Location>

Aaron Johnson


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Bug Report - Missing Right Bracket which is there:

Posted by Ruben I Safir <ru...@mrbrklyn.com>.
That's right

I forgot this.  I thought about it but I was afraid I'd ruin the 
modperl prints, but this sinpet is
in the Camel book if I recall.

Thank for making my like a little easier

Ruben

On 2002.04.12 18:08 Ed Grimm wrote:
> On Fri, 12 Apr 2002, Ruben I Safir wrote:
> 
> > Now I have another problem.
> > 
> > I need to create html files on the fly.  I read in a
> > template in the module and print it out through another filehandle to the
> > drive.
> > 
> > It only writes 188 characters.  I tried setting $| = 1 in the module, but it seems
> > to have no effect.  Is their a method to write the whole file out?
> 
> $| = 1 only applies to the currently selected filehandle.
> 
> my $fh = select(OUT); $| = 1; select($fh);
> 
> HTH
> Ed
> 
-- 
__________________________

Brooklyn Linux Solutions
__________________________
http://www.mrbrklyn.com - Consulting
http://www.brooklynonline.com - For the love of Brooklyn
http://www.nylxs.com - Leadership Development in Free Software
http://www.nyfairuse.org - The foundation of Democracy
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net
http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you...
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....

1-718-382-5752




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: print to file OUT (was: Bug Report - Missing Right Bracket which is there:)

Posted by Gerald Richter <ri...@ecos.de>.
> open OUT, ">$file" or die $!;

Don't use OUT here, OUT is predefined by EMbperl. Also it may work, it may
have sideeffects. Just rename the filehandle to anythingelse

> my @outputfile = <IN>;
> print STDERR @outputfile;
> $|=1;
> for(@outputfile){
> print OUT;
> }
>

Also it's a good idea to close your file after writing, otherwise things
will not get written correctly to disk...

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Bug Report - Missing Right Bracket which is there:

Posted by Ruben I Safir <ru...@mrbrklyn.com>.
Better english :)

On 2002.04.12 17:55 Ruben I Safir wrote:
> It does recurssion in the emblog, but I'm not causing it to my knowledge.
> 
> I didn't write any recurrisions.  I finally got around it 
> by objectifying the code and putting everying in one block.
> 
> 
> [- use INNS; 
> $obj = INNS->new;
> $statement = $obj->make_data(\%fdat);  
> 
> -]
> 
> 
> Now I have another problem.
> 
> I need to create html files on the fly.  I read in a
> template in the module and print it out through another filehandle to the
> drive.
> 
> It only writes 188 characters.  I tried setting $| = 1 in the module, but it seems
> to have no effect.  Is their a method to write the whole file out?
> 
> I've tried different variations of this
> 
> 	my $dir = "/usr/local/apache/htdocs/inns/$recs[8]";
> 	my $base = $recs[4]; 
> 	$base	=~ s/ //g;
> 	my $file = "/usr/local/apache/htdocs/inns/$recs[8]/$base";
> 	print STDERR "$dir\n";
> 	unless ( -e $dir ){
> 		mkdir $dir or die $!;
> 	}
> 	open IN, "/usr/local/apache/htdocs/inns/addmysite/full_results_page.html" or die $!;
> 	open OUT, ">$file" or die $!;
> 	my @outputfile = <IN>;
> 	print STDERR @outputfile;
> 	$|=1;
> 	for(@outputfile){
> 		print OUT;
> 	}
> 
> 
> It does print everything to STDERR (the Apache log file)
> 
> 
> Ruben
> On 2002.04.11 02:00 Gerald Richter wrote:
> > >
> > > EMBPERL LOG
> > >
> > > [29842]SRC: Line 4: [- $statement = INNS::make_data(\%fdat) -]
> > > [29842]EVAL<  $statement = INNS::make_data(\%fdat)
> > > [29842]MEM: Reload /usr/local/apache/htdocs/inns/addmysite/enterdata.html
> > in HTML::Embperl::DOC::_1
> > > [29842]REQ:  Package = HTML::Embperl::DOC::_1
> > > [29842]SRC: Line 1: <HTML><HEAD><TITLE>Enter Site Info</TITLE></HEAD>
> > >....
> > 
> > Looks like your make_data is recursivly calling your page. Does it?
> > 
> > If yes, it looks to me like a bug in an old Embperl version. Which version
> > do you using?
> > 
> > Gerald
> > 
> > 
> > -------------------------------------------------------------
> > Gerald Richter    ecos electronic communication services gmbh
> > Internetconnect * Webserver/-design/-datenbanken * Consulting
> > 
> > Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> > E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
> > WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> > -------------------------------------------------------------
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> > 
> -- 
> __________________________
> 
> Brooklyn Linux Solutions
> __________________________
> http://www.mrbrklyn.com - Consulting
> http://www.brooklynonline.com - For the love of Brooklyn
> http://www.nylxs.com - Leadership Development in Free Software
> http://www.nyfairuse.org - The foundation of Democracy
> http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net
> http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you...
> http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
> 
> 1-718-382-5752
> 
> 
> 
-- 
__________________________

Brooklyn Linux Solutions
__________________________
http://www.mrbrklyn.com - Consulting
http://www.brooklynonline.com - For the love of Brooklyn
http://www.nylxs.com - Leadership Development in Free Software
http://www.nyfairuse.org - The foundation of Democracy
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net
http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you...
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....

1-718-382-5752




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Bug Report - Missing Right Bracket which is there:

Posted by Ed Grimm <ed...@asgard.rsc.raytheon.com>.
On Fri, 12 Apr 2002, Ruben I Safir wrote:

> Now I have another problem.
> 
> I need to create html files on the fly.  I read in a
> template in the module and print it out through another filehandle to the
> drive.
> 
> It only writes 188 characters.  I tried setting $| = 1 in the module, but it seems
> to have no effect.  Is their a method to write the whole file out?

$| = 1 only applies to the currently selected filehandle.

my $fh = select(OUT); $| = 1; select($fh);

HTH
Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Bug Report - Missing Right Bracket which is there:

Posted by Ruben I Safir <ru...@mrbrklyn.com>.
It does recurssion in the meblog, but I'm not causing it to my knowledge.

I didn't right any recurrisions.  I finally got around it 
by objectifying the code and putting everying in one block.


[- use INNS; 
$obj = INNS->new;
$statement = $obj->make_data(\%fdat);  

-]


Now I have another problem.

I need to create html files on the fly.  I read in a
template in the module and print it out through another filehandle to the
drive.

It only writes 188 characters.  I tried setting $| = 1 in the module, but it seems
to have no effect.  Is their a method to write the whole file out?

I've tried different variations of this

	my $dir = "/usr/local/apache/htdocs/inns/$recs[8]";
	my $base = $recs[4]; 
	$base	=~ s/ //g;
	my $file = "/usr/local/apache/htdocs/inns/$recs[8]/$base";
	print STDERR "$dir\n";
	unless ( -e $dir ){
		mkdir $dir or die $!;
	}
	open IN, "/usr/local/apache/htdocs/inns/addmysite/full_results_page.html" or die $!;
	open OUT, ">$file" or die $!;
	my @outputfile = <IN>;
	print STDERR @outputfile;
	$|=1;
	for(@outputfile){
		print OUT;
	}


It does print everything to STDERR (the Apache log file)


Ruben
On 2002.04.11 02:00 Gerald Richter wrote:
> >
> > EMBPERL LOG
> >
> > [29842]SRC: Line 4: [- $statement = INNS::make_data(\%fdat) -]
> > [29842]EVAL<  $statement = INNS::make_data(\%fdat)
> > [29842]MEM: Reload /usr/local/apache/htdocs/inns/addmysite/enterdata.html
> in HTML::Embperl::DOC::_1
> > [29842]REQ:  Package = HTML::Embperl::DOC::_1
> > [29842]SRC: Line 1: <HTML><HEAD><TITLE>Enter Site Info</TITLE></HEAD>
> >....
> 
> Looks like your make_data is recursivly calling your page. Does it?
> 
> If yes, it looks to me like a bug in an old Embperl version. Which version
> do you using?
> 
> Gerald
> 
> 
> -------------------------------------------------------------
> Gerald Richter    ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
> 
> Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
> WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> -------------------------------------------------------------
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 
-- 
__________________________

Brooklyn Linux Solutions
__________________________
http://www.mrbrklyn.com - Consulting
http://www.brooklynonline.com - For the love of Brooklyn
http://www.nylxs.com - Leadership Development in Free Software
http://www.nyfairuse.org - The foundation of Democracy
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net
http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you...
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....

1-718-382-5752




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Bug Report - Missing Right Bracket which is there:

Posted by Gerald Richter <ri...@ecos.de>.
>
> EMBPERL LOG
>
> [29842]SRC: Line 4: [- $statement = INNS::make_data(\%fdat) -]
> [29842]EVAL<  $statement = INNS::make_data(\%fdat)
> [29842]MEM: Reload /usr/local/apache/htdocs/inns/addmysite/enterdata.html
in HTML::Embperl::DOC::_1
> [29842]REQ:  Package = HTML::Embperl::DOC::_1
> [29842]SRC: Line 1: <HTML><HEAD><TITLE>Enter Site Info</TITLE></HEAD>
>....

Looks like your make_data is recursivly calling your page. Does it?

If yes, it looks to me like a bug in an old Embperl version. Which version
do you using?

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Bug Report - Missing Right Bracket which is there:

Posted by Ruben I Safir <ru...@mrbrklyn.com>.
Apache Error Log:

[Thu Apr 11 00:45:26 2002] [error] [29963]ERR:  13: Line 4: Missing right -]


EMBPERL in HTML
<HTML><HEAD><TITLE>Enter Site Info</TITLE></HEAD>
<BODY>
[- use INNS -]
[- $statement = INNS::make_data(\%fdat) -]  <---This is line 4
STATEMENT [+ $statement +]<P>
[$ FOREACH $tmp sort keys(%fdat) $]

Key  [+ $tmp +] VALUE [+ $fdat{$tmp} +]<P>

[$ ENDFOREACH $]
</BODY>
</HTML>
~                


EMBPERL LOG

[29842]SRC: Line 4: [- $statement = INNS::make_data(\%fdat) -]
[29842]SVs:  16904
[29842]EVAL<  $statement = INNS::make_data(\%fdat)
[29842]MEM:  Alloc 58 Bytes at 0834a9b0   Allocated so far 307 Bytes
[29842]MEM: Reload /usr/local/apache/htdocs/inns/addmysite/enterdata.html in HTML::Embperl::DOC::_1
[29842]MEM:  Free 58 Bytes at 0834a9ac  Allocated so far 249 Bytes
[29842]REQ:  No Safe Eval  All Opcode allowed   mode = mod_perl (3)
[29842]REQ:  Package = HTML::Embperl::DOC::_1
[29842]TAB:  get TabRow = 0, Used = 1
[29842]Using APACHE for output...
[29842]SVs:  Entry-SVs: 18071 -OBJs: 28 Curr-SVs: 18075 -OBJs: 28
[29842]SRC: Line 1: <HTML><HEAD><TITLE>Enter Site Info</TITLE></HEAD>
[29842]CMD-:  Cmd = 'html'
[29842]MEM:  Alloc 17 Bytes at 0834a9f0   Allocated so far 266 Bytes
[29842]MEM:  Alloc 21 Bytes at 0834aa08   Allocated so far 287 Bytes
[29842]SRC: Line 1: <HEAD><TITLE>Enter Site Info</TITLE></HEAD>
[29842]CMD-:  Cmd = 'head'
[29842]MEM:  Alloc 17 Bytes at 0834aa28   Allocated so far 304 Bytes
[29842]MEM:  Alloc 21 Bytes at 0834aa40   Allocated so far 325 Bytes
[29842]SRC: Line 1: <TITLE>Enter Site Info</TITLE></HEAD>
[29842]CMD-:  Cmd = 'title'
[29842]MEM:  Alloc 17 Bytes at 0834aa60   Allocated so far 342 Bytes
[29842]MEM:  Alloc 37 Bytes at 0834aa78   Allocated so far 379 Bytes
[29842]SRC: Line 1: </TITLE></HEAD>
[29842]SRC: Line 1: <TITLE>Enter Site Info</TITLE></HEAD>
[29842]CMD-:  Cmd = 'title'
[29842]MEM:  Alloc 17 Bytes at 0834aa60   Allocated so far 342 Bytes
[29842]MEM:  Alloc 37 Bytes at 0834aa78   Allocated so far 379 Bytes
[29842]SRC: Line 1: </TITLE></HEAD>
[29842]CMD-:  Cmd = '/title'
[29842]MEM:  Alloc 17 Bytes at 0834aaa8   Allocated so far 396 Bytes
[29842]MEM:  Alloc 23 Bytes at 0834aac0   Allocated so far 419 Bytes
[29842]SRC: Line 1: </HEAD>
[29842]CMD-:  Cmd = '/head'
[29842]MEM:  Alloc 17 Bytes at 0834aae0   Allocated so far 436 Bytes
[29842]MEM:  Alloc 23 Bytes at 0834aaf8   Allocated so far 459 Bytes
[29842]SRC: Line 1: <BODY>
[29842]CMD+:  Cmd = 'body'
[29842]MEM:  Alloc 17 Bytes at 0834ab18   Allocated so far 476 Bytes
[29842]MEM:  Alloc 22 Bytes at 0834ab30   Allocated so far 498 Bytes
[29842]SRC: Line 2: [- use INNS -]
[29842]SVs:  18098
[29842]EVAL<  use INNS
[29842]SVs:  18098
[29842]EVAL> <undefined>
[29842]TAB:  nResult = 0
[29842]SVs:  Entry-SVs: 18071 -OBJs: 28 Curr-SVs: 18097 -OBJs: 28
[29842]SRC: Line 4:                     [- $statement = INNS::make_data(\%fdat)
[29842]ERR:  13: Line 4: Missing right -]



package INNS;
use SQLHANDLE;

sub make_data{
	my $fdat = shift;
	my @fdat = keys(%$fdat);
	my $obj=SQLHANDLE->allocate('addmysite');
	%$fdat = map{ 
		my $val = $$fdat{$_};
		$val =~ s/'/\\'/g;
		print STDERR "$val\n";
		$_ => $val;
       	} @fdat;
	my $tmp;
	my $statement = 'INSERT INTO bio VALUES (';
	if (!defined $$fdat{'name'}){
		$statement .= 'NULL, ';
	}else{
		$tmp =  '\'' . $$fdat{'name'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'innkeeper_01_name'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'innkeeper_01_name'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'innkeeper_02_name'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'innkeeper_02_name'} .'\'' .  ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'innkeeper_03_name'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'innkeeper_03_name'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'name_of_inn'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'name_of_inn'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'address1'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'address1'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'address2'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'address2'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'city'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'city'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Selection2'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Selection2'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'zip'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'zip'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Selection'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Selection'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'email'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'email'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'inns_provided_email'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'inns_provided_email'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'telephone'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'telephone'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'telephone_toll_free'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'telephone_toll_free'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'toll_free_appear'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'toll_free_appear'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'fax'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'fax'} . '\'' . ", ";
		$statement .= $tmp;
	}
	if (!defined $$fdat{'company_website'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'company_website'} . '\'';
		$statement .= $tmp;
	}
	$statement .= " ,NULL )";
		print STDERR " STATEMENT $statement\n";
	
		
	my $last_id = $obj->insert_statement($statement);
#SECOND INSERT
	$statement = 'INSERT INTO creds VALUES (';
	if (!defined $$fdat{'paii'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'paii'} . '\', ' ;
		$statement .= $tmp;
	}
	if (!defined $$fdat{'AAA'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'AAA'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'AAA_star_rating'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'AAA_star_rating'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'iia'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'iaa'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'aaaii'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'aaaii'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'friend_of_aaaii'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'friend_of_aaaii'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'member_state'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'member_state'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'state_assoc_name'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'state_assoc_name'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'web_address_of_state_association'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'web_address_of_state_association'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'paaac'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'paaac'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'paaac_inspected'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'paaac_inspected'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'inspection_frequency'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'inspection_frequency'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'fully_licensed'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'fully_licensed'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'fully_insured'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'fully_insured'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'cleanliness_safety_hospitality'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'cleanliness_safety_hospitality'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'area_association_member'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'area_association_member'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'area_assoc_name'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'area_assoc_name'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'web_address_of_area_association'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'web_address_of_area_association'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'not_a_member_of_a_national_state_or_area_association'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'not_a_member_of_a_national_state_or_area_association'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $last_id){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $last_id . '\')';
		$statement .= $tmp;
	}
	print STDERR "$statement \n";
	$obj->insert_statement($statement);
			
#THIRD DAMN STATEMENT
	
	$statement = 'INSERT INTO inn_description  VALUES (';
	if (!defined $$fdat{'room_rate_begin'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'room_rate_begin'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'room_rate_ending'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'room_rate_ending'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'peak_begins'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'peak_begins'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'peak_ends'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'peak_ends'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'slow_begins'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'slow_begins'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'slow_ends'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'slow_ends'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'gay_lesbian_friendly'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'gay_lesbian_friendly'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'pet_friendly'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'pet_friendly'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'visa'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'visa'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'master_card'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'master_card'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Amex'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Amex'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Discover'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Discover'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Diners'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Diners'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'English'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'English'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Spanish'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Spanish'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'German'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'German'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'French'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'French'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Portugese'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Portugese'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Italian'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Italian'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Japanese'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Japanese'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Korean'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Korean'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Mandarin'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Mandarin'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'Vietnamese'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'Vietnamese'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'telephone_ans_from'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'telephone_ans_from'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'telephone_ans_am_pm_from'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'telephone_ans_am_pm_from'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'telephone_ans_until'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'telephone_ans_am_pm_until'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'telephone_ans_until'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'telephone_ans_am_pm_until'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'bed_size_king'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'bed_size_king'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'bed_size_queen'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'bed_size_queen'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'bed_size_twin'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'bed_size_twin'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'total_accomodations_number'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'total_accomodations_number'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'all_full_private_bath'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'all_full_private_bath'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'guest_rooms_number'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'guest_rooms_number'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'guest_rooms_with_whirlpool_tubs'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'guest_rooms_with_whirlpool_tubs'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'guest_suites_number'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'guest_suites_number'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'deluxe_guest_suites_number'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'deluxe_guest_suites_number'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'guest_rooms_with_fireplaces_number'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'guest_rooms_with_fireplaces_number'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'connecting_rooms'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'connecting_rooms'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'children_age'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'children_age'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'available_cots'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'available_cots'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'available_cribs'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'available_cribs'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'des_general_property'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'des_general_property'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'smoke_free'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'smoke_free'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'description_where_smoking_is_allowed'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'description_where_smoking_is_allowed'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'physically_challenged'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'physically_challenged'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $$fdat{'description_physically_challenged'}){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $$fdat{'description_physically_challenged'} . '\', ';
		$statement .= $tmp;
	}
	if (!defined $last_id){
		$statement .= 'NULL, ';
	}else{
		$tmp = '\'' . $last_id . '\') ';
		$statement .= $tmp;
	}
	print STDOUT "$statement\n";
	return $last_id;
}
1;

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: More on Sessions not active in 2.0b7

Posted by Gerald Richter <ri...@ecos.de>.
> I made some more adjustments after this was sent and I can't seem to
> reproduce the error.  Based on your suggestion above on setting the
> dbgSession debug param I did see the sessions were being
> executed/created.  My problem was that I was doing a "bad thing" and
> accessing "$HTML::Embperl::udat{key}" inside of my packages, I had
> changed this to "$Embperl::udat{key}" after installing Embperl 2.0b7 and
>   used perl-status (Apache::Status) to examine the variables for Embperl
> to confirm the varibable as still available. Even though it was in the
> Hahes list it doesn't seem to be accessible in that manner.  So now I am
> going to pass the session hash to each sub/method because that is the
> "correct" way since it makes the code less likely to break as this case
> has proven.
>
> I still would like to know if the ability to access the udat hash is
> still available or if it is infact "protected".
>

Accessing $Embperl::udat doesn't work anymore, because since b6 you can have
multiple session setups, not only one as before, so there was a need for me
the change things. At the Moment you are able to access the current %udat
values with

$Embperl::req -> app -> user_hash

which will return a reference to %udat. But be aware that names may sligthly
change until I have documented all the new methods. I plan to document all
these things in one of the next releases and then of course you can rely on
it.

>
> While composing I went to look at the perl-status again to verify my
> Embperl::udat entry.  Below is that happened when I queried Embperl from
> the list.
>

The problem here is, that you are accessing some variables which are tied to
the C part, but only valid during an Embperl request.

Gerald

P.S. Let's keep the discussion on the list. Others may have the same
problem....

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: More on Sessions not active in 2.0b7

Posted by Gerald Richter <ri...@ecos.de>.
> I have been trying various configurations, and noticed I am getting a
> Seg fault in the the log file so I ran httpd through gdb and got this:
> Program received signal SIGSEGV, Segmentation fault.
> 0x4040b5a6 in EMBPERL2_GetLineNo () from
> /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Embperl/Embperl.so
>

Aaron,

could you please rerun this and when the segfault occurs enter the BT
command and send me the output?

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: More on Sessions not active in 2.0b7

Posted by Aaron Johnson <so...@gina.net>.
I have been trying various configurations, and noticed I am getting a 
Seg fault in the the log file so I ran httpd through gdb and got this:
Program received signal SIGSEGV, Segmentation fault.
0x4040b5a6 in EMBPERL2_GetLineNo () from 
/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Embperl/Embperl.so

I am on Mandrake 8.1 with kernel 2.4.18

Apache/1.3.24 (Unix) Embperl/2.0b7 mod_perl/1.26

Perl v5.6.1

Aaron Johnson wrote:

> In rereading my last post I realized that I didn't give much informaiton 
> to go on.  I am upgrading from HTML::Embperl 2.0b5 to 2.0b7 Embperl.  My 
> setup was working correctly with Apache::SessionX prior to the upgrade 
> attempt.  I have double checked the conf file and no SESSION values are 
> set there that might conflict with SessionX.
> 
> I am able to process pages correctly that contain Embperl code, it is 
> only an issue with retaining the session data.
> 
> Here is my conf file settings for the server and directory in question:
> 
> EMBPERL_DEBUG 13549
> EMBPERL_LOG /embperl/log
> EMBPERL_ESCMODE 0
> EMBPERL_OPTIONS 16
> 
> AddType text/html .epl
> 
> <Location /my_app>
>     EMBPERL_APPNAME my_app
>     EMBPERL_URIMATCH "(\.htm|\.epl)$"
>     EMBPERL_COOKIE_EXPIRES +30m
>     EMBPERL_COOKIE_PATH /my_app
>     SetHandler perl-script
>     PerlHandler Embperl
>     Options ExecCGI
> </Location>
> 
> Aaron Johnson
> 
> 
> ---------------------------------------------------------------------
> 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