[mythtv-users] alt lightweight web servers for MythTV?
James Miller
gajs-f0el at dea.spamcon.org
Wed Apr 15 05:27:19 UTC 2015
On Wed, 15 Apr 2015, George Nassas wrote:
> php-fpm is a requirement. nginx mostly shuffles bytes around, usually
> bytes from a file through a network connection to your browser but for
> php source code it sends that file to php-fpm and passes whatever output
> is generated down the network to your browser. nginx also passes back
> error messages which brings us to…
Thanks for the clarifications, George.
> The good news is you have nginx and php-fpm configured to talk to each
> other, they are, and php-fpm is trying to execute mythweb code. The line
> 59 mentioned in the error looks like this:
>
> $cache[$h][$field] = $db->query_col('SELECT data
> FROM settings
> WHERE value=? AND hostname IS NULL',
> $field); which means
> the $db variable is invalid so I bet you’re right that the issue is no
> connection to mysql. You can get a better idea of why you might not be
> connecting by creating a file “test.php” in the mythweb directory with
> the contents:
>
> <?php
> mysql_connect('localhost', 'mythtv', 'mythtv') or die('Could not connect: ' . mysql_error());
> mysql_select_db('mythconverg') or die('Could not select database');
> ?>
>
> and then doing a curl http://localhost/test.php
> <http://localhost/test.php>. No output means you’re connecting to the
> database OK so look elsewhere but you should get an error message. If
> you’ve given mythweb other login credentials (like an ip number for the
> host name) then use those values instead.
Well, I'm glad to find out that I seem at least to have gotten things
moving in the right direction. Creating that file, restarting nginx (which
I presume is then required), then running "curl http://localhost/test.php"
gives me the following output:
<br />
<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 />
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.
> P.S. Last time you mentioned how you couldn’t browse to mythweb from
> other machines, did you tweak the listen line and how did it go?
I did edit the line to "listen 80" as you'd suggested. But I was unable to
navigate to MythWeb from another machine on my LAN--not surprising, since
I can't even navigate to MythWeb from localhost. So I decided it wasn't
worth trying to test that further til I'm able to access it from
localhost.
More information about the mythtv-users
mailing list