Recommand · May 23, 2021 0

Issues when using PHP server in Visual Studio Code with Laragon

I am doing a Full Stack web developing course and I wanted to use the PHP Server extension for Visual Studio Code with Laragon serving as the virtual server. Problem is, when I right click on a .php file on VSC and try to "serve" it, the url turns into something like this: localhost/laragon/www/IntroduccionPHP_POO_Inicio/namespaces.php, which yields a 404 error page.
If I remove the /laragon/www from the url so it looks like this:
http://localhost/IntroduccionPHP_POO_Inicio/namespaces.php, it works (I mean,
the .php file is loaded correctly) but PHP server doesn’t update my page
automatically anymore.

I need to know if there is a way to tell PHP server to ignore the
/laragon/www path. Maybe some configuration that I am not aware of?
Btw, the php files I want to load with PHP Server are added to the VSC
workspace with their full path, wich is c:\laragon\www. I don’t know if that
is the problem and if so, how to solve it.

Thank you beforehand to anyone who can help me with this issue.

You should try to install MAMP or XAMPP instead of this. It will be more helpful. 😉