perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Baetzler <tho...@baetzler.de>
Subject What's going on here?
Date Fri, 04 Feb 2005 19:49:35 GMT
Hi,

I have this totally weird problem with using Cyrus::SIEVE::managesieve
(part of the Cyrus messagestore) from an Embperl page. Maybe somebody
can help me understand what's going on. 

I'm running this on a current Debian "Sarge" (aka "testing") system with 
these relevant packages installed:

libapache-mod-perl          1.29.0.2-17
libapache-mod-ssl           2.8.22-1  
apache-common               1.3.33-3 
libhtml-embperl-perl        1.3.6-2 
cyrus21-admin               2.1.17-3

My test case code does nothing fancy - just connect and login to the
sieve daemon ("timsieved") running on localhost. Here it is:

---8<---
<html>
<head>
</head>
<body>
[!
  use Cyrus::SIEVE::managesieve;

  %cfg = ();

  sub prompt {  
    my( $key, $prompt ) = @_;
    return $cfg{ $key }; 
  }

  sub login_sieve {

    $cfg{'username'} = shift;
    $cfg{'password'} = shift;
    $cfg{'authname'} = $cfg{'username'};

    return sieve_get_handle("localhost", "prompt", "prompt", "prompt",
"prompt" );
  }

!]
[-
  $sieve = login_sieve( 'valid username','valid password' );
-]
[$ if $sieve $]
<p>Login successful</p>
[$ else $]
<p>Login not successful</p>
[$ endif $]
</body>
---8<---

The script runs just fine as "pure Perl" with warnings (and strict)
turned on. embpexec.pl runs it without a complaint - even when I change
user to the webserver user. But when I try to open the code URL with a
browser, it just dies. Not like die(), mind you, but sudden and mute death.

When I send the request manually using telnet, I don't even see an error
code from the server, but just a "Connection closed" message from telnet. 

The Embperl debug log doesn't help much, either. After a request, the
last few lines are:

[25681]SVs:  17049
[25681]EVAL< 
  $obj = login_sieve( 'valid username','valid password' );

I'd appreciate any and all ideas you might have. 

TIA & have a nice weekend,
Thomas
-- 
Thomas Bätzler, Thomas@Baetzler.de or Thomas.Baetzler@t-online.de (alternate)
My homepage: http://baetzler.de/  My Humor Archive: http://baetzler.de/humor/

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


Mime
View raw message