Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Erro quando o servidor sobe

Segui os passos da aula, após dar o comando

php artisan serve

No terminal apresenta como o servidor subiu, só que ao acessar o localhost:8000 a página apresenta a seguinte mensagem:

Whoops, looks like something went wrong.

1/1
ErrorException in Encrypter.php line 303:
Function mcrypt_get_iv_size() is deprecated
in Encrypter.php line 303
at HandleExceptions->handleError('8192', 'Function mcrypt_get_iv_size() is deprecated', 'C:\Users\Kleber\estoque\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php', '303', array()) in Encrypter.php line 303
at Encrypter->updateBlockSize() in Encrypter.php line 280
at Encrypter->setCipher('rijndael-128') in EncryptionServiceProvider.php line 20
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in Container.php line 776
at Container->build(object(Closure), array()) in Container.php line 659
at Container->make('encrypter', array()) in Application.php line 644
at Application->make('encrypter') in Container.php line 890
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 851
at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 815
at Container->build('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Container.php line 659
at Container->make('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Application.php line 644
at Application->make('Illuminate\Cookie\Middleware\EncryptCookies') in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 42
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 100
at Pipeline->then(object(Closure)) in Kernel.php line 115
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 52
at require_once('C:\Users\Kleber\estoque\public\index.php') in server.php line 21
Whoops, looks like something went wrong.

1/1
ErrorException in Encrypter.php line 303:
Function mcrypt_get_iv_size() is deprecated
in Encrypter.php line 303
at HandleExceptions->handleError('8192', 'Function mcrypt_get_iv_size() is deprecated', 'C:\Users\Kleber\estoque\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php', '303', array()) in Encrypter.php line 303
at Encrypter->updateBlockSize() in Encrypter.php line 280
at Encrypter->setCipher('rijndael-128') in EncryptionServiceProvider.php line 20
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in Container.php line 776
at Container->build(object(Closure), array()) in Container.php line 659
at Container->make('encrypter', array()) in Application.php line 644
at Application->make('encrypter') in Container.php line 890
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 851
at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 815
at Container->build('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Container.php line 659
at Container->make('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Application.php line 644
at Application->make('Illuminate\Cookie\Middleware\EncryptCookies') in Kernel.php line 131
at Kernel->terminate(object(Request), object(Response)) in index.php line 57
at require_once('C:\Users\Kleber\estoque\public\index.php') in server.php line 21
2 respostas
solução!

Fiz um downgrade do Xampp da versão 7.1 para a versão 7.0 e funcionou, o Laravel não é suportado na versão 7.1 do PHP?

Oi Kleber, tudo bom?

Aqui a gente tem uma discussão bem parecida com essa.

Na verdade, o framework não suporta muito bem nem a versão 7.0 (até a versão 5.4), poucos frameworks php suportam até o momento. Porém, poucas mudanças foram feitas da versão 5.6 pra 7.0 que impactam na retro compatibilidade. Já da versão 7.0 para a 7.1 algumas mudanças afetaram funções antigas, como a mcrypt_get_iv_size que se tornou obsoleta na nova versão. Por isso o problema =)

O aconselhavel para trabalhar com o framework em produção, até o momento, sem dor de cabeça, é a versão 5.6 mesmo que é garantido. Mas, no curso acredito que você não terá problemas =)

Abraço.