-2

I have used ubuntu 14.04 and use laravel. I have installed nginx with hhvm as below:

$ php -v 

HipHop VM 3.14.1 (rel) Compiler: tags/HHVM-3.14.1-0-gd99b370804b7e0234ab794869d1ba1774c848e85 Repo schema: ac0c6851ba5643ce00ae67bbe67c50973efd65d6

I got as above. Then I tried to install composer on my home directory

$ curl -sS https://getcomposer.org/installer | php 

All settings correct for using Composer

Downloading 1.1.3...
Fatal error: Uncaught TypeError: Argument 1 passed to unserialize() must be an instance of string, null given in /tmp/php-wrap-xpYu3V:586 
Stack trace:

0 (): unserialize()
1 (): __SystemLib\PharArchiveHandler->parsePhar()
2 (): __SystemLib\PharArchiveHandler->__construct()
3 /tmp/php-wrap-xpYu3V(586): Phar->__construct()
4 /tmp/php-wrap-xpYu3V(55): installComposer()
5 /tmp/php-wrap-xpYu3V(13): process()
6 {main}

I got error like that.

However,

If I chose php7.0, and download composer, it will work fine. however whenever I install hhvm and run it with nginx, It gives like:

$ composer

Fatal error: Uncaught TypeError: Argument 1 passed to unserialize() must be an instance of string, null given in /usr/local/bin/composer:23 Stack trace:

0 (): unserialize()
1 (): __SystemLib\PharArchiveHandler->parsePhar()
2 (): __SystemLib\PharArchiveHandler->__construct()
3 (): Phar->__construct()
4 /usr/local/bin/composer(23): Phar::mapPhar()
5 {main}

Is there any idea?

Thanks,

olibiaz
  • 2,551
  • 4
  • 29
  • 31
Danny hax
  • 1
  • 1

1 Answers1

0

I think I got it.

hhve 3.14 with php7 version isn't properly working.

I added hhvm.php7.all = true in /etc/hhvm/php.ini that gives php7 then it isn't stable, If i use hhvm with php5, all working fine. just remove that hhvm.php7.all = true, it will turn to php5 with hhvm.

Don't rely on too much with hhvm+php7 option, there are many benchmarks saying php7 with opcache use (JIT compilation) is slightly faster than hhvm. even laravel, wp, and drupal.

Also hhvm with composer excution is a lot slower than it is with php7.

Danny hax
  • 1
  • 1