Feature #7472

Support HHVM as an engine to replace PHP

Added by Jérôme Warnier about 8 years ago. Updated about 7 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Spent time:
SCRUM pts - complexity:


HHVM ( is an alternate engine to run PHP applications, notably used by Facebook, and which offers much better performances than official PHP engine in most cases.
Try to have Chamilo run on it without failure, and maybe even support it officially.
This could help making Chamilo more performant, and certainly more universal, and maybe unveil otherwise unnoticed bugs.

This might be related to supporting PHP 7.0 planned for end of 2015.



Updated by Yannick Warnier about 8 years ago

This is a very very complex process at the moment, because HHVM is relatively more strict than PHP.
Supporting PHP7 should, indeed, help us in the process. At the moment, given the more than 700,000 lines of code in PHP, it is unlikely we will be able to support it anytime soon.
Maybe the Chamilo LMS 2.0 rewrite will help in this process as well.


Updated by Jérôme Warnier almost 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Jérôme Warnier
  • Target version set to 2.0

I will give it a try myself, and report my initial findings here.


Updated by Erick Ocrospoma over 7 years ago

Hi, I will be very glad to help with this. I will be testing it too, any additional info/update please let me know, or share it here.


Updated by Jérôme Warnier over 7 years ago

  • Description updated (diff)

Installation instructions for HHVM:

Specifics to Jessie:

Sadly, HHVM only has a compiler for AMD64, so there are only packages for this architecture, which significantly restricts our options for testing it (exit old PCs, and Raspberry Pi).


Updated by Jérôme Warnier over 7 years ago

Repository for PHP7 packages for Debian Jessie:


Updated by Yannick Warnier over 7 years ago

It's actually easer to test it with docker (

docker run --name myphp7 -it php:7-apache bash
apt-get update
apt-get install wget mysql-server mysql-client vim
service mysql start
mysql -u root -p [pass]
> grant all privileges on chamilo.* to chamilo@localhost identified by 'chamilo';
> create database chamilo;
> flush privileges;
> exit
cd /var/www
tar zxf v1.10.0-alpha.tar.gz
mv chamilo-lms-1.10.0-alpha/ chamilo
cd /etc/apache2/sites-available/
cp 000-default.conf chamilo.conf
# contents of chamilo.conf:
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/chamilo
    ErrorLog ${APACHE_LOG_DIR}/chamilo-error.log
    CustomLog ${APACHE_LOG_DIR}/chamilo-access.log combined
        <Directory />
            Options FollowSymLinks
            AllowOverride None
        <Directory /var/www/chamilo>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
php_admin_value date.timezone "Europe/Paris" 
# end of contents of chamilo.conf
a2ensite chamilo.conf
a2enmod rewrite
service apache2 restart
# In order for Chamilo to work, you need more PHP extensions 
# than what comes with the php7 docker container, and you
# cannot install them with apt-get because these would be from PHP5
# (the Ubuntu packages) so you need to do this:
apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev
docker-php-ext-install intl pdo_mysql gd
# Also, there is a small issue in this version of Chamilo that requires the mysql extension when pdo_mysql is perfectly fine:
cd /var/www/chamilo
vim main/install/install.lib.php + 715 (change 'mysql' for 'pdo_mysql')
# and change permissions...
chown -R www-data:www-data app main/default_course_document/images/ main/lang/ web
# Finally, add to the container's /etc/hosts (end of first line)
# because the server will check if it can access the course at that direction
vim /etc/hosts
# In another terminal on the host machine:
docker inspect myphp7 | grep IPAddress
# add the IP as in the host's /etc/hosts
# Now load in your browser
# NOTE: YOU HAVE TO USE as host on the database config page! (sockets will not work with the default MySQL installation)


Updated by Yannick Warnier over 7 years ago

So apart from a small warning at the end of the installer:

Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /var/www/chamilo/vendor/symfony/security/Core/Encoder/BCryptPasswordEncoder.php on line 81

Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /var/www/chamilo/vendor/symfony/security/Core/Encoder/BCryptPasswordEncoder.php on line 81

and the pdo_mysql issue, everything seems to work quite smoothly...


Updated by Yannick Warnier over 7 years ago

Support for HHVM seems a little bit more complex, so I will not delve into it for now:
(also there's no official hhvm image, so I picked the one with the most pulls)


Updated by Yannick Warnier over 7 years ago

  • % Done changed from 0 to 10

Updated by Yannick Warnier about 7 years ago

  • Target version changed from 2.0 to 3.0

Also available in: Atom PDF