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

George Nassas gnassas at mac.com
Sat Apr 18 21:43:48 UTC 2015


> On Apr 18, 2015, at 3:47 PM, James Miller <gajs-f0el at dea.spamcon.org> wrote:
> 
> * All database connections should now go through this object.
> *
> * @global  Database    $GLOBALS['db']
> * @name    $db
> /**/
>    global $db;
> 
> Your suggestion, then, is to just leave that as-is and add $GLOBALS[‘db’] = $db; to the end of that file, right? And if that doesn't resolve anything, then just leave that revision in place and edit utils.php (utils, not util, on this system) as indicated, correct?

Yes. You can also add a comment after the semicolon (comments start with //) with some unique text to know what you changed in case you have to back it out.

> * @return string The value (settings.data) associated with $field and $hostname.
> /**/
>    function setting($field, $hostname=null, $new_value = "old\0old", $clearSettingsCache = true) {
>        global $db;
>        static $cache = array();
> 
> So, I'll be replacing that "global $db;" line with $db = $GLOBALS[‘db’]; --including the semicolon, correct?

Yes. Or, comment out the existing global $db; and add a new line with the assignment and a unique comment like the one above.

If this little theory is correct you'll probably get the same "db has no member named" error but in a different place. At that point we'd go through and replace all the global db declarations with db assignments.

> I have "listen 80;" in /etc/nginx/nginx.conf, yes. Immediately afterward is the line "server_name localhost." I've added to that latter line both the hostname of the myth machine on my LAN and its LAN IP (don't know if there should be commas between, but I've just put spaces). After restarting nginx, still no remote access.

I should have looked at the docs on this (http://nginx.org/en/docs/http/server_names.html) but it turns out giving an invalid host name like _ ends up being a match-all. I use virtual hosts so I never needed to do this but with a single-site setup you don't care how clients get to your myth box, you just want them to see mythweb. Of course, bounce nginx or, I think, do "nginx -s reload" before browsing remotely.

- George



More information about the mythtv-users mailing list