<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Apr 13, 2015, at 11:58 AM, James Miller <<a href="mailto:gajs-f0el@dea.spamcon.org" class="">gajs-f0el@dea.spamcon.org</a>> wrote:<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">I want to ask here for some clarification regarding php-fpm (as it is mentioned in the wiki--see <a href="https://www.mythtv.org/wiki/MythWeb_on_Nginx" class="">https://www.mythtv.org/wiki/MythWeb_on_Nginx</a>). I've been under the impression that I should be using this in conjunction with nginx, though I'm now beginning to wonder, after a recent rereading of the wiki article, whether it might not be optional. The wiki says "Nginx doesn't have PHP support built in, and it must be configured for it. The old way was to use fast-cgi. If you are using nginx, you are trying to get performance and scalability. Forget FastCGI and install php-fpm." So is php-fpm a requirement or an option, when one is trying to serve MythWeb using nginx?<br class=""></div></blockquote><div><br class=""></div><div>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…</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><b>Fatal error</b>: Call to a member function query_col() on a non-object in <b>/var/www/localhost/htdocs/mythweb/includes/utils.php</b> on line <b>59<<br class="">/b><br /><br class=""><br class="">Am I seeing an issue here such is addressed in this thread <a href="http://lists.mythtv.org/pipermail/mythtv-users/2013-December/357920.html" class="">http://lists.mythtv.org/pipermail/mythtv-users/2013-December/357920.html</a> ?<br class=""></div></blockquote><div><br class=""></div><div>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:</div><div><br class=""></div><div><div> $cache[$h][$field] = $db->query_col('SELECT data</div><div> FROM settings</div><div> WHERE value=? AND hostname IS NULL',</div><div> $field);</div><div class=""><br class=""></div><div class="">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:</div><div class=""><br class=""></div><div class=""><div class=""><?php</div><div class="">mysql_connect('localhost', 'mythtv', 'mythtv') or die('Could not connect: ' . mysql_error());</div><div class="">mysql_select_db('mythconverg') or die('Could not select database');</div><div class="">?></div></div><div class=""><br class=""></div><div class="">and then doing a curl <a href="http://localhost/test.php" class="">http://localhost/test.php</a>. 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. </div></div><div><br class=""></div><div>- George</div><div><br class=""></div><div>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?</div></div></div></body></html>