I am using Laravel with Xampp. When I put http://127.0.0.1:8000 in the browser. I go to the Laravel home page but when I put http://127.0.0.1:8000/admin, I get a PR_END_OF_FILE_ERROR.
This is the error;
An error occurred during a connection to 127.0.0.1:8000. PR_END_OF_FILE_ERROR
Error code: PR_END_OF_FILE_ERROR
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
In Chrome, the error for http://127.0.0.1:8000/admin is This site can’t be reached127.0.0.1 unexpectedly closed the connection.
What do I do to rectify this error.
2
Answers
I was losing my mind over this. It has been 2 days of trying to figure this out and I was failing miserably until I found a YouTube video with the answer.
So basically, first stop the server with ctrl + c, then go to the project folder and open the command prompt there. Then run
php artisan optimize
. After run the usualphp artisan serve
to start the server. Things should work fine nowThe "PR_END_OF_FILE_ERROR" typically pertains to OpenSSL and is not specific to Laravel. In the context of Laravel, this error can occur when there is an issue with the SSL/TLS connection while making HTTP requests using packages like Guzzle.
To troubleshoot and resolve the "PR_END_OF_FILE_ERROR" in a Laravel application, you can consider the following steps:
Verify the SSL/TLS configuration:
Check the remote server:
Verify network connectivity:
Check Guzzle settings:
Review server logs:
It’s important to investigate the specific context and scenario where you are encountering the "PR_END_OF_FILE_ERROR" in your Laravel application. The above steps provide a general guideline, but the exact resolution may depend on your application’s specific setup and configuration.