When I validate my xml file against xsd with several validation tools, they all gives back positive result: validation successful.
But when do that in php with schemaValidate, validation breaks exactly after 60 seconds showing blank page. I'm trying to find some explanation for this:
$doc = new DOMDocument();
$doc->load('C:\a\xml.xml');
try{
$is_valid_xml = $doc->schemaValidate('http://xxxxxxx/schema.xsd');
if ($is_valid_xml == true) {
echo 'ok';
}else {
throw new Exception('Validation not successful!');
}
}catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "<br />";
} finally {
print_r(error_get_last());
}
When I use the above method on some other generic xml+xsd example it works fine. If I mess up that xml deliberately I get the result "Caught exception: Validation not succesfull!" and some error info, but with my real xml+xsd files (which are far more complicated) I get blank page.
Any idea why is that happening. This exact 60 sec seems like some session time out or something like that but I have looked in php.ini it is set to 1440 sec (session.gc_maxlifetime = 1440)...
No comments:
Post a Comment