Ich bin sehr neu in Laravel und meine Probleme beginnen bei der Running-my-Application-Phase. Aus irgendeinem Grund bekomme ich diesen Fehler, wenn ich bei http://127.0.0.1/test/public/ meine Anwendung zuzugreifen versuchen (Ich habe Apache-Server):Laravel-Anwendung mit Apache gibt "Verwendung von undefined Konstante MCRYPT_RIJNDAEL_128 - angenommen" MCRYPT_RIJNDAEL_128 ""
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
Ich habe Mcrypt auf meinem System installiert:
[[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
Außerdem, wenn ich anfangen der Handwerker Web-Server mit php artisan serve
und greifen Sie darauf mit http://localhost:8000, alles funktioniert gut. Was kann hier das Problem sein?
Ich kenne dieses Thema: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'. Aber es sieht nicht wie mein Fall aus. Das Problem mit mir ist, dass es mit handwerklichen Servieren funktioniert und nicht mit Apachen funktioniert.
Er weiß am besten nicht mcrypt zu verwenden, es war abandonware seit fast einem Jahrzehnt. Es ist daher veraltet und wird in PHP 7.2 aus dem Kern und in PECL entfernt. Es unterstützt nicht Standard-PKCS # 7 (bisher PKCS # 5) Padding, nur Nicht-Standard-Null-Padding, das nicht einmal mit Binärdaten verwendet werden kann. mcrypt hat viele herausragende [Bugs] (https://sourceforge.net/p/mcrypt/bugs/) aus dem Jahr 2003. Stattdessen sollten Sie [defuse] (https://github.com/defuse/php-encryption) oder verwenden [RNCryptor] (https://github.com/RNCryptor), sie bieten eine vollständige Lösung, werden gepflegt und sind korrekt. – zaph
zaph, danke für deine Antwort. Es ist eine Abhängigkeit für Laravel, wenn ich es richtig verstehe. Ich habe nicht die Absicht, es zu benutzen. – stee1rat