2016-11-22 4 views
0

저는 Laravel을 처음 사용하고 제 문제는 응용 프로그램 실행 단계부터 시작합니다. 내가 시작할 때, 또한Apache에서 Laravel 응용 프로그램은 "정의되지 않은 상수 MCRYPT_RIJNDAEL_128 사용 -"MCRYPT_RIJNDAEL_128 "로 가정합니다.

[[email protected] test]$ php -m | grep mcrypt 
mcrypt 
[[email protected] test]$ php -i | grep mcrypt 
mcrypt 
mcrypt support => enabled 
mcrypt_filter support => enabled 
mcrypt.algorithms_dir => no value => no value 
mcrypt.modes_dir => no value => no value 

:

ErrorException in EncryptionServiceProvider.php line 16: 
Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' 
in EncryptionServiceProvider.php line 16 
at HandleExceptions->handleError('8', 'Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'', '/srv/http/test/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php', '16', array('app' => object(Application))) in EncryptionServiceProvider.php line 16 
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in Container.php line 773 
at Container->build(object(Closure), array()) in Container.php line 656 
at Container->make('encrypter', array()) in Application.php line 613 
at Application->make('Illuminate\Contracts\Encryption\Encrypter') in Container.php line 887 
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 848 
at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 813 
at Container->build('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Container.php line 656 
at Container->make('Illuminate\Cookie\Middleware\EncryptCookies', array()) in Application.php line 613 
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 101 
at Pipeline->then(object(Closure)) in Kernel.php line 111 
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84 
at Kernel->handle(object(Request)) in index.php line 53 

내 시스템에 설치 Mcrypt 라이브러리 않은 : 나는 http://127.0.0.1/test/public/에서 내 응용 프로그램에 액세스하려고 할 때 어떤 이유로 나는이 오류 (아파치 서버가 있습니다) 숙련공 웹 서버가 php artisan serve이고 http://localhost:8000으로 액세스하면 모든 것이 잘됩니다. 여기서 문제가 될 수있는 것은 무엇입니까?

이 주제에 대해 알고 있습니다 : Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'. 하지만 내 사건처럼 보이지 않아. 나에게 문제는 장인과 함께 작동하고 아파치와 작동하지 않는다는 것입니다.

+0

, 그것은이었다 밴던의 위치에 다음을 추가 지금 거의 10 년 동안. 그러므로 PHP 7.2에서 비추천되었으며 PECL에서 제거 될 것입니다. 표준 PKCS # 7 (nee PKCS # 5) 패딩을 지원하지 않으며, 바이너리 데이터로도 사용할 수없는 비표준 널 패딩 만 지원합니다. mcrypt는 2003 년으로 거슬러 올라가는 많은 [버그] (https://sourceforge.net/p/mcrypt/bugs/)를 가지고 있습니다. 대신 [defuse] (https://github.com/defuse/php-encryption) 또는 [RNCryptor] (https://github.com/RNCryptor)는 완벽한 솔루션을 제공하며 유지 보수가 잘되고 올바른 것입니다. – zaph

+0

zaph, 답변 해 주셔서 감사합니다. 내가 그것을 올바르게 이해한다면 그것은 Laravel에 대한 의존성입니다. 나는 그것을 사용할 의도가 없다. – stee1rat

답변

0

시스템에 따라 다르지만 일반적으로 PHP CLI 및 PHP Apache에는 별도의 php.ini이 있습니다.

는 확장 mod_php가 알고있는 무엇을 말할 것이다 public/index.php

<?php phpinfo(); exit; 

의 상단과로드 php.ini 그것은 Mcrypt 라이브러리를 사용하지 않는 것이 좋습니다