Re: Problem importing subs, please help..

2003-01-01 Thread Gerald Richter
If you are using Embper 1.3.x, the call to the sub must not be in the same
block as the import:

>
> [-
>
> Execute ({inputfile => 'tables.epl', import=>1});
>

-]
-[


> &loadthecolors;
>
> $r = shift ;
> $option = $r -> {option} ;
>
> -]
>

Gerald


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

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

- Original Message -


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: subroutine not found in the same file...please help

2003-01-01 Thread Gerald Richter
>
> and under this i have the subroutines:
>

1.3.x requires you to have the sub's defined, before you call them. So move
them to the top and it will work (in 2.0 it doesn't matter if where the subs
are defined)

Gerald


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: EMBPERL_COOKIE_EXPIRES

2003-01-01 Thread Gerald Richter


> I believe Gerald said it does not as of yet (The last Dev of v.2 didn't at
> least)..You need to stick a date in there manually :-(
>

That's true, only absolute times works for now. I hopefully can implement
relative times soon

Gerald


> Justin
>
> > -Original Message-
> > From: Jaak [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, December 29, 2002 2:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: EMBPERL_COOKIE_EXPIRES
> >
> >
> > Hi!
> >
> > Does Embperl 2 (cvs) version support
> > EMBPERL_COOKIE_EXPIRES with relative datetime?
> >
> > Documentation says it does, but I can't get it working.
> >
> > thanks in advance.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AddOutputFilter EMBPERL ???

2003-01-01 Thread Gerald Richter

>How do I add Embperl as an Output Filter?

The only way it works for now is calling your PHP page from Embperl, like

[- Execute ({subreq => '/uri/path/to/foo.php'}) -]

So you can use Embperl::Object:

Embperl_Object_Base base.epl
Embperl_Appname phpfilter

and in base.epl you write

[-
$r = shift ;
Execute ({subreq => $r -> param -> unparsed_uri})
-]

Additonaly you should tell Embperl not to read in the POSTed form data,
other wise PHP will not see them by setting

optDisableFormData


Gerald



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Loading a file from a different directory tree usin execute

2003-01-01 Thread Gerald Richter
> 
> You can pass relative paths to  Execute, like '../some/other/page.epl'.
> If you are using EmbperlObject you can use the following directive in
> your httpd.conf to add the directories you want to be searched:
> 
> PerlSetEnv EMBPERL_OBJECT_ADDPATH path1;path2;path3
> 

You can use the path search also without EMbperlObject, by setting

PerlSetEnv EMBPERL_PATH path1;path2;path3

Gerald


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: use and do

2003-01-01 Thread Gerald Richter

>If i use 'do' in [! !], always have overhead,

If you use it inside of [! !] it will only executed the first time the page
is executed

> or i can use 'use' for get performance ?

YOu can use use, but the used file should contain a package name, otherwise
you will get trouble, see also

http://perl.apache.org/embperl/pod/doc/doc13/pod/Faq.-page-3-.htm

Gerald



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

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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Posting data when redirecting to a page

2003-01-01 Thread Gerald Richter
>
> I have a beginner's question.
>
> I'm trying to redirect the program flow to another .htm page using
> $http_headers_out{Location} but I also want to pass a message ($msg) to
the
> new page using POST method.
>
> [-
> $msg = "Error saving data #53: really really long explanation";
> $http_headers_out{Location}="acc_admin.htm";
> exit;
> -]
>
> What's the best way to do that?
>

You can't do a POST request as an redirect, but you can do a GET to pass the
data
[-
$r = shift ;
$http_headers_out{Location}="acc_admin.htm?msg=" . $r -> Escape ($msg, 2) ;

The Escape makes sure you don't get trouble with any special chars inside
the url

Gerald


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

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Error in DBI->connect (Oracle)

2003-01-01 Thread Gerald Richter

>[Tue Dec 31 11:48:46 2002] [notice] child pid 6555 exit signal Segmentation
Fault (11), possible coredump in /home/ederson/apachelocal

This maybe because of some version mismatch of your libs. Maybe they are not
compiled for the same Perl or with different compiler setting. Or mod_perl
is compiled for a different Perl than you DBD::Oracle. You may try to
reinstall mod_perl and DBI/DBD. You may also try if it works outside of
mod_perl. SInce this problem is not Embperl related (as far as I can tell),
it's better to ask on the DBI or mod_perl mailing list

Gerald


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: relative path is not working to load files

2003-01-01 Thread Gerald Richter
>
> I have tried using relative path but still does not work.
>

Relative path work. In case they don't you may put a ./ in front of your
path e.g. ./../includes/sub.epl, but this shouldn't be necessary in normal
cases.

The paths you describe and the error messages, doesn't fit together. PLease
describe more detailed what you are doing

Gerald


> My problem is:
> > Do you know how to load a file with execute from a different directory
tree?
> >
> > i have a folder modules/Recommend/recommend.epl
> >
> > and other folder includes/subs.epl
> >
> > folders subs and modules are at the same level.
> >
> >
> > if i try to Execute ('../subs.epl') from recommend.epl
> >
> > I get the message :
> > [2507]ERR: 30: recommend.epl(20): Not found includes/subs.epl
> >
> > Do you know how can i load the file subs.epl without copy it to
> > modules/Recommend?
>
> Somebody knows other way to load the file?
>
> Thank you in advance for you help
>
> Carlos Kassab
>
> ___
> No banners. No pop-ups. No kidding.
> Introducing My Way - http://www.myway.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: relative path is not working to load files

2003-01-01 Thread Gerald Richter
>
> I have tried using relative path but still does not work.
>

Relative path work. In case they don't you may put a ./ in front of your
path e.g. ./../includes/sub.epl, but this shouldn't be necessary in normal
cases.

The paths you describe and the error messages, doesn't fit together. PLease
describe more detailed what you are doing

Gerald


> My problem is:
> > Do you know how to load a file with execute from a different directory
tree?
> >
> > i have a folder modules/Recommend/recommend.epl
> >
> > and other folder includes/subs.epl
> >
> > folders subs and modules are at the same level.
> >
> >
> > if i try to Execute ('../subs.epl') from recommend.epl
> >
> > I get the message :
> > [2507]ERR: 30: recommend.epl(20): Not found includes/subs.epl
> >
> > Do you know how can i load the file subs.epl without copy it to
> > modules/Recommend?
>
> Somebody knows other way to load the file?
>
> Thank you in advance for you help
>
> Carlos Kassab
>
> ___
> No banners. No pop-ups. No kidding.
> Introducing My Way - http://www.myway.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Posting data when redirecting to a page

2003-01-01 Thread Hoenie Luk
Thanks for your response.

Unfortunately, the $msg I wanted to pass is very long. If I use the GET 
method, the URL will look very messy and it may even not work because of 
the length.

I did figure out I can do the same redirecting function with Execute:

[-
$msg = "WARNING: no action was taken and much more..";
Execute('acc_admin.htm',$msg);
exit;
-]

In this way, the flow is redirected to 'acc_admin.htm' and $msg is passed 
to the new page. But there is one problem: The URL on the top part of the 
browser remains that of the calling page, not the redirected page 
(acc_admin.htm). That looks quite confusing to me. Is there some way to fix 
the URL displayed to be the redirected page?

Thanks.

...Hoenie

At 09:18 PM 1/1/2003 +0100, you wrote:
>
> I have a beginner's question.
>
> I'm trying to redirect the program flow to another .htm page using
> $http_headers_out{Location} but I also want to pass a message ($msg) to
the
> new page using POST method.
>
> [-
> $msg = "Error saving data #53: really really long explanation";
> $http_headers_out{Location}="acc_admin.htm";
> exit;
> -]
>
> What's the best way to do that?
>

You can't do a POST request as an redirect, but you can do a GET to pass the
data
[-
$r = shift ;
$http_headers_out{Location}="acc_admin.htm?msg=" . $r -> Escape ($msg, 2) ;

The Escape makes sure you don't get trouble with any special chars inside
the url

Gerald


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

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem importing subs, please help..

2003-01-01 Thread Carlos Kassab
Thank you, it worked, i put the subs in other file.

Carlos Kassab

El mié, 01-01-2003 a las 13:43, Gerald Richter escribió:
> If you are using Embper 1.3.x, the call to the sub must not be in the same
> block as the import:
> 
> >
> > [-
> >
> > Execute ({inputfile => 'tables.epl', import=>1});
> >
> 
> -]
> -[
> 
> 
> > &loadthecolors;
> >
> > $r = shift ;
> > $option = $r -> {option} ;
> >
> > -]
> >
> 
> Gerald
> 
> 
> -
> Gerald Richterecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
> 
> Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
> WWW:http://www.ecos.de  Fax:  +49 6133 925152
> -
> 
> - Original Message -



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




AW: AddOutputFilter EMBPERL ???

2003-01-01 Thread Jörg Kütemeier
Hi,

I tried it out with this:


  SetHandler  perl-script
  PerlHandler Embperl
  Options ExecCGI

#  Order allow,deny
#  Deny From all


AddType application/x-httpd-php .php


  SetHandler  perl-script
  PerlHandler Embperl
  Options ExecCGI


AddType application/x-httpd-php .php


A test.epl:




 [- $test="Hallo" -][+ $test +]

[$ syntax EmbperlBlocks $]

[-
$r = shift ;
Execute ({subreq => '/test.php'})
-]




a test.php:




Test PHP





But it ended in:

Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.


[76195]ERR: 675407878: test.php(1): Error (no description) 675407878
(status=200) /test.php  

Embperl/2.0b9_dev-3 Apache/2.0.43 (Unix) mod_perl/1.99_08-dev
Perl/v5.6.1 PHP/4.2.3 mod_ssl/2.0.43 OpenSSL/0.9.6g [Thu Jan 2 05:13:39
2003]


By the way...

Do you think a


  SetHandler perl-script
  PerlHandler Embperl::Object
  Options ExecCGI


could be set up to work

Jörg


P.S.
Please save me some lookup time... ;-) where to place
optDisableFormData?

-

wolf-systems IT-Services Inh. Jörg Kütemeier
http://www.wolf-systems.net


-Ursprüngliche Nachricht-
Von: Gerald Richter [mailto:[EMAIL PROTECTED]] 
Gesendet: Mittwoch, 1. Januar 2003 21:05
An: Jörg Kütemeier; [EMAIL PROTECTED]
Betreff: Re: AddOutputFilter EMBPERL ???


>How do I add Embperl as an Output Filter?

The only way it works for now is calling your PHP page from Embperl,
like

[- Execute ({subreq => '/uri/path/to/foo.php'}) -]

So you can use Embperl::Object:

Embperl_Object_Base base.epl
Embperl_Appname phpfilter

and in base.epl you write

[-
$r = shift ;
Execute ({subreq => $r -> param -> unparsed_uri})
-]

Additonaly you should tell Embperl not to read in the POSTed form data,
other wise PHP will not see them by setting

optDisableFormData


Gerald





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]