Welcome Guest, Not a member yet? Register   Sign In
file_get_contents causes a 404 error
#6

Thanks for the thoughts; quite agree this isn't yet production code!

So the print_r(error_get_last()); shows:

Quote:Message: file_get_contents(http://www.domain.com/storage/item/57d952d0a09d0): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
which is consistent with what I had seen before.

What I have noticed is that when I request http://www.domain.com/storage/item/57d952d0a09d0 in the browser, the page displays BUT in the apache access log it shows:

Quote:127.0.0.1 - - [16/Sep/2016:10:20:57 +0100] "GET /storage/item/57d952d0a09d0 HTTP/1.1" 404 4

In fact ALL page requests result in a 404 code in the access log!
Something to do with the URL handling in the framework I guess.

I suppose it is that 404 code that file_get_contents is receiving.
Reply


Messages In This Thread
RE: file_get_contents causes a 404 error - by gordski68 - 09-16-2016, 02:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB