Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP xmlreader 404 error

Tags:

php

xmlreader

I'm running an XMLREADER to pull in various XML files and then parse it with SimpleXML in PHP5. This is working but for a particular file (around 4.5MB file size) it results in

Warning: XMLReader::open(http://www.blah.com/adm/feeds/The XML File.xml) [xmlreader.open]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /public_html/adm/cache/parsers/parser.php on line 15

But when I click ont the url listed the file is there. I've tested this on a similar dedicated server to mine and the problem doesn't happen.

Any ideas what might be going wrong? In summary the file is there but XMLREADER reports a 404 trying to open it.

like image 606
bertster Avatar asked May 30 '26 03:05

bertster


1 Answers

If this helps anyone - it was the filename that was the problem, it had a space in it which the host I'm on didn't like. Never had that problem on other hosts! Live an learn.

Brett

like image 134
bertster Avatar answered Jun 01 '26 16:06

bertster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!