Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ranguard (1858)

  (email not shown publicly)

Journal of Ranguard (1858)

Tuesday February 25, 2003
04:17 AM

XML::LibXML - tracking the error

[ #10772 ]
XML Import system on staging server works fine - then goes intermittent, then stops completly.

Error message: "Can't coerce UNKNOWN to string in entersub at /usr/local/lib/perl/5.6.1/XML/ line 239"

Guess 1 - search google for answer - nothing

Guess 2 - the system which generates the XML is going wrong (has happened many times - nasty VB thing). - Wrong - can run the import on the development machine fine.

Guess 3 - hmm, the libxml2 library is a few versions different, role back to the same one that is on the development machine, still not working.

Several hours of trying stuff at random later - nothing, then I notice that we have a problem with a CGI script on the staging server - in fact it's spawning child processes and reaching MaxClients then freezing apache.

Then the answer hits me - the XML has ENTITY tags - which are found on the local web server (e.g. which ever server the import script is running). So if XML::LibXML is trying to parse the file and can't read the .ent files (as the web server isn't responding) then it dies with that - oh so helpful - error message!

An hour later - having written a 'hello world' script, that still takes the apache server down and stripped the config to the bones, I find that someone has both a 'ScriptAlias' and ProxyPass (with the ProxyPassReverse) set up for /cgi-bin/ - obviously you should never have both - but I wouldn't have expected it to cause some sort of spawning loop.

Anyway - removed the ProxyPass stuff restarted apache - it no longer hung - ran the import script - it worked fine - every time.

I wish the error had been clearer in the first place as it would have saved me half a day of work.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.