Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: SAX and PDL probs

by InfiniteSilence (Curate)
on Jan 24, 2012 at 17:54 UTC ( #949737=note: print w/ replies, xml ) Need Help??


in reply to SAX and PDL probs

For problem #1 I recommend you include how the code you are calling uses the encoding_detect() function of XML::SAX::PurePerl. If you read the code you'll see that the warning you are seeing appears at the end of the function if none of the conditions it is looking for are satisfied.

For #2 I don't see any proj_init function:

pdl> help pj_init No PDL docs for 'pj_init'. Using 'whatis'. (Try 'apropos pj_init'?) 'pj_init'
So I guess you'll need to show some more code for that one as well.

Celebrate Intellectual Diversity


Comment on Re: SAX and PDL probs
Select or Download Code
Re^2: SAX and PDL probs
by martinm (Novice) on Jan 25, 2012 at 09:52 UTC
    Cheers, this is the top of the script (/avprog/bin/alerting_map_all.pl) that is run:
    #!/usr/bin/perl use strict; use warnings; use Getopt::Long; use Avbrief::AlertingMap; use Avbrief::ProcControl; use Avbrief::DataLayer::CDBI::map_mainframe; use File::Basename; print "start of script"; die "this script must be run as 'abl'\n" unless ('abl' eq getpwuid($<) +); my $logpath = "/var/log/avbrief/".basename($0).".log"; my $timeout = (10 * 60);
    When it's run, I get the errors before the output of the print.
    # sudo -u abl /avprog/bin/alerting_map_all.pl Unable to recognise encoding of this document at /usr/share/perl5/XML/ +SAX/PurePerl/EncodingDetect.pm line 100. Undefined subroutine &Proj::proj_init_plus called at /usr/share/perl5/ +Avbrief/Projection.pm line 89. . . . Undefined subroutine &Proj::proj_init_plus called at /usr/share/perl5/ +Avbrief/Projection.pm line 89. start of script
    Which to me looks like the XML issue is not a script problem but a config/environment problem. Really confused now!!

    In /usr/lib/perl5/PDL/GIS/Proj.pm is the following comment that lead to mention of proj_init_plus
    =head2 1.10 (23 April 2003) Judd Taylor - Changed from using the proj_init() type API in projects.h to th +e - proj_init_plus() API in proj_api.h. The old one was not that st +able...
    /usr/include/proj_api.h
    projPJ pj_init(int, char **); projPJ pj_init_plus(const char *)
Re^2: SAX and PDL probs
by martinm (Novice) on Jan 25, 2012 at 18:30 UTC
    OK, as stopping or starting apache2 gives the XML error, I tried running startup.pl. And got:
    perl /etc/apache2/startup.pl Unable to recognise encoding of this document at /usr/share/perl5/XML/ +SAX/PurePerl/EncodingDetect.pm line 100. Unable to recognise encoding of this document at /usr/share/perl5/XML/ +SAX/PurePerl/EncodingDetect.pm line 100. Apache.pm was not loaded at /etc/apache2/startup.pl line 12 couldn't connect to dbi:Pg:dbname=xxxxx;host=localhost at /etc/apache2 +/startup.pl line 12.
    Reduced startup.pl to
    #!/usr/bin/env perl use strict; use warnings; use lib '/usr/share/perl/5.10.0'; use ModPerl::Registry; # use Apache::Registry; use Apache::DBI; use Apache::AuthDBI; Apache::DBI->connect_on_init('dbi:Pg:dbname=xxxxx;host=localhost', und +ef, undef, { RaiseError => 1, AutoCommit => 1 }) or die "couldn't connect"; 1;
    and get
    perl /etc/apache2/startup.pl Apache.pm was not loaded at /etc/apache2/startup.pl line 13 couldn't connect at /etc/apache2/startup.pl line 13.
    I'm closer to fixing the XML issue, but this one has me stumped! Let me know if this is veering off topic!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://949737]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2014-11-29 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (204 votes), past polls