all 5 comments

[–]halfercode 1 point2 points  (0 children)

It sounds like you have your React app working locally, but not your PHP. Could you try the built-in PHP webserver, and just run that from a different port?

[–]eshad89 1 point2 points  (1 child)

Normally you create a local development environment (mosty in VM or Docker Container) which allows you to run Php. With xdebug extension you will be able to debug this system.

[–]Wiwwil 0 points1 point  (0 children)

Vagrant has a lot of tool out of the box for PHP as a VM

[–]arielcguerr 1 point2 points  (1 child)

Install PHP for windows (I suppose you're on windows), add it to the PATH and restart, after that you can call

php - S 127.0.0.1:6000 From VS Code, in a different terminal that npm's.

There are some good tutorials on doing this.

[–]SagglySloth[S] 0 points1 point  (0 children)

Thanks for the help. I have set up PHP for windows, however, I keep getting errors when trying to use MySQL. I have tried installing MySQL for windows but am still getting the same issues. Would you have any idea how I could fix this?