2016-11-22 10 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/で私のアプリケーションにアクセスしようとすると、何らかの理由で、私はこのエラーを取得する(Iは、Apacheサーバを持っています)職人のWebサーバーをphp artisan serveとし、http://localhost:8000でアクセスしても問題ありません。何が問題なの?

私はこのトピックについて認識しています:Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'しかし、私の場合のように見えません。私の問題は、職人と一緒に働いて、apacheで動かないということです。

+0

の場所は、それはmcryptのを使用するのではない何が最善かを教えてくれますpublic/index.php

<?php phpinfo(); exit; 

の先頭に次を追加し、それはアバンダンてきました今の10年近く。このため、PHP 7.2では非推奨となり、コアからPECLに削除されます。標準のPKCS#7(néePKCS#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は知っているし、あなたのロードされたphp.ini

関連する問題