-2

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, which is c:\laragon\www. I don't know if that is the problem and if so, how to solve it.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38

1 Answers1

0

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

MAMP : https://www.mamp.info/en/downloads/ XAMPP : https://www.apachefriends.org/index.html

heavnz0r
  • 1
  • 1
  • 1
    I have Xampp installed from another course but in this one the teacher is working with Laragon, stating that it is way better than Xampp (due to alleged multiple issues with it). I am trying to stick with the teacher to the letter if possible, at least on this, so I would like to find a solution to the problem mentioned on the first post. – Jamel Seyek May 23 '21 at 00:26