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

James Miller gajs-f0el at dea.spamcon.org
Wed Apr 15 13:35:27 UTC 2015


On Wed, 15 Apr 2015, George Nassas wrote:

> 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();
>  }
> ?>

With that content entered, in place of the previous content, into 
test.php, when I run "curl http://localhost/test.php" I get the following 
output:

<br />
<b>Fatal error</b>:  Class 'PDO' not found in 
<b>/var/www/localhost/htdocs/mythweb/test.php</b> on line <b>3</b><br />

> 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.

Ok. This is a non-public installation. So that mythweb.passwd file should 
just have its content deleted, or is the file simply left out altogether?

> 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.

That content matches what I see in the file mythweb.include on my target 
machine--a file I find in /var/www/locahost but one I decided to copy to 
/etc/nginx as well. Next to "fastcgi_pass" in that file I have 
"127.0.0.1:9000;" (that content was not put there by me, so it must be 
some kind of default value). I also see a "fastcgi_param hostname" line in 
that file that probably needs editing so that it matches the hostname this 
machine gets on my LAN, correct?

Thanks for your continued help with these issues. It's much appreciated.


More information about the mythtv-users mailing list