Answer the question
In order to leave comments, you need to log in
Why does Open Server write that $_POST does not exist?
I was able to catch a very strange error in Open Server, after a certain (large) number of sent requests, at some point it stops returning the result for the $_POST variable, it looks like this:
Notice : Undefined variable: _POST in C:\OpenServer\domains\proxy\index.php on line 13
<?php
header('Access-Control-Allow-Origin: *'); // Разрешаем запросы с любых доменов
header('Content-Type: text/html; charset=utf-8'); // Указываем тип документа и кодировку
// Включаем отображение ошибок:
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
print_r($_POST); // Это и есть 13-ая строка
Answer the question
In order to leave comments, you need to log in
Well, try it in order:
1) Disable the certificate
2) Check that the request method is post (in the browser, see the network, in the code you do var_dump server request method)
3) there is a suspicion that the redirect works (why is another question), so carefully look at paragraph 2
below according to the circumstances.
Drop your openserver and execute the command in the project folder php -S 0.0.0.0:80 -t "%cd%"
, the local webserver will start. Once you are sure that everything works as expected, you can delete the open server and forget about it. You don't need it for local development, just like Apache.
pthreads to help + you need to understand that such projects out of the box are not designed for offloaded projects and you didn’t even think of switching to ngnix from the same box ..
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question