skip to Main Content

Microsoft Windows 11 Pro Build 22000

PHP 8.1.6

Laravel Framework 8.83.24

XAMPP 8.1.4

Hi all! I have a problem with opening the page http://127.0.0.1:8000/admin/auth/login, an error appears. The .env file was edited like this on the screenshot
Getting invalid SSL certificate, got many errors on command line: Bad request (Unsupported SSL request) Closing, tried these methods from the post: How to fix Invalid request (Unsupported SSL request)
there are many errors Invalid request (Unsupported SSL request) Closing
Has anyone come across this problem and can you tell me how to solve the problem?

Code from .env file:

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:WCPyXwmMZszSnG1mbDTw4jywbcL4XXv0NW0zPSZD7ok=
APP_DEBUG=true
APP_URL=https://127.0.0.1:8000/ //tried to enter http without s same error of unsupported ssl certificate

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=shopping-app
DB_USERNAME=admin
DB_PASSWORD=

Command line errors:

D:ProgrammingXAMPPxampphtdocsshopping-app>php artisan serve --port 8002
PHP Warning:  Module "openssl" is already loaded in Unknown on line 0

Warning: Module "openssl" is already loaded in Unknown on line 0
Starting Laravel development server: http://127.0.0.1:8002
[Sun Sep 25 09:42:51 2022] PHP Warning:  Module "openssl" is already loaded in Unknown on line 0
[Sun Sep 25 09:42:51 2022] PHP 8.1.6 Development Server (http://127.0.0.1:8002) started
[Sun Sep 25 09:43:02 2022] 127.0.0.1:59678 Accepted
[Sun Sep 25 09:43:02 2022] 127.0.0.1:59679 Accepted
[Sun Sep 25 09:43:02 2022] 127.0.0.1:59679 Closing
[Sun Sep 25 09:43:02 2022] 127.0.0.1:59685 Accepted
[Sun Sep 25 09:43:03 2022] 127.0.0.1:59685 Closing
[Sun Sep 25 09:43:03 2022] 127.0.0.1:59678 Closing
[Sun Sep 25 09:43:04 2022] 127.0.0.1:59693 Accepted
[Sun Sep 25 09:43:04 2022] 127.0.0.1:59693 [200]: GET /favicon.ico
[Sun Sep 25 09:43:04 2022] 127.0.0.1:59693 Closing
[Sun Sep 25 09:43:13 2022] 127.0.0.1:59695 Accepted
[Sun Sep 25 09:43:13 2022] 127.0.0.1:59696 Accepted
[Sun Sep 25 09:43:14 2022] 127.0.0.1:59695 Closing
[Sun Sep 25 09:43:14 2022] 127.0.0.1:59699 Accepted
[Sun Sep 25 09:43:14 2022] 127.0.0.1:59699 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:14 2022] 127.0.0.1:59699 Closing
[Sun Sep 25 09:43:14 2022] 127.0.0.1:59700 Accepted
[Sun Sep 25 09:43:14 2022] 127.0.0.1:59700 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:14 2022] 127.0.0.1:59700 Closing
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59702 Accepted
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59703 Accepted
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59703 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59703 Closing
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59702 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59702 Closing
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59704 Accepted
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59705 Accepted
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59704 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59704 Closing
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59705 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:15 2022] 127.0.0.1:59705 Closing
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59708 Accepted
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59709 Accepted
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59709 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59709 Closing
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59708 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59708 Closing
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59710 Accepted
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59711 Accepted
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59711 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59711 Closing
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59710 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:20 2022] 127.0.0.1:59710 Closing
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59715 Accepted
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59716 Accepted
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59716 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59716 Closing
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59715 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59715 Closing
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59717 Accepted
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59718 Accepted
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59717 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59717 Closing
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59718 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:43:50 2022] 127.0.0.1:59718 Closing
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59696 Closed without sending a request; it was probably just an unused speculative preconnection
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59696 Closing
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59722 Accepted
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59723 Accepted
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59722 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59722 Closing
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59723 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59723 Closing
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59725 Accepted
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59726 Accepted
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59725 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59725 Closing
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59726 Invalid request (Unsupported SSL request)
[Sun Sep 25 09:44:50 2022] 127.0.0.1:59726 Closing

Upd. Updated php versions to version 8.1.10, xampp to version 8.1.6. Added xampp version at the beginning of the post.

2

Answers


  1. First Way:

    Please update your php.ini file or its sub-files. It is probably because you have defined the line, extension=php_openssl.dll twice in there.

    Second Way:

    If you are using xammp or alternative then:

    1. Open xampp -> PHP -> php.ini
    2. Open the file php.ini in any text editor
    3. Press CTRL + F and Search for openssl
    4. Comment the line extension=php_openssl.dll by placing a semi-colon at the beginning: ;extension=php_openssl.dll

    Third Way:

    Try to put http://localhost in .env file instead of https://127.0.0.1:8000

    Login or Signup to reply.
  2. If none of the steps listed in above answers works. Maybe there is cache issue, you can try clearing your cache after doing these steps and see if it works.
    Try these commands to remove cache:

    • php artisan clear
    • php artisan cache:clear
    • php artisan config:clear
    • php artisan optimize:clear

    If the error still persists, kindly share screenshot of laravel debugger.
    Thanks

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search