HHVM + MediaWiki How to configure?

Source: Internet
Author: User
Keywords Php hhvm mediawiki nginx
Tags hhvm mediawiki
Environment: Debian 8 64bit,openresty (Nginx enhanced version) 1.9.7.4,HHVM 3.13.1,mediawiki 1.26.2 Latest Version
Problem encountered: HHVM cannot parse php5, the browser will download directly. (e.g. when visiting the Wiki homepage)
Related configuration:

/etc/hhvm/php.ini

; php optionssession.save_handler = redissession.save_path = "tcp://localhost:6379"session.gc_maxlifetime = 1440memory_limit = 256M; hhvm specifichhvm.log.level = Warninghhvm.log.always_log_unhandled_exceptions = truehhvm.log.runtime_error_reporting_level = 8191hhvm.mysql.typed_results = false

/etc/hhvm/server.ini

; php optionspid = /var/run/hhvm/pid; hhvm specifichhvm.server.port = 9000hhvm.server.user = wwwhhvm.server.group = wwwhhvm.server.type = fastcgihhvm.server.default_document = index.php,index.php5hhvm.log.use_log_file = truehhvm.log.file = /var/log/hhvm/error.loghhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc

/etc/nginx/hhvm.conf

location ~ \.(hh|php5|php)$ {    fastcgi_keep_conn on;    fastcgi_pass   127.0.0.1:9000;    fastcgi_index  index.php;    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;    include        fastcgi_params;}

/etc/nginx/nginx.conf

省略多余部分include servers.conf

/etc/nginx/servers.conf

server{    listen   80;    server_name   baike.mpcblab.com;    root   /var/www/html/baike;    index  index.php index.php5 index.html index.htm;    set_real_ip_from  127.0.0.1;    real_ip_header    X-Forwarded-For;    #limit_conn perip 3;    #limit_conn perserver 20;    #limit_rate 1024k;    location /    {    #   rewrite ^/([^?]*)(?:\?(.*))? /index.php5?title=$1&$2 last; //就是这行,注释了能访问,不注释就不会解析而是直接下载,但调用.php5文件的地方,比如“特殊页面:版本”还是会直接下载    }        include  hhvm.conf;}

Other Web services are working normally no problem, only MediaWiki.

Reply content:

Environment: Debian 8 64bit,openresty (Nginx enhanced version) 1.9.7.4,HHVM 3.13.1,mediawiki 1.26.2 Latest Version
Problem encountered: HHVM cannot parse php5, the browser will download directly. (e.g. when visiting the Wiki homepage)
Related configuration:

/etc/hhvm/php.ini

; php optionssession.save_handler = redissession.save_path = "tcp://localhost:6379"session.gc_maxlifetime = 1440memory_limit = 256M; hhvm specifichhvm.log.level = Warninghhvm.log.always_log_unhandled_exceptions = truehhvm.log.runtime_error_reporting_level = 8191hhvm.mysql.typed_results = false

/etc/hhvm/server.ini

; php optionspid = /var/run/hhvm/pid; hhvm specifichhvm.server.port = 9000hhvm.server.user = wwwhhvm.server.group = wwwhhvm.server.type = fastcgihhvm.server.default_document = index.php,index.php5hhvm.log.use_log_file = truehhvm.log.file = /var/log/hhvm/error.loghhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc

/etc/nginx/hhvm.conf

location ~ \.(hh|php5|php)$ {    fastcgi_keep_conn on;    fastcgi_pass   127.0.0.1:9000;    fastcgi_index  index.php;    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;    include        fastcgi_params;}

/etc/nginx/nginx.conf

省略多余部分include servers.conf

/etc/nginx/servers.conf

server{    listen   80;    server_name   baike.mpcblab.com;    root   /var/www/html/baike;    index  index.php index.php5 index.html index.htm;    set_real_ip_from  127.0.0.1;    real_ip_header    X-Forwarded-For;    #limit_conn perip 3;    #limit_conn perserver 20;    #limit_rate 1024k;    location /    {    #   rewrite ^/([^?]*)(?:\?(.*))? /index.php5?title=$1&$2 last; //就是这行,注释了能访问,不注释就不会解析而是直接下载,但调用.php5文件的地方,比如“特殊页面:版本”还是会直接下载    }        include  hhvm.conf;}

Other Web services are working normally no problem, only MediaWiki.

Self-addressed, reference Official document: HHVM DOC
In Server.ini Plus: Restart hhvm.php_file.extensions["php5"] = ".php5" hhvm.

Why not use PHP7, hurriedly abandon hhvm ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.