2016-12-07 14 views
2

私はD8サイトをWindowsからUbuntu 14.04 PCに移動して設定しました。私は、次のエラーを取得していますサイトを実行するときしかし:PHPの致命的なエラー:インターフェイス 'JsonSerializable'が見つかりません

Fatal error: Interface 'JsonSerializable' not found in /var/www/eCartZone/core/lib/Drupal/Component/Render/MarkupInterface.php on line 32

は、私は、端末からphp -mにインストールされたモジュールをチェックし、私は、リストでそれを見つけました。 enter image description here

は私が$ phpbrew install php-5.5.33 +default+json+mysql+curl

バージョン情報を使ってPHP 5.5.33インストール:

Php: 5.5.33 
Drupal: 8.2.3 
Apache: 2.4.7 
MySql: 14.14, Distrib 5.5.53 

私はこの問題を解決する方法がわかりません!誰かが解決策を教えてください。私は最終的に解決策を持って、いくつかのより多くの研究の後php -r "phpinfo();" | grep json

PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Command line code on line 1 
Configure Command => './configure' '--cache-file='''/home/subrara/.phpbrew/cache/config.cache'''' '--prefix=/home/subrara/.phpbrew/php/php-5.5.33' '--with-config-file-path=/home/subrara/.phpbrew/php/php-5.5.33/etc' '--with-config-file-scan-dir=/home/subrara/.phpbrew/php/php-5.5.33/var/db' '--disable-all' '--enable-session' '--enable-short-tags' '--with-zlib=/usr' '--with-libdir=lib/x86_64-linux-gnu' '--with-curl=/usr' '--enable-json' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--enable-libxml' '--enable-simplexml' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-xsl' '--with-libxml-dir=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--enable-cli' '--enable-ctype' '--enable-dom' '--enable-fileinfo' '--enable-filter' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-mbregex' '--enable-mbstring' '--with-mhash=/usr' '--with-mcrypt=/usr' '--enable-pcntl' '--with-pcre-regex' '--with-pcre-dir=/usr' '--enable-pdo' '--enable-phar' '--enable-posix' '--with-readline=/usr' '--enable-sockets' '--enable-tokenizer' '--with-openssl=/usr' '--enable-zip' '--with-pear=/home/subrara/.phpbrew/php/php-5.5.33/lib/php' '--enable-zend-signals' 
/home/subrara/.phpbrew/php/php-5.5.33/var/db/json.ini 
json 
json support => enabled 
json version => 1.2.1 
+0

おかげで 'PHPを示して何-r "のphpinfo();" | grep json'? – JustOnUnderMillions

+0

また、読み込まれたモジュールは、組み込みのPHPを使用しているのか、ApacheのようなWebサーバーを使用しているのかによって異なります。 – JezEmery

+0

ブラウザのコンソールと同じPHPバージョンを実行していますか? – Evert

答えて

0

UPDATE
コマンド出力!これが他の人にも役立つことを願っています。

Drupal 8はPHP 5.5.9+で動作すると言われていますが、私のPHPバージョンは5.5.33でした。

PHPを5.6.22にアップデートしましたが、エラーはなくなりました。

$ phpbrew install php-5.6.22 +default+curl+json+mysql+apxs2=/usr/bin/apxs2 
$ phpbrew switch php-5.6.22 
$ sudo service apache2 restart 

私のブラウザ(phpinfo();)とCLIの両方が、今アクティブなバージョンとして、5.6.22を示します! jimsmith :)

関連する問題