Repository navigation
Why I'm getting this error - stderr: PHP Warning: Undefined array key "REQUEST_METHOD" #140
Replies: 2 comments
|
The same issue persists in my code as well. When using XAMPP to start an Apache server for PHP hosting it's working fine but when using the extension the GET and POST requests are not working as expected. Looking around I saw that when using the apache server the GET and POST arrays contained the form data. When using the extension the page is reloaded and the GET and POST arrays are flushed to null ( no data is present in these array ). When using GET the URL contains the form data but the GET arrays of PHP doesn't have any data present at all. This throws the Undefined array key warning ** EDIT ** This is a limitation of the extension as stated in this issue the extension renders the PHP file but is not capable of hosting a PHP server as apache does. So I guess if you want to use forms you are better of with apache. |
|
The extension is limited to rendering PHP it doesn't provide a fully featured PHP server as apache but rather just renders PHP code. I you want to use the GET and POST methods use XAMPP with apache. |
Uh oh!
There was an error while loading. Please reload this page.
Why I'm getting this error when I'm using five-server - stderr: PHP Warning: Undefined array key "REQUEST_METHOD"
But when I'm using xampp same file running perfectly.
If any one know please help.
Thank you
All reactions