PHP/Phalcon Error: Closed without sending a request; it was probably just an unused speculative preconnection
Get the solution ↓↓↓I have a basic controller action:
public function createAction() {
$this->view->disable();
$formData = $this->request->getJsonRawBody();
$user = new Users();
$user->first_name = $formData->first_name;
$user->last_name = $formData->last_name;
$user->email_address = $formData->email_address;
$user->password = $formData->password;
// this prints to my debug log.
$result = $user->save();
AppLogger::$logger->debug(print_r($result, true)); // this does not print.
AppLogger::$logger->debug("oh boy #2"); // this does not print either.
// which seems to tell me that the line above it is problematic,
// but there is no error output from `phalcon serve`
echo Json::encode($result);
}
The closest thing I see to an error is this:PHP/Phalcon Error: Closed without sending a request; it was probably just an unused speculative preconnection
. This is appearing in the output ofphalcon serve
.
I'm runningphalcon serve
in VSCode on Windows.
Answer
Solution:
I fixed this by wrapping$result = $user->save();
in a try/catch, then I was able to see the exception.
It seems that this exception is not automatically displayed in the terminal output...
Answer
Solution:
Had the same issue when a user tries to log out, restarted my server(laravel inbuilt server)and it worked like a charm.
Answer
Solution:
If you're cloning a Laravel project, make sure your .env file is created. They have sensitive information and may be kept inside .gitignore.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: unable to determine current zabbix database version: the table "dbversion" was not found.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.