Skip to content

PHP error "failed to open stream" or "No such file" Print

  • php, include, require, path
  • 4

A PHP file is trying to load another file that is not where it expects.

  • Check the file exists and the name matches exactly. Names are case-sensitive.
  • Use paths relative to the current file, such as __DIR__ . '/includes/config.php', rather than paths from your old host.
  • After moving from another host, search the code for the old host's folder paths (e.g. /home/username/public_html) and update them. Your website is in httpdocs.

The full error, with the file and line, is in your logs.


Was this answer helpful?

« Back