[mythtv-users] alt lightweight web servers for MythTV?

George Nassas gnassas at mac.com
Wed Apr 15 12:53:59 UTC 2015


On Apr 15, 2015, at 1:27 AM, James Miller <gajs-f0el at dea.spamcon.org> wrote:

> <b>Deprecated</b>:  mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in <b>/var/www/localhost/htdocs/mythweb/test.php</b> on line <b>2</b><br />

Oh darn, shows how long it has been since I wrote any php. How about the new way:

<?php
  try {
    $db = new PDO('mysql:host=localhost;dbname=mythconverg;charset=utf8', 'mythtv', 'mythtv');
  } catch (PDOException $e) {
    echo 'Connection failed: ' . $e->getMessage();
  }
?>

> I'm a bit confused about the matter of login credentials for MythWeb. I did create an mythweb.passwd file, placed it in /etc/nginx and put into it in the login credentials for my mythtv user. But I am unclear on what that file actually does since, in my past experience, navigating to MythWeb has never involved entering any credentials. So I suppose my lack of comprehension on this score could mean a likelihood of some problem in this area.

Hmm, mythweb.passwd is not for the mysql password, it’s for the password users give when they browse to mythweb. In the past people have set up their routers so connections from the open internet would get forwarded to their mythweb and they could browse and schedule shows from anywhere. So far so good but eventually a search engine crawler would find their router and follow every link within including the one beside each show saying ‘delete this’ and they’d lose all their recordings. The mythweb.passwd is supposed to prevent that, it’s optional for a non-public installation.

I have mysql credentials in the nginx config for the site like this:

    fastcgi_param   db_server localhost;
    fastcgi_param   db_name  mythconverg;
    fastcgi_param   db_login mythtv;
    fastcgi_param   db_password mythtv;

they go in the same stanza that has “fastcgi_pass” unless I’m behind the times on that too. It could be mythweb is connecting without any credentials but I thought here was a specific test for that and a helpful error message. Redoing the curl test.php should give some useful info.

- George


More information about the mythtv-users mailing list