Comments (8)
Hi @NickBerkson
The problem is that you are using an absolute path in phpserver.relativePath
.
You should be able to make it work by removing the phpserver.relativePath
configuration and opening the C:/xampp/htdocs
folder with VScode (File -> Open Folder...).
from vscode-phpserver.
Ah, thank you!
I ended up deleting both settings, then I created a global environment variable for my PC to point at the php location. Seems to work. Hope I don't reinstall xampp and forget that's what I did at some point.
from vscode-phpserver.
And its broken again...
Fatal e
rror: Unknown: Failed opening required 'c:\Users*******.vscode\extens
ions\brapifra.phpserver-2.4.6\src\logger.php' (include_path
='C:\xampp\php\pear') in Unknown on line 0
I've cleared all my settings so "phpserver.phpPath": "C:/xampp/php/php.exe" is the only setting in my .json file.
I've tried opening the folder with vscode (File -> Open Folder...) in htdocs and elsewhere
I then tried adding :
"php.validate.enable": true,
"php.executablePath": "C:\xampp\php\php.exe",
"php.validate.executablePath": "C:\xampp\php\php.exe",
I then removed those settings.
I also tried :
"phpserver.phpPath": "C:\xampp\php\php.exe",
"phpserver.phpPath": "C:/xampp/php/php.exe",
For my global windows path variable I tried :
C:\xampp\php;
then I tried changing it to :
C:\xampp\php\php.exe
I even edited my php.ini so it would say include_path = C:\xampp\php\pear
At this point I'm unsure what else to try. I feel dumb that I can't figure this out...
from vscode-phpserver.
I'm running into a similar situation. After setting my open_basedir in my php.ini file for testing purposes. The error I am receiving is:
Fatal error: Unknown: Failed opening required 'c:\Users\...\.vscode\extensions\brapifra.phpserver-2.4.6\src\logger.php' (include_path='.;C:\php\pear') in Unknown on line 0
Where can i go to remove C:\php\pear
. That's not even a real directory on my machine. I looked under my environmental variables in my WIndows 10 machine. That folder is not in path. Where else would it be? Hard-coded inside the extension itself?
Many Thanks!
from vscode-phpserver.
That's really strange, here in my machine the logger.php
is located in .vscode\extensions\brapifra.phpserver-3.0.2\src\server\logger.php
inside the server
directory.
I found someone with the same problem, I'll check if I can help her to fix that. There's also this issue posted in https://superuser.com/questions/1646540/php-error-with-logger-php-unknown-failed-to-open-stream-no-such-file-or-di which suggests creating/editing the logger.php
to match the content:
<?php
$path = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$relativePath = getenv('PHP_SERVER_RELATIVE_PATH');
$fullPath = $_SERVER["DOCUMENT_ROOT"] . $relativePath . $path;
if (!file_exists($fullPath) || is_dir($fullPath)) {
file_put_contents("php://stderr", sprintf("[%s] %s", date("D M j H:i:s Y"), "[404] $path - No such file or directory "));
}
else {
file_put_contents("php://stdout", sprintf("[%s] %s", date("D M j H:i:s Y"), "[200] $path"));
}
return false;
?>
from vscode-phpserver.
I've figured it out what was happening in this girl's machine, the Avast Antivirus was blocking logger.php
and quarantined it, check if your antivirus isn't doing the same.
from vscode-phpserver.
tnx caiohamamura
restore server.php from avast antivirus quarantine work for me.
the error that i face when browsing 127.0.0.1:8000 is
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
from vscode-phpserver.
gak iso bolo
from vscode-phpserver.
Related Issues (20)
- [Fixed] Requested resource not found on server? HOT 1
- PHP Server not working after brew upgrade to php 7.4 in OSX?
- Extension issue
- The requested resource was not found on this server, using .htaccess.
- Keeps loading old version of html file when pressing serve button top right
- [Feature] Keep track of server state to greatly improve usability of extension
- Unable to serve remote folder
- Error HOT 1
- Serve Project Issue HOT 1
- Would be nice to have setting for environment variables HOT 1
- Requesting to have this also published to open-vsx.org for VSCodium HOT 1
- PHP Not Found (Ubuntu) HOT 3
- How should I solve this problem?�����ҳ: 936
- How can I activate debug?
- test
- Busy port when closing window
- nội thất
- nội thất
- how to open in a new tab instead of a new browser window
- PHP not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-phpserver.