Hi I have install HHVM whit help off the guide from this topic https://www.howtoforge.com/community/threads/hhvm-hiphop-with-ispconfig.65273/ that croydon have posted but when i switch to HHVM in the control panel and add this cod in a php file: echo defined('HHVM_VERSION')?'Using HHVM':'Not using HHVM'; then it give me the information that i am not using HHVM. Have anyone else get it to work?
Here you have the code. What is wrong? PHP: <Directory /var/www/klotrullarna.se> AllowOverride None Require all denied </Directory><VirtualHost *:80> DocumentRoot /var/www/clients/client0/web2/web ServerName klotrullarna.se ServerAlias *.klotrullarna.se ServerAdmin webmaster@klotrullarna.se ErrorLog /var/log/ispconfig/httpd/klotrullarna.se/error.log Alias /error/ "/var/www/klotrullarna.se/web/error/" ErrorDocument 400 /error/400.html ErrorDocument 401 /error/401.html ErrorDocument 403 /error/403.html ErrorDocument 404 /error/404.html ErrorDocument 405 /error/405.html ErrorDocument 500 /error/500.html ErrorDocument 502 /error/502.html ErrorDocument 503 /error/503.html <IfModule mod_ssl.c> </IfModule> <Directory /var/www/klotrullarna.se/web> # Clear PHP settings of this website <FilesMatch ".+\.ph(p[345]?|t|tml)$"> SetHandler None </FilesMatch> Options +FollowSymLinks AllowOverride All Require all granted </Directory> <Directory /var/www/clients/client0/web2/web> # Clear PHP settings of this website <FilesMatch ".+\.ph(p[345]?|t|tml)$"> SetHandler None </FilesMatch> Options +FollowSymLinks AllowOverride All Require all granted </Directory> <IfModule mod_fastcgi.c> <Directory /var/www/clients/client0/web2/cgi-bin> Require all granted </Directory> <FilesMatch "\.php[345]?$"> SetHandler php5-fcgi </FilesMatch> Action php5-fcgi /php5-fcgi Alias /php5-fcgi /var/www/clients/client0/web2/cgi-bin/php5-fcgi-*-80-klotrullarna.se FastCgiExternalServer /var/www/clients/client0/web2/cgi-bin/php5-fcgi-*-80-klotrullarna.se -idle-timeout 300 -socket /var/run/hhvm/hhvm.web2.sock -pass-header Authorization </IfModule> # add support for apache mpm_itk <IfModule mpm_itk_module> AssignUserId web2 client0 </IfModule> <IfModule mod_dav_fs.c> # Do not execute PHP files in webdav directory <Directory /var/www/clients/client0/web2/webdav> <ifModule mod_security2.c> SecRuleRemoveById 960015 SecRuleRemoveById 960032 </ifModule> <FilesMatch "\.ph(p3?|tml)$"> SetHandler None </FilesMatch> </Directory> DavLockDB /var/www/clients/client0/web2/tmp/DavLock # DO NOT REMOVE THE COMMENTS! # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE! # WEBDAV BEGIN # WEBDAV END </IfModule>Alias /awstatsclasses "/usr/share/awstats/lib/"Alias /awstats-icon "/usr/share/awstats/icon/"Alias /awstatscss "/usr/share/doc/awstats/examples/css"php_flag xcache.cacher Offphp_flag xcache.cacher 0php_flag xcache.stat Offphp_flag xcache.optimizer Off</VirtualHost>
yes it is installed: root@server:/home/tokar86a# apt-get install libapache2-mod-fastcgi Reading package lists... Done Building dependency tree Reading state information... Done libapache2-mod-fastcgi is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@server:/home/tokar86a# a2enmod fastcgi Module fastcgi already enabled Whats next? Its look like the process for hhvm is running: /usr/bin/hhvm --mode daemon -vServer.Type=fastcgi --user web2 -vServer.FileSocket=/var/run/hhvm/hhvm.web2.sock -vLog.Level=Warning -vLog.UseLogFile=false -vRepo.Central.Path=/var/run/hhvm/hhvm.web2.hhbc -vPidFile=/var/run/hhvm/hhvm_web2.pid
Okay, after a second look at the vhost I think that the hhvm patch is not compatible with the latest ISPConfig 3.0.5 patch version. You would have to change something in the vhost file (or the vhost master template) to make it work again. Code: <FilesMatch "\.php[345]?$"> SetHandler php5-fcgi </FilesMatch> this must be changed to Code: <Directory /var/www/klotrullarna.se/web> <FilesMatch "\.php[345]?$"> SetHandler php5-fcgi </FilesMatch> </Directory> <Directory /var/www/clients/client0/web2/web> <FilesMatch "\.php[345]?$"> SetHandler php5-fcgi </FilesMatch> </Directory> Why that? In one of the latest patch releases of ISPConfig a fix was implemented that prevented some misbehaviour in apache/php. The SetHandle none some lines above is more specific (inside a directory tag) so it overrides the less specific SetHandler for hhvm that is not inside a directory tag.
I dont think i understand to 100% what you wont me to change? Is this right? PHP: <Directory /var/www/klotrullarna.se> AllowOverride None Require all denied </Directory><VirtualHost *:80> DocumentRoot /var/www/clients/client0/web2/web ServerName klotrullarna.se ServerAlias *.klotrullarna.se ServerAdmin webmaster@klotrullarna.se ErrorLog /var/log/ispconfig/httpd/klotrullarna.se/error.log Alias /error/ "/var/www/klotrullarna.se/web/error/" ErrorDocument 400 /error/400.html ErrorDocument 401 /error/401.html ErrorDocument 403 /error/403.html ErrorDocument 404 /error/404.html ErrorDocument 405 /error/405.html ErrorDocument 500 /error/500.html ErrorDocument 502 /error/502.html ErrorDocument 503 /error/503.html <IfModule mod_ssl.c> </IfModule> <Directory /var/www/klotrullarna.se/web> # Clear PHP settings of this website <FilesMatch ".+\.ph(p[345]?|t|tml)$"> SetHandler None </FilesMatch> Options +FollowSymLinks AllowOverride All Require all granted </Directory> <Directory /var/www/clients/client0/web2/web> # Clear PHP settings of this website <FilesMatch ".+\.ph(p[345]?|t|tml)$"> SetHandler None </FilesMatch> Options +FollowSymLinks AllowOverride All Require all granted </Directory> <IfModule mod_fastcgi.c> <Directory /var/www/clients/client0/web2/cgi-bin> Require all granted </Directory> <Directory /var/www/klotrullarna.se/web><FilesMatch "\.php[345]?$"> SetHandler php5-fcgi</FilesMatch></Directory><Directory /var/www/clients/client0/web2/web><FilesMatch "\.php[345]?$"> SetHandler php5-fcgi</FilesMatch></Directory> Action php5-fcgi /php5-fcgi Alias /php5-fcgi /var/www/clients/client0/web2/cgi-bin/php5-fcgi-*-80-klotrullarna.se FastCgiExternalServer /var/www/clients/client0/web2/cgi-bin/php5-fcgi-*-80-klotrullarna.se -idle-timeout 300 -socket /var/run/hhvm/hhvm.web2.sock -pass-header Authorization </IfModule> # add support for apache mpm_itk <IfModule mpm_itk_module> AssignUserId web2 client0 </IfModule> <IfModule mod_dav_fs.c> # Do not execute PHP files in webdav directory <Directory /var/www/clients/client0/web2/webdav> <ifModule mod_security2.c> SecRuleRemoveById 960015 SecRuleRemoveById 960032 </ifModule> <FilesMatch "\.ph(p3?|tml)$"> SetHandler None </FilesMatch> </Directory> DavLockDB /var/www/clients/client0/web2/tmp/DavLock # DO NOT REMOVE THE COMMENTS! # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE! # WEBDAV BEGIN # WEBDAV END </IfModule>Alias /awstatsclasses "/usr/share/awstats/lib/"Alias /awstats-icon "/usr/share/awstats/icon/"Alias /awstatscss "/usr/share/doc/awstats/examples/css"php_flag xcache.cacher Offphp_flag xcache.cacher 0php_flag xcache.stat Offphp_flag xcache.optimizer Off</VirtualHost> Is this something that you are going to fix so it working in the main release 3.1?
Yes, the changed vhost file should be okay, I think. In master branch the hhvm support is working (at least for me), but I cannot tell you if it makes it into 3.1 stable because of some problems that hhvm itself has in fastcgi mode (e. g. https://github.com/facebook/hhvm/issues/2570).
You mean this one? /usr/bin/hhvm --mode daemon -vServer.Type=fastcgi --user web2 -vServer.FileSocket=/var/run/hhvm/hhvm.web2.sock -vLog.Level=Warning -vLog.UseLogFile=false -vRepo.Central.Path=/var/run/hhvm/hhvm.web2.hhbc -vPidFile=/var/run/hhvm/hhvm_web2.pid Yes that one is running.
Hy, In my case the problem with the file, which will be downloaded was happen, because the orginal hhvm process was running too. After I stop this process and restart hhvm_web* the page was shown. But: You also need to apply this, to get hhvm running perfectly: http://git.ispconfig.org/ispconfig/ispconfig3/commit/92bc7d781d2941027ec2cdfc4942a8265f4aa910 (After this you should recreate the vhost template by set the php mode to Mod-PHP and back to HHVM) @marius: Thanks for the tip to add the <directory Tags to the vhost.master. I didn't recognize the inherit effect. Stefan