weird problem..the exact xml work in one host and not working in another...
- by Ofear
hi all!
i search alot for this but can't find an aswer...
I have made a working xml parser using php.
till today i host my files on a free web host, and everything works just fine.
today i got access to my college server and i host my files there.
now for some reason.. i can't make the parser work as i was in the free host...
look on those files please:
working site:
xml file:
[http://ofear.onlinewebshop.net/asce/calendar.xml]
working parser is this: [http://ofear.onlinewebshop.net/asce/calendar.php]
(the lower table is the xml,it's hebrew)
not working site:
xml file: [http://apps.sce.ac.il/agoda/calendar.xml]
not working parser is this: [http://apps.sce.ac.il/agoda/calendar.php]
anyone have idea why it's not working.. those are the same files and they should work.
maybe it a server problem?
calendar.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<events>
<record>
<event>??? ???? ????? ???? ???</event>
<eventDate>30/12/2010</eventDate>
<desc>?????? ?? ????</desc>
</record>
<record>
<event>??? ???? ??????? - 2 : ???? ??? ???? ??????</event>
<eventDate>22/12/2010</eventDate>
<desc>????? ???? ??????? ?????? ??? ???? ??????? ?????? ????? ?????? ?? ??? ???? ??????? 2 ??????? ????? ???????? 22-23 ?????? 2010. ???? ????? ???? ????? "?????? ????"</desc>
</record>
<record>
<event>????? ???? ?????? ?????? - ?? ????</event>
<eventDate>5/12/2010</eventDate>
<desc>??? ????? 17:30-20:45</desc>
</record>
</events>
parser:
<?php
$doc = new DOMDocument();
$doc->load( 'calendar.xml' );
$events = $doc->getElementsByTagName( "record" );
foreach( $events as $record )
{
$events = $record->getElementsByTagName( "event" );
$event = $events->item(0)->nodeValue;
$eventDates= $record->getElementsByTagName( "eventDate" );
$eventDate= $eventDates->item(0)->nodeValue;
$descs = $record->getElementsByTagName( "desc" );
$desc = $descs->item(0)->nodeValue;
echo "<tr><td>$event</td><td>$eventDate</td><td>$desc</td></tr>";
}
?>
after a little debugging i saw that it's stop here:
$doc = new DOMDocument();
and it's not doing anything after that. i think that the line above is the cos