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.

7 comments
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

Set default for all projects the deployment settings. I still am unable to resolve this. Any reference you could provide.

0
Comment actions Permalink

does it have to do something with deployment path?

0
Comment actions Permalink

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.

0
Comment actions Permalink

Glad you have resolved your folders/path issues.

0

Please sign in to leave a comment.