A
A
Anton Anton2019-12-12 15:20:25
IIS
Anton Anton, 2019-12-12 15:20:25

How to get laravel 6.2 auth to work in a clean install on iis?

I did everything according to the instructions (and not for the first time, just before that there were 5.x versions). Routes with pages are displayed, but when trying to register or login, it just gives an empty window and a status of 500.
For other errors (for example, if you call a non-existent view or User::count() before the migrations create tables), the standard whoops gets out with the correct call stack and others. If you call php errors outside of laravel, then everything gets into the php logs properly.
Now there is complete silence, both in the php logs and in the iis logs and in the laravel logs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2019-12-12
@Fragster

The whole thing turned out to be in the wrong IIS configuration. Not a single post request to Laravel went through. When installing php 7.2 via the web platform installer, for some reason it installs php 5.3 at the same time. I figured it out sequentially - first I created my own route with a call and a get and a post request. Through get it opened, but through post - no. Then I put a file with phpinfo() next to it. When opened via get, it issued 7.2, via post 5.3. It turned out that in the web.config the list of methods for the php 5.3 handler was separated by commas without spaces: GET,HEAD,POST, and for 7.2 - with spaces:GET, HEAD, POST. I did the same (without spaces) - laravel started up. Apparently, with spaces, he did not find methods, except for get, which was the first and looked for the next handler, and found 5.3 In the logs for 5.3, I then found these errors. An asterisk (*) in my case can not be set so that options requests go to the cors native iis module, this is used in other places. Someone this option can arrange it. Unfortunately, it will not be possible to fix it through the interface (only through the "configuration editor"), since the assignment of handlers requires the path with spaces to be quoted, and the fastCGI handler - without quotes :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question