Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
347 views
in Technique[技术] by (71.8m points)

php - PhpStorm $_POST always empty

$_POST seems that does not work. I've installed PhpStorm 10.0.3, and using the WAMP server default php interpreter.

in the index.php:

<form method='post' action='a.php'>
    <input type='text' name='user_f'>
    <input type='submit' name='send' value='Send'>
</form>

In the a.php:

var_dump($GLOBALS);

when I type "asdf" in the form:

array (size=9)
      'HTTP_RAW_POST_DATA' => string 'user_f=asdf&send=Send' (length=22)
      '_GET' => 
        array (size=0)
          empty
      '_POST' => 
        array (size=0)
          empty
      '_COOKIE' => 
        array (size=0)
          empty
      '_FILES' => 
        array (size=0)
          empty
      '_ENV' => 
        array (size=0)
          empty
      '_REQUEST' => 
        array (size=0)

$_GET works good, but seems like the interpreter don′t fill the $_POST variable.

php.version: 5.4.12 (same problem using 5.6.18 and 7 interpreters from http://php.net/downloads.php )

php.ini file for this version:(default from wamp)

Other ports like (3306) for MySQL works good in the PhpStorm. (Connection with phpmyadmin is ok)

Xdebug port : 9000 PhpStorm built-in server port: 63342

Everything works good if i build from Netbeans IDE in the default localhost:8000

Same problem in my laptop.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The new PhpStorm 2017.2.2 EAP build (172.3968.23) has solved this problem.

Bug WEB-17317 502 Bad Gateway error from the server when post data.

You can download it here.

Complete Release notes link=>confluence.jetbrains.com/display/PhpStorm/PhpStorm+EAP+172.3968.23+Release+Notes


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...