502 bad gateway

I am using PhpStorm 2019.1.2 with wampserver 3.1.9. When I try to open with browser any project of phpstorm it works except for those in which php script is embed with html and simple phpinfo function.

Please help me.

<?php phpinfo();
Comment actions Permalink

Hi there,

You are using PhpStorm's built-in simple webserver and not your Apache from WAMP.

Either use your WAMP directly (type correct URL in browser) .. or setup a Deployment entry in PhpStorm and mark it as Default for this project if you wish to use "Open in Browser"/Run functionality from PhpStorm.

Comment actions Permalink

Thanks for your help. How can I setup a Deployment entry in PhpStorm and mark it as Default for this project if I wish to use "Open in Browser"/Run functionality from PhpStorm?

Comment actions Permalink

Please check the official help pages: https://www.jetbrains.com/help/phpstorm/deploying-applications.html

Since you have a proper web server already installed on your computer, an In-place deployment is the way to go here (no files get copied anywhere and you just provide server URL info). https://www.jetbrains.com/help/phpstorm/creating-in-place-server-configuration.html

Comment actions Permalink

Thanks a lot Andriy Bazanov. The problem has been solved.

Comment actions Permalink

Hi I get the same problem

I want to use my PhpStorm's built-in simple webserver when I run  <?php phpinfo();  or <?php echo "TEST";, 

they ask me to set "CLI Interpreter", i checked my PHP version on my computer :  PHP 7.2.19 (cli) (built: May 29 2019 07:14:35) ( NTS )

I set cli Interpreter, settings --> Languages & frameworks -> php :

PHP language level : 7.2 

cli interpreter : PHP 7.2 (7.2.17)


I run again it,

<?php echo "TEST";  that works well on my Browser I see ---> TEST,

but always the same error message, with my <?php phpinfo();. ---> 502 Bad gateway.


for now I always shirk the problem by using remote server like you say Andriy Bazanov but now i would like to resolve this.


I'm using only phpinfo on don't get it why it doesn't work..

However when i create test.php in /var/www/html, i put <?php echo "TEST"; or <?php phpinfo(); both work very well, so it that's something wrong with phpStorm and not from my computer.


phpstorm version --> PhpStorm 2019.1.2

fedora --> 29


Comment actions Permalink

MP, unfortunately, there's no solution available at the moment for what you are describing. The issue is known, and for some reason, it got severely worse since 2019.1, we are working on re-assigning the issue right now.

Sorry for the inconvenience!



Please sign in to leave a comment.