You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Dima Kats <di...@e4x.com> on 2001/10/11 17:25:12 UTC

Xerces-c 1.3 DOMParser.parse(...) fails under Apache

Hello,

 I've been working with xerces-c_1.3 on Unix/Linux/Win32 platforms for a
year already and it works quite ok. The problem appeared suddenly with
RedHat 6.2. I have perl XS modules that use xerces, the perl scripts
themselves are CGI scripts, which run under Apache web server.

 When I run the scripts from the command line everything is ok, when I run
them through Apache - they fail. My investigation of the problem shows that
the DOMParser.parse(...) function fails, my code is as follows:

-------------------------------------------------
string xmlContent = "<?xml version=\"1.0\"?><CURRENCYCODES><CURRENCYCODE
code=\"AFA\" desc=\"Afghani\" /></CURRENCYCODES>";
MemBufInputSource *mbInputSource = new MemBufInputSource((const
XMLByte*)xmlContent.c_str(),xmlContent.length()*sizeof(XMLByte),
"AnswerBufferID", false);
if (!mbInputSource)
{
	// ...
}
m_pParser->parse(*mbInputSource);
delete mbInputSource;
-------------------------------------------------

 It looks like the problem is with permissions when the script is activated
by Apache rather than from the command line.

 I don't think the problem is with MemBufInputSource, cause when I changed
the code and called DOMParser.parse(...) with xml file name as a parameter,
it failed also.

 I believe someone has already seen the problem, please help.

 Thanks,

Dima



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org