PHP Warning: Unknown: failed to open stream

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP Warning: Unknown: failed to open stream

Postby ralese » 27. November 2017 06:21

First of all, sorry if it looks like common issue that has already many question related with it, but I couldn't find the solution to fix this, and it's very strange error.
I have a problem with the Unknown: failed to open stream error. Here is some of the detail:

Code: Select all
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'D:/Path/to/Souce/Folder/test.php' (include_path='\xampp\php\PEAR') in Unknown on line 0


and here is the content of the test.php

Code: Select all
<?php echo "Hello World"; ?>


My OS, Windows 10 Pro - ver 1709 just updated with fall creator update

Additional notes:
- I have another machine that also run on Windows 10 pro, earlier version, running same XAMPP version and it run smoothly
- I'm using test.php to narrowed down the issue possibilities, because it only run simple command such as echo "Hello World"
- I can open other html files in the same folder
- I tried to use fresh downloaded xampp, and put the test.php to the htdocs folder, and it still shown the same error message as above
- I set permission using Everyone and full control, but it still not working.

Questions:
- is there any clue or maybe test that I could check to get more detail about the issue?
ralese
 
Posts: 1
Joined: 27. November 2017 06:08
XAMPP version: 5.6.28
Operating System: Windows 10 Pro x64

Re: PHP Warning: Unknown: failed to open stream

Postby Nobbie » 27. November 2017 11:31

Please dont hide real data, in more than 90% it hides the issue (D:/path/to/source is probably not the right path).

The contents of test.php is not the problem, the problem is the file itself. Either a wrong drive letter (for example), an invalid character in the pathname, an invalid configuration (i.e. when running PHP in CGI Mode), running Xampp from NAS or a USB Stick or an external drive or a Cloud or or - it has nothing to do with "Hello World".

Also the access_log and the error_log may give you a deeper insight.

Which URL do you enter into the browser in order to trigger test.php?
Nobbie
 
Posts: 9800
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 76 guests