Note that there are some explanatory texts on larger screens.

plurals
  1. POfile_get_contents - failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
    primarykey
    data
    text
    <p>I'm having some weird problems with file_get_contents after moving my site to a new domain. I had to set up a new domain and IP address (using Plesk) to get a new ssl certificate working. Now my file_get_contents calling a script on the same domain is giving me this:</p> <blockquote> <p>failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found</p> </blockquote> <p>If I call the same url using file_get_contents on another server it works fine, and if I call www.google.com from the server thats failing that works, so it only seems to be if I call a url on the same sever!</p> <p>I have a feeling it might have something to do with having two IPs with two different ssl certificates on the one server, when i file_get_contents / (index page) of the server from the server I get the plesk 'this is a new domain' page so its like apache isnt looking up the right virtual host when its called from its own sever.</p> <p>To clarify (hopefully!):</p> <p><strong>On the server hosting the domain:</strong></p> <pre><code>file_get_contents('https://mydomain.com?limit=4&amp;offset=0&amp;s_date=2012-02-05&amp;e_date=2012-03-13&amp;order=release_date&amp;dir=desc&amp;cid=12'); </code></pre> <p>gives "failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found"</p> <pre><code>file_get_contents('http://www.google.com'); </code></pre> <p>works correctly</p> <p><strong>On another server:</strong></p> <pre><code>file_get_contents('https://mydomain.com?limit=4&amp;offset=0&amp;s_date=2012-02-05&amp;e_date=2012-03-13&amp;order=release_date&amp;dir=desc&amp;cid=12'); </code></pre> <p>works fine.</p> <p>I have tried turning ssl off and I still get the same problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload