502 Bad Gateway PHP+XAMPP
I am trying to load php file using javascript. The interpreter and deployment settings are setup. I saw this window.location.href to load php. I have webpage in .php and want to retrive it and load it in html page HOME.html. XAMPP is running with administrative rights too.DataBase is connected.






Another thing i noticed that if i use html button to load php the url is different the picture below. but if I run php run directly the url is different the last picture. but the error is same 502 Bad Gateway.


请先登录再写评论。
Hi there,
You are NOT using your XAMPP. Based on your last screenshot (localhost:63342), PhpStorm's built-in simple web server is used instead.
Thank you Sir. As you can see I have done the configuration and still getting this error. How can i get it to work properly.
Use XAMPP. Built-in web server may result in 502 errors (it's a known issue).
My best guess so far: the Run/Debug Configuration that you have must be still pointing to built-in web server address -- double check that. Also, make sure that the Deployment entry that you have there is marked as Default for this project .. otherwise built-in web server will be used.
Set default for all projects the deployment settings. I still am unable to resolve this. Any reference you could provide.
does it have to do something with deployment path?
So i needed to create my project inside xampp htdocs. but this is last thing i guess to get to work started now. It didnt found the file while it exists.
it solved by targeting the deployment to project folder.
Glad you have resolved your folders/path issues.