This topic is locked

Error: Cannot open XML data file

2/29/2008 1:57:20 PM
PHPRunner General questions
S
stevebrettler author

Im building my frirst project hosted on a windows server and have just uploaded all my projectfiles and get this error

Cannot open XML data file: include/errors.xml
Is this a file permission error? How do I address that on a windows server?
Thanks

J
Jane 3/3/2008

Hi,
thank you for pointing me to this bug.

To fix it open generated include/commonfunctions.php file and remove this code snippet:

$path_to_file = "include/errors.xml";

$myFile = new XMLParser($path_to_file);

$size = sizeof($myFile->data[0]['child'])-1;

for ($i=0; $i<=$size; $i++)

{

$keywords = $myFile->data[0]['child'][$i]['child'][1]['content'];
$keys = split(" ",$keywords);
for ($j=0; $j<sizeof($keys)-1; $j++)

$pos[$j] = strpos(strtoupper($errstr), strtoupper($keys[$j]));

$nullfound=false;

foreach($pos as $val)

if($val===false)

{

$nullfound=true;

break;

}

if(!$nullfound)

{

$solution = $myFile->data[0]['child'][$i]['child'][5]['content'];

}
}


Then re-upload your application and refresh page in the browser.