FAQ
I just noticed that when there is an error in my code, I am not getting
any useful information about where the error occurs. All I get is this:

[21419]ERR: 24: Error in Perl code: Compilation error

I know I used to get more specific line information about where the
problem was. Is there something I can do to re-enable this?

This is using Apache, mod_perl and Embperl all built from source on
Debian Wheezy AMD64:

Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
mod_perl/2.0.5 Perl/v5.14.2

Any ideas?

Thanks!

Neil

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

Search Discussions

  • Gerald Richter at May 30, 2012 at 5:03 am
    Hi Neil,

    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald
    -----Original Message-----
    From: Neil Gunton
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org
    Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am not getting any
    useful information about where the error occurs. All I get is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about where the problem
    was. Is there something I can do to re-enable this?

    This is using Apache, mod_perl and Embperl all built from source on Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ---------------------------------------------------------------------
    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
  • Neil Gunton at May 31, 2012 at 11:07 pm
    Hi Gerald,

    Thanks for getting back. Basically I can have something as simple as
    this, one line of code in index.html:

    [- $x = 1; -]

    Which simply produces the error:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, neil@nilspace.com and inform
    them of the time the error occurred, and anything you might have done
    that may have caused the error.

    [12542]ERR: 24: Error in Perl code: Compilation error

    Apache Embperl 2.5.0_1 [Thu May 31 15:37:53 2012]

    Now obviously this isn't the only code being executed here, there is
    also base.epl and a whole bunch of other stuff that gets initialized on
    my website, but that one line is all it takes to make the error
    manifest. I guess I must have 'strict' defined somewhere, because the
    above error is just a missing 'my' (if I put 'my' then the error goes
    away). The Embperl-specific config in my httpd_perl.conf is as follows:

    EMBPERL_DEBUG 0
    EMBPERL_ESCMODE 0
    EMBPERL_OPTIONS 16
    EMBPERL_MAILHOST spidey.nilspace.com
    EMBPERL_OBJECT_BASE base.epl
    EMBPERL_OBJECT_FALLBACK /www/errors/404.html
    EMBPERL_SESSION_HANDLER_CLASS no
    EMBPERL_LOG /tmp/embperl.log

    There's a lot of other stuff going on here, startup.pl etc, but maybe
    there is something fundamental in EMBPERL_DEBUG or EMBPERL_OPTIONS that
    could be causing this (or a different setting that might shed light on
    what's happening)? Let me know...

    Thanks again,

    Neil

    richter@ecos.de wrote:
    Hi Neil,

    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald
    -----Original Message-----
    From: Neil Gunton
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org
    Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am not getting any
    useful information about where the error occurs. All I get is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about where the problem
    was. Is there something I can do to re-enable this?

    This is using Apache, mod_perl and Embperl all built from source on Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ---------------------------------------------------------------------
    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
  • Neil Gunton at Jun 1, 2012 at 1:35 am
    Ok, this is weird. When I try executing the same file now, just the way
    it was before (without your suggestion), now it doesn't give the error.
    I have tried restarting apache, clearing both the browser and apache
    caches, but it works every time. Bizarre. I'll wait a bit and see if I
    can reproduce it again.

    In any case, thanks for the suggestion - if I can get back to reliably
    reproducing the error, then I will give it a try.

    Neil

    Jose Fonseca wrote:
    Does adding [$ syntax EmbperlBlocks $] to that source file fix it?


    On Thu, May 31, 2012 at 8:06 PM, Neil Gunton wrote:

    Hi Gerald,

    Thanks for getting back. Basically I can have something as simple as
    this, one line of code in index.html:

    [- $x = 1; -]

    Which simply produces the error:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, neil@nilspace.com
    and inform them of the time the error
    occurred, and anything you might have done that may have caused the
    error.

    [12542]ERR: 24: Error in Perl code: Compilation error

    Apache Embperl 2.5.0_1 [Thu May 31 15:37:53 2012]

    Now obviously this isn't the only code being executed here, there is
    also base.epl and a whole bunch of other stuff that gets initialized
    on my website, but that one line is all it takes to make the error
    manifest. I guess I must have 'strict' defined somewhere, because
    the above error is just a missing 'my' (if I put 'my' then the error
    goes away). The Embperl-specific config in my httpd_perl.conf is as
    follows:

    EMBPERL_DEBUG 0
    EMBPERL_ESCMODE 0
    EMBPERL_OPTIONS 16
    EMBPERL_MAILHOST spidey.nilspace.com <http://spidey.nilspace.com>
    EMBPERL_OBJECT_BASE base.epl
    EMBPERL_OBJECT_FALLBACK /www/errors/404.html
    EMBPERL_SESSION_HANDLER_CLASS no
    EMBPERL_LOG /tmp/embperl.log

    There's a lot of other stuff going on here, startup.pl
    <http://startup.pl> etc, but maybe there is something fundamental in
    EMBPERL_DEBUG or EMBPERL_OPTIONS that could be causing this (or a
    different setting that might shed light on what's happening)? Let me
    know...

    Thanks again,

    Neil


    richter@ecos.de wrote:

    Hi Neil,

    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald

    -----Original Message-----
    From: Neil Gunton [mailto:neil@nilspace.com
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am
    not getting any
    useful information about where the error occurs. All I get
    is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about
    where the problem
    was. Is there something I can do to re-enable this?

    This is using Apache, mod_perl and Embperl all built from
    source on Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22
    OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ------------------------------__------------------------------__---------
    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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • Neil Gunton at Jun 6, 2012 at 5:30 am
    Ok, here is a simple test case. File index.html contains just the following:

    [-
    use strict;
    $x = 1;
    -]

    Produces:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, neil@nilspace.com and inform
    them of the time the error occurred, and anything you might have done
    that may have caused the error.

    [15813]ERR: 24: Error in Perl code: Compilation error

    Apache Embperl 2.5.0_1 [Tue Jun 5 22:27:42 2012]

    Once again, this is using Debian Wheezy, Apache/2.2.22 (Unix)
    Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c mod_perl/2.0.5 Perl/v5.14.2

    Thanks,

    Neil

    richter@ecos.de wrote:
    Hi Neil,

    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald
    -----Original Message-----
    From: Neil Gunton
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org
    Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am not getting any
    useful information about where the error occurs. All I get is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about where the problem
    was. Is there something I can do to re-enable this?

    This is using Apache, mod_perl and Embperl all built from source on Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ---------------------------------------------------------------------
    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
  • Neil Gunton at Jun 29, 2012 at 1:18 am
    Ok, FYI I am still getting some strange behavior with reporting of
    compilation errors. However, it's quite difficult to pin down a minimal
    case that gives the same result that I get with more complex code. At
    the same time, I get *no* error with something like this in my test.html:

    [-
    slkjdflksjdflkjsdkljfslkjf
    -]

    Shouldn't that give some type of error?

    This is getting quite frustrating, because if I do some major code
    changes in my dev environment, as I did today, and then run the code to
    test it, all I get is this 'Compilation error' without any line
    information and I have NO IDEA where the error is. I have to basically
    start doing stuff like chopping out code and then reinserting it to find
    out where the error starts appearing. Obviously with certain types of
    code (that do things in a database) this gets difficult quickly.

    Something in Embperl is not doing error reporting right. Is there
    anything I can do in tweaking Embperl settings to help give more
    information?

    As it stands, I'm starting to dread making big code changes, as I can be
    pretty sure that when I test it out, I'll be left with a big chunk of
    code to comb through for some error which I have no idea where or even
    what it is.

    Thanks!

    Neil

    Neil Gunton wrote:
    Ok, here is a simple test case. File index.html contains just the
    following:

    [-
    use strict;
    $x = 1;
    -]

    Produces:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, neil@nilspace.com and inform
    them of the time the error occurred, and anything you might have done
    that may have caused the error.

    [15813]ERR: 24: Error in Perl code: Compilation error

    Apache Embperl 2.5.0_1 [Tue Jun 5 22:27:42 2012]

    Once again, this is using Debian Wheezy, Apache/2.2.22 (Unix)
    Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c mod_perl/2.0.5 Perl/v5.14.2

    Thanks,

    Neil

    richter@ecos.de wrote:
    Hi Neil,

    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald
    -----Original Message-----
    From: Neil Gunton
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org
    Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am not
    getting any
    useful information about where the error occurs. All I get is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about where the
    problem
    was. Is there something I can do to re-enable this?

    This is using Apache, mod_perl and Embperl all built from source on
    Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ---------------------------------------------------------------------
    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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • Neil Gunton at Jun 29, 2012 at 1:28 am
    Actually, I said in my previous email that the error was hard to
    reproduce in its minimal version - but the one below does seem to do it.
    All I am getting with this example is 'Compilation error', no line or
    file information.

    This is using Embperl::Object, if that matters. Latest Embperl, perl
    5.14.2 on Debian Wheezy (testing) etc - all versions as before. Any ideas?

    Thanks,

    Neil

    Neil Gunton wrote:
    Ok, here is a simple test case. File index.html contains just the
    following:

    [-
    use strict;
    $x = 1;
    -]

    Produces:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, neil@nilspace.com and inform
    them of the time the error occurred, and anything you might have done
    that may have caused the error.

    [15813]ERR: 24: Error in Perl code: Compilation error

    Apache Embperl 2.5.0_1 [Tue Jun 5 22:27:42 2012]

    Once again, this is using Debian Wheezy, Apache/2.2.22 (Unix)
    Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c mod_perl/2.0.5 Perl/v5.14.2

    Thanks,

    Neil

    richter@ecos.de wrote:
    Hi Neil,

    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald
    -----Original Message-----
    From: Neil Gunton
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org
    Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am not
    getting any
    useful information about where the error occurs. All I get is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about where the
    problem
    was. Is there something I can do to re-enable this?

    This is using Apache, mod_perl and Embperl all built from source on
    Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ---------------------------------------------------------------------
    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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • Neil Gunton at Jun 29, 2012 at 1:58 am
    Another update: I tried downgrading Embperl to 2.4 just to see if it
    would be any different, but same result - only message is 'Compilation
    error'. So, something specific about the way Embperl interacts with Perl
    that changed with 5.14, presumably...

    Neil Gunton wrote:
    Actually, I said in my previous email that the error was hard to
    reproduce in its minimal version - but the one below does seem to do it.
    All I am getting with this example is 'Compilation error', no line or
    file information.

    This is using Embperl::Object, if that matters. Latest Embperl, perl
    5.14.2 on Debian Wheezy (testing) etc - all versions as before. Any ideas?

    Thanks,

    Neil

    Neil Gunton wrote:
    Ok, here is a simple test case. File index.html contains just the
    following:

    [-
    use strict;
    $x = 1;
    -]

    Produces:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, neil@nilspace.com and inform
    them of the time the error occurred, and anything you might have done
    that may have caused the error.

    [15813]ERR: 24: Error in Perl code: Compilation error

    Apache Embperl 2.5.0_1 [Tue Jun 5 22:27:42 2012]

    Once again, this is using Debian Wheezy, Apache/2.2.22 (Unix)
    Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c mod_perl/2.0.5 Perl/v5.14.2

    Thanks,

    Neil

    richter@ecos.de wrote:
    Hi Neil,

    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald
    -----Original Message-----
    From: Neil Gunton
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org
    Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am not
    getting any
    useful information about where the error occurs. All I get is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about where the
    problem
    was. Is there something I can do to re-enable this?

    This is using Apache, mod_perl and Embperl all built from source on
    Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ---------------------------------------------------------------------
    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

    ---------------------------------------------------------------------
    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
  • Carl Eklof at Jun 29, 2012 at 3:19 pm
    First, please let me say THANK YOU to Gerald and everyone who has worked on Embperl and contributed to the forum! I have been a long-time user of Embperl and appreciate everyone's contribution. For years, Embperl has provided the only sensible templating structure (as agreed upon in the other realms of jsp, asp, php, etc.)

    Second, the replacement I've found covers only the basic exec functionality with templates that look like:
    <htm>[* code *]variable: [+ $var +]</html>

    Ok, in case you are still interested....
    Given:
    As a long-time user of Emperl, we were using Embperl for all of our template needs, which is to say A LOT. However, we have found that unless we are building an entire website on top of Embperl, which uses caching, form processing, etc., that all we really need is the basic asp, jsp, php style template handling as in the above.

    Problem:
    Embperl has a ton of great features, but as such, it has also become a bit of a complex beast. We have hit some very hard to debug compilation and run-time bugs. It has also been non-trivial to train people to use it correctly and consistently.

    Solution:
    http://search.cpan.org/~taiy/Text-ScriptTemplate-0.08/ScriptTemplate.pm

    It is a one-file pure-perl package. We changed the delimiters to [* *], and ran a small script to convert the [+ +] tags to [*= +]. We may be a bit of a special case though because I enforced that every one only use those two delimiters.

    I'm happy to say that we still have a project that uses Embperl. However, we don't use it anymore if all we want is a template engine.


    I'm attaching the full implementation of our wrapper. We did some special things to get the specific behavior that we wanted.

    Thanks,

    -Carl





    ________________________________
    From: Neil Gunton <neil@nilspace.com>
    To: richter@ecos.de
    Cc: "embperl@perl.apache.org" <embperl@perl.apache.org>
    Sent: Wednesday, June 6, 2012 1:30 AM
    Subject: Re: Error reporting in Embperl 2.5.0_1

    Ok, here is a simple test case. File index.html contains just the following:

    [-
    use strict;
    $x = 1;
    -]

    Produces:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, neil@nilspace.com and inform
    them of the time the error occurred, and anything you might have done
    that may have caused the error.

    [15813]ERR: 24: Error in Perl code: Compilation error

    Apache Embperl 2.5.0_1 [Tue Jun 5 22:27:42 2012]

    Once again, this is using Debian Wheezy, Apache/2.2.22 (Unix)
    Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c mod_perl/2.0.5 Perl/v5.14.2

    Thanks,

    Neil

    richter@ecos.de wrote:
    Hi Neil,
    in my tests I got normal error messages like before.

    Do you have a few lines of code, that shows the problem?

    Gerald
    -----Original Message-----
    From: Neil Gunton
    Sent: Saturday, May 19, 2012 9:29 PM
    To: embperl@perl.apache.org
    Subject: Error reporting in Embperl 2.5.0_1

    I just noticed that when there is an error in my code, I am not getting any
    useful information about where the error occurs. All I get is this:

    [21419]ERR: 24: Error in Perl code: Compilation error

    I know I used to get more specific line information about where the problem
    was. Is there
    something I can do to re-enable this?
    This is using Apache, mod_perl and Embperl all built from source on Debian
    Wheezy AMD64:

    Apache/2.2.22 (Unix) Embperl/2.5.0_1 mod_ssl/2.2.22 OpenSSL/1.0.1c
    mod_perl/2.0.5 Perl/v5.14.2

    Any ideas?

    Thanks!

    Neil

    ---------------------------------------------------------------------
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedMay 19, '12 at 7:29p
activeJun 29, '12 at 3:19p
posts9
users3
websiteperl.apache.org

People

Translate

site design / logo © 2018 Grokbase