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();
0

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.

0
Avatar
Permanently deleted user

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?

0

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

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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

 

0

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!

https://youtrack.jetbrains.com/issue/WEB-31859

0

the same error message with :

PHP 8.1.6 (cli) (built: May 11 2022 08:56:01) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies

PhpStorm 2022.1.2

Build #PS-221.5787.33, built on June 1, 2022

Licensed to Seghir Issam
Subscription is active until July 3, 2022.
Evaluation purpose only.

Runtime version: 11.0.15+10-b2043.56 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

I use built in preview 

I find the problem with Material Theme , so I deactivate the theme and the preview work great !!

0

the same error message with :

PHP 8.1.6 (cli) (built: May 11 2022 08:56:01) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies

PhpStorm 2022.1.2

Build #PS-221.5787.33, built on June 1, 2022

Licensed to Seghir Issam
Subscription is active until July 3, 2022.
Evaluation purpose only.

Runtime version: 11.0.15+10-b2043.56 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

I use built in preview 

I find the problem with Material Theme , so I deactivate the theme and the preview work great !!

0

请先登录再写评论。