[mythtv-users] mythweb - 0.28 - partially displayed page only

Mark Perkins perkins1724 at hotmail.com
Mon Feb 20 11:00:57 UTC 2017


I'm struggling to get mythweb working. I will admit it is not a standard setup but hoping someone might be able to at least point me in the right direction.

Running MythTV 0.28/fixes updated a few months ago. Everything else on the system has been working fine for best part of 12months but I do a lot of tinkering on it. Host OS is Centos 7. Selinux is enabled. Nginx for the web server and mariadb for the database. php-fpm version 5.4.16. But pretty sure the problem is in my config and not the code.

I have got it to the point where I have a file info.php in the base directory of mythweb (next to mythweb.php) that has the stock test phpinfo() line for testing. And that works fine if I browse to the site/file I get the php version and dump of config as expected. So I am moderately confident that I have got a basic nginx / php-fpm setup working.

cat info.php
<?php phpinfo(); ?>

But if I browse to mythweb.php I get the default full screen mythweb navy blue background, I get two mythtv icons in the top left corner both of which are hyperlinked to http://mythweb.server.ip:port/mythweb_0_28/ and which loop back to the exact same page. But nothing else. Other than a bunch of html code doing not much it is a blank page.

Nginx error log shows nothing.
Nginx access log shows the requests as expected

tail -f /var/log/nginx/access.log
192.168.1.ZZZ - - [20/Feb/2017:20:31:16 +1030] "GET /mythweb_0_28/mythweb.php HTTP/1.1" 200 7323 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
192.168.1.ZZZ - - [20/Feb/2017:20:31:41 +1030] "GET /mythweb_0_28/ HTTP/1.1" 200 7323 "http://192.168.1.XXX/mythweb_0_28/mythweb.php" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

php-fpm error.log and www-error.log show nothing.
Disabling firewalld and selinux doesn't change anything.

I feel at this point that I have somehow managed to completely stuff my web setup. But I cant work out how or where.

The last 'piece' I 'fixed' was a javascript error whereby parameter recommend_enabled was not set. I checked in my database and found that the value of data for this setting was empty so I changed it to a 0. That made the javascript error go away but didn't appear to materially change anything else.

select * from settings where value="recommend_enabled"\G
*************************** 1. row ***************************
   value: recommend_enabled
    data: 0
hostname: NULL
1 row in set (0.00 sec)

But I wonder whether this actually meant that I have something else fundamentally misconfigured. The missing data value (I assume) worked fine when this was an 0.27 system on a different machine.
Most of my effort to this point has been trying to get nginx / php-fpm and various redirects working. But given I can actually get the start of a page (and info.php) I think I have got that setup part right.

My question is - where do I go next to try and debug this further and work out what is wrong? The nginx and php-fpm logs are giving me nothing to work with. The only lead I can see at this stage is that the html page (below) appears to be duplicated but I have not managed to wrap my head around what that might actually mean. Given that there was a javascript error maybe I have a java version incompatibility?

Any assistance or advice greatly appreciated.




Some config files for reference:
nginx.conf
cat /etc/nginx/nginx.conf
**************
# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
#        log_format scripts '$fastcgi_script_name > $request_filename';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
#    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled.d/*.conf;

#    server {
#        listen       80 default_server;
#        listen       [::]:80 default_server;
#        server_name  _;
#        root         /usr/share/nginx/html;
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        location / {
#        }
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }
}
**************



mythweb_0_28.conf file:
cat /etc/nginx/sites-enabled.d/mythweb_0_28.conf
**************
##
# mythweb configuration for nginx and php-fpm
#
# please modify before use
##

server {
        # If you want to run a non-SSL connection change this to 80
#        listen 443;
        listen 18082 default;
        listen [::]:18082 default;


        # Set up the document root to where mythweb is located
#        root /usr/share/nginx/mythweb_0_28;
        root /usr/share/nginx;
        index index.html index.htm;
#        access_log /var/log/nginx/access.log scripts;

        # Hostname of the server running mythweb
#        server_name localhost;

        # If you want to run a non-SSL connection comment out this block
#       ssl on;
#       ssl_certificate certs/server.crt;
#       ssl_certificate_key certs/server.key;

        # Configure this section for HTTP Basic Auth
        location / {
#               auth_basic "MythWeb";
#               auth_basic_user_file mythweb.passwd;
                index $request_uri/mythweb.php;
                try_files $uri @handler $request_uri/mythweb.php;
        }

        # Sets up the pass-through to php-fpm
        location ~ \.php {
                include         fastcgi_params;
                fastcgi_index   mythweb.php;
                fastcgi_split_path_info ^(.+\.php)(/?.+)$;
                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param   PATH_INFO $fastcgi_path_info;
                fastcgi_param   db_server AAAAAAAAAAAAAAA;
                fastcgi_param   db_name  BBBBBBBBBBBBBBB;
                fastcgi_param   db_login CCCCCCCCCCCCCCC;
                fastcgi_param   db_password DDDDDDDDDDDDDD;
                fastcgi_param   PHP_VALUE  "include_path=/usr/local/mythtv_0_28/share/mythtv/bindings/php/";
#               fastcgi_pass    unix:/var/run/php5-fpm.sock;
                fastcgi_pass 127.0.0.1:9000;
        }

        # Required rewrite rules
        location @handler {
                rewrite /(.+\.(php|pl))/.*      /$1 last;
                rewrite /(pl(/.*)?)$            /mythweb.pl/$1 last;
                rewrite /(.+)$                  /mythweb.php/$1 last;
                rewrite /(.*)$                  /mythweb.php last;
        }
}
**************


Html dump of the page that actually gets sent when browsing mythweb.php
**************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    <base href="http://192.168.1.XXX/mythweb_0_28/">
    <title></title>

    <link rel="icon"          href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/favicon.ico" type="image/x-icon">
    <link rel="shortcut icon" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/favicon.ico" type="image/x-icon">

    <link rel="apple-touch-icon" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/apple-touch-icon.png" />
    <link rel="apple-touch-icon" sizes="72x72" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/apple-touch-icon-72x72.png" />
    <link rel="apple-touch-icon" sizes="114x114" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/apple-touch-icon-114x114.png" />

    <link type="application/opensearchdescription+xml" rel="search" href="tv/opensearch?type=xml" title="MythTV">

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="robots" content="noindex, nofollow">

    <script type="text/javascript">
        <!--
        // -----------------------------------------------------------------------------
        // Globals
        // Major version of Flash required
        var requiredMajorVersion = 9;
        // Minor version of Flash required
        var requiredMinorVersion = 0;
        // Minor version of Flash required
        var requiredRevision = 0;
        // -----------------------------------------------------------------------------
        // -->
    </script>
		

    <link rel="stylesheet" type="text/css" href="js/prototip/prototip.css">
    <link rel="stylesheet" type="text/css" href="js/dialog/dialog.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//style.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//header.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//menus.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//programming.css">


    <script type="text/javascript" src="js/prototype.js"></script>
	
	<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript"> jQuery.noConflict(); </script>
	
    <script type="text/javascript" src="js/prototip/prototip.js"></script>
    <script type="text/javascript" src="js/dialog/dialog.js"></script>
	
    <script type="text/javascript" src="js/utils.js"></script>
    <script type="text/javascript" src="js/AC_OETags.js"></script>
    <script type="text/javascript" src="js/table_sort.js"></script>

    <script type="text/javascript">
        <!--
        // -----------------------------------------------------------------------------
        // - Setup variables for use with the recommend engines
        // -----------------------------------------------------------------------------
        var recommend_enabled   = 0;
        var recommend_server    = "http://myth-recommendations.aws.af.cm/";
        var recommend_key       = "REQUIRED";
        // -->
    </script>
	<script type="text/javascript" src="js/recommend.js"></script>
	

</head>

<body>

<div id="page_header" class="clearfix">
    <div id="logo_box">
        <a id="mythtv_logo" href="http://192.168.1.XXX/mythweb_0_28/">
        <img src="http://192.168.1.XXX/mythweb_0_28/skins/default/img/mythtv-logo.png" alt="MythTV" class="alpha_png">
        </a>
    </div>
    <div id="sections">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    <base href="http://192.168.1.XXX/mythweb_0_28/">
    <title></title>

    <link rel="icon"          href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/favicon.ico" type="image/x-icon">
    <link rel="shortcut icon" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/favicon.ico" type="image/x-icon">

    <link rel="apple-touch-icon" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/apple-touch-icon.png" />
    <link rel="apple-touch-icon" sizes="72x72" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/apple-touch-icon-72x72.png" />
    <link rel="apple-touch-icon" sizes="114x114" href="http://192.168.1.XXX/mythweb_0_28/skins/default/img/apple-touch-icon-114x114.png" />

    <link type="application/opensearchdescription+xml" rel="search" href="tv/opensearch?type=xml" title="MythTV">

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="robots" content="noindex, nofollow">

    <script type="text/javascript">
        <!--
        // -----------------------------------------------------------------------------
        // Globals
        // Major version of Flash required
        var requiredMajorVersion = 9;
        // Minor version of Flash required
        var requiredMinorVersion = 0;
        // Minor version of Flash required
        var requiredRevision = 0;
        // -----------------------------------------------------------------------------
        // -->
    </script>
		

    <link rel="stylesheet" type="text/css" href="js/prototip/prototip.css">
    <link rel="stylesheet" type="text/css" href="js/dialog/dialog.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//style.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//header.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//menus.css">
    <link rel="stylesheet" type="text/css" href="http://192.168.1.XXX/mythweb_0_28/skins/default//programming.css">


    <script type="text/javascript" src="js/prototype.js"></script>
	
	<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript"> jQuery.noConflict(); </script>
	
    <script type="text/javascript" src="js/prototip/prototip.js"></script>
    <script type="text/javascript" src="js/dialog/dialog.js"></script>
	
    <script type="text/javascript" src="js/utils.js"></script>
    <script type="text/javascript" src="js/AC_OETags.js"></script>
    <script type="text/javascript" src="js/table_sort.js"></script>

    <script type="text/javascript">
        <!--
        // -----------------------------------------------------------------------------
        // - Setup variables for use with the recommend engines
        // -----------------------------------------------------------------------------
        var recommend_enabled   = 0;
        var recommend_server    = "http://myth-recommendations.aws.af.cm/";
        var recommend_key       = "REQUIRED";
        // -->
    </script>
	<script type="text/javascript" src="js/recommend.js"></script>
	

</head>

<body>

<div id="page_header" class="clearfix">
    <div id="logo_box">
        <a id="mythtv_logo" href="http://192.168.1.XXX/mythweb_0_28/">
        <img src="http://192.168.1.XXX/mythweb_0_28/skins/default/img/mythtv-logo.png" alt="MythTV" class="alpha_png">
        </a>
    </div>
    <div id="sections">
**************


More information about the mythtv-users mailing list