#Virtual Machine **Shell** login: vagrant pass: vagrant **TYPO3 backend** login: admin pass: password **TYPO3 installtool** pass: password ##Paths ===== /var/www/site/ /var/www/site/app /var/www/site/web - webroot ###Configuration and ports: ======================== Host Machine: 9080 PHP-FPM \url{http://site.local/} 9081 HHVM \url{http://hiphop.site.local/} \url{http://hiphop-fpm.site.local/} HipHop VM Ubuntu 14.04 192.168.66.66 hiphop-fpm.site.local hiphop.site.local site.local 192.168.56.1 forwarded\_port, guest: 80, host: 9080 forwarded\_port, guest: 81, host: 9081 **Host only config:** In global settings create new host only adapter with IP address 192.168.66.1 Set this adapter in the VM network settings **/etc/hosts config:** 192.168.66.66 site.local hiphop.site.local hiphop-fpm.site.local Restarting services ###500 BAD Gateway: sudo service hhvm restart Nginx 80 PHP-FPM :9003 HHVM :9000 ============ ##Links ============ \url{http://hhvm.com/} \url{http://hhvm.com/frameworks} (27 Frameworks at 100%) \url{https://github.com/facebook/hhvm/wiki/FastCGI} \url{https://github.com/facebook/hhvm/wiki/Building-and-installing-HHVM-on-Ubuntu-14.04} How to run unit tests on hhvm \url{http://blog.macopedia.co/post/running-typo3-cms-on-hhvm-part2/} Tests: 7-9times faster \url{http://www.ph-bergsmann.com/typo3/2014/04/04/typo3-hhvm-speed-comparison/} \url{http://blog.snowflake.ch/2014/04/14/showdown-hhvm-vs-php5-fcgi-vs-php5-fpm/} nginx config \url{http://fedir.github.io/web/2014/04/17/running-typo3-on-hhvm/} =================== ##Debug options for HHVM =================== vim /etc/hhvm/php.ini hhvm.mysql.typed\_results = false hhvm.log.level = Verbose hhvm.log.no\_silencer = true hhvm.log.header = true hhvm.log.injected\_stackTrace = true hhvm.log.always\_log\_unhandled\_exceptions = true hhvm.log.runtime\_error\_reporting\_level = 8191 hhvm.log.use\_log\_file = true hhvm.log.use\_sys\_log = false hhvm.log.File = /var/log/hhvm/error.log sudo service hhvm restart The log will be in /var/log/hhvm/error.log ##Hacking challenges ================== 1. Unit tests compatibility 2. Functional tests compatibility 3. Install tool 4. Backend 5. Frontend 6. Including TYPO3 test suite into HHVM parity checking (CentOS) * Compiling HHVM: \url{https://github.com/facebook/hhvm/wiki/Building-and-installing-HHVM-on-CentOS-6.4#getting-hhvm} * Install precompiled HHVM: \url{https://github.com/facebook/hhvm/wiki/HHVM-Pre-built-packages-for-Centos-6.4} 7. Better server setup? 8. documentation / vagrant 9. ??? ##Nginx 500 Bad Gateway ##================== Restart hhvm when you encounter a 500 Bad Gateway error: sudo service hhvm restart ##Debugging: /tmp/stacktrace... strace -o /tmp/output.txt -f -r -s4096 -p 167842 using GDB \url{http://labs.qandidate.com/blog/2013/10/29/debugging-php-applications-with-hhvm/} \url{http://miles-by-motorcycle.com/fv-b-8-657/configuring-and-using-the-hiphopvm--hhvm--remote-debugger} \url{http://hhvm.com/blog/4601/debug-packages} ##Update TYPO3 source ##================= cd /var/www/site/web/typo3; git stash; git pull; git stash pop; Or in a one-liner: git stash; git pull; git stash pop ##Unit tests ##=========== hhvm ./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml ERROR when running the tests with hhvm from shell: "Fatal error: unexpected St13runtime\_error: locale::facet::\_S\_create\_c\_locale name not valid" in this case you have to change language configuration by $ LC\_CTYPE="en\_US.UTF-8" $ LC\_ALL="en\_US.UTF-8" Then the test should run. ## Some vsfStream tests are failing because streamWrapper::stream\_lock is not supported on hhvm. We can skip the vfsStream tests using that: \url{https://github.com/mikey179/vfsStream/pull/82} ##Functional Tests ##================ hhvm ./bin/phpunit -c typo3/sysext/core/Build/FunctionalTests.xml making functional tests run faster \url{https://gist.github.com/foertel/9485731} The Functional Tests run 100% with 0 errors. OK, but incomplete, skipped, or risky tests! Tests: 666, Assertions: 10350, Incomplete: 10, Skipped: 4. ##HHVM Frontend ##=========== Statment-Query: SELECT * FROM be\_sessions,be\_users WHERE be\_sessions.ses\_id = :ses\_id AND be\_sessions.ses\_name = :ses\_name AND be\_sessions.ses\_userid = be\_users.uid AND (be\_sessions.ses\_iplock = :ses\_iplock OR be\_sessions.ses\_iplock='[DISABLED]') AND be\_sessions.ses\_hashlock=222419149 AND be\_users.pid=0 AND be\_users.disable=0 AND be\_users.deleted=0 AND (be\_users.starttime<=1403344743) AND (be\_users.endtime=0 OR be\_users.endtime>1403344743) Bind Values for example: ses\_id: 98a360e1ffb07a0a4e0339cd34a6f770 ses\_name: be\_typo\_user ses\_iplock: 127.0.0.1 \url{https://forge.typo3.org/issues/59771} ##HHVM Github issues \url{https://github.com/facebook/hhvm/issues/3008} (inconsistend mkdir warning behavior)
{}