View previous topic :: View next topic |
Author |
Message |
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Mon Jul 09, 2007 2:03 pm Post subject: Mythtv-change Keybindings (solved) Mythweb&Lighttpd(sol |
|
|
From documentation.
Left rewind the configured number of seconds (default is 5)
Right fast forward the configured number of seconds (default is 30)
Ok, I don't really want to change the keybindings. I want to change the "(default is 5)". How can I change this from 5 seconds to 10 seconds?
Last edited by shadowvcd on Tue Jul 10, 2007 9:56 pm; edited 2 times in total |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Mon Jul 09, 2007 3:24 pm Post subject: |
|
|
Searching the Myth Users list for 'change default rewind amount' brings up this post.
The short answer is: TV Settings->Playback Groups->Default |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Mon Jul 09, 2007 8:24 pm Post subject: |
|
|
Thanks Hobbes, that was it. I don't know why I couldn't find it.
Looks like you answer alot on mythtv topics. Do you have any experience with usbuirt tranceiver? Or Mythweb and lighttpd web server? I guess I should start new topic. |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Mon Jul 09, 2007 8:42 pm Post subject: |
|
|
shadowvcd wrote: | Thanks Hobbes, that was it. I don't know why I couldn't find it.
Looks like you answer alot on mythtv topics. Do you have any experience with usbuirt tranceiver? Or Mythweb and lighttpd web server? I guess I should start new topic. |
I don't have any experience with either, sorry- the myth user's list is probably your best bet for hints. Most of the time, I don't actually know the answer, I just search around a bit and point people places |
|
Back to top |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Tue Jul 10, 2007 6:00 pm Post subject: |
|
|
Thanks Nicias.
That is what I used to initially setup my mythweb and lighttpd. I guess I need to recheck the config files because it did not work for me. I can get the initial mythweb page up, but any links take me to "404 - Not found" page. |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Tue Jul 10, 2007 6:22 pm Post subject: |
|
|
shadowvcd wrote: | Thanks Nicias.
That is what I used to initially setup my mythweb and lighttpd. I guess I need to recheck the config files because it did not work for me. I can get the initial mythweb page up, but any links take me to "404 - Not found" page. |
Sounds like you might be missing mod_rewrite support, or have it misconfigured. The last bits of the URL are meant to be passed on as environment variables, so if that's not happening the server may be interpreting them as literal URLs. |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Tue Jul 10, 2007 8:12 pm Post subject: |
|
|
I've double checked and triple checked but still don't see what I'm missing.
I'll post my config files and see if you see anything wrong.
Use flags I used.
www-servers/lighttpd php pcre fastcgi
dev-lang/php cgi pcre mysql mysqli session posix discard-path force-cgi-redirect ctype
lighttpd.conf
======================
var.basedir = "/var/www/localhost"
var.logdir = "/var/log/lighttpd"
var.statedir = "/var/lib/lighttpd"
server.modules += (
"mod_rewrite",
"mod_access",
"mod_setenv",
"mod_accesslog"
)
include "mime-types.conf"
include "mod_fastcgi.conf"
server.username = "lighttpd"
server.groupname = "lighttpd"
server.document-root = var.basedir + "/htdocs"
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = var.logdir + "/error.log"
server.indexfiles = ("index.php", "index.html", "index.htm", "default.htm")
server.follow-symlink = "enable"
server.port = 80
server.stat-cache-engine = "fam"
static-file.exclude-extensions += (".php", ".pl", ".cgi", ".fcgi")
accesslog.filename = var.logdir + "/access.log"
# enable directory listings
dir-listing.activate = "enable"
# don't list hidden files/directories
dir-listing.hide-dotfiles = "enable"
url.access-deny = ("~", ".inc")
$HTTP["host"] == "tivo" {
server.document-root = "/var/www/localhost/htdocs/mythweb"
index-file.names = ("mythweb.php")
url.rewrite = ( "^/(tv|music|video|weather|settings|status|stats|backend_log).*$" => "mythweb.php/$0" )
}
========================
mod_fast_cgi.conf
==================================
server.modules += ("mod_fastcgi")
fastcgi.server = (
".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket",
"bin-path" => "/usr/bin/php-cgi",
"broken-scriptfilename" => "enable"
)
)
)
=================================== |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Tue Jul 10, 2007 9:00 pm Post subject: |
|
|
And you're checking at 'http://tivo/'? Do you have that host setup to resolve correctly by defining it in your hosts file or something? |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Tue Jul 10, 2007 9:03 pm Post subject: |
|
|
Hobbes-X wrote: | And you're checking at 'http://tivo/'? Do you have that host setup to resolve correctly by defining it in your hosts file or something? |
Come to think of it, I don't know how lighttpd handles non-specific domains for the virtual host setup... might be http://tivo.localhost/
EDIT: Gah- nevermind! According to the Lighttpd article at Gentoo-wiki, it expects a fully qualified domain name for simple-vhost.default-host. Apologies for the noise. |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Tue Jul 10, 2007 9:55 pm Post subject: |
|
|
ding ding ding ding.
As a matter of fact I did have tivo defined in the host file. But I was accessing mythweb with
http://localhost/mythweb/mythweb.php
When I access mythweb with http://tivo/ it works. So problem solved till I attempt to access it from somewhere other than my own computer.
Thanks Hobbes.
Now if I can get someone to help me get my usbuirt to change channels on my dish receiver...... |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Tue Jul 10, 2007 10:06 pm Post subject: |
|
|
If you add a redirect statement to the 'regular' portion of your lighttpd.conf, it should start working that way too. Probably something like:
Code: | url.rewrite = ( "^/mythweb/(tv|music|video|weather|settings|status|stats|backend_log).*$" => "mythweb.php/$0" ) |
assuming that I read the regexes correctly.
I'll try and help out on the usbuirt too, if you're stuck. Is bad help better than no help? |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Tue Jul 10, 2007 10:24 pm Post subject: |
|
|
Also, if you can confirm whether or not that redirection line works without the virtual host, I'll update the gentoo-wiki. |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Tue Jul 10, 2007 10:36 pm Post subject: |
|
|
I'll take any help I can get at this point. Especially on the usbuirt. Not a very active community over at usbuirt forums.
http://65.36.202.170/phpBB2/viewtopic.php?t=5625&sid=87a9fd7ae7f9789362aaf7f6c84c8c8a
Gist is it works under windows, including on the dish receiver. I can transmit volume changes to my A/V receiver with lirc. The info button works transmitting to my dish receiver, but no other button works.
Usbuirt comes with optional 56khz ir detector which I don't have, but from the info I've gathered it can transmit 56khz ir signals. The dish remote is apparently a 56khz remote.
Apparently, lirc drivers for the usbuirt are adapted from the uirt2 drivers, but there are some change in protocols.
I have not yet found anybody who says they have a usbuirt transmitting to a dish receiver successfully using lirc. |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Tue Jul 10, 2007 10:43 pm Post subject: |
|
|
cut and paste of the rewrite line to lighttpd, restart webserver = no go on accessing through localhost |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Tue Jul 10, 2007 11:09 pm Post subject: |
|
|
shadowvcd wrote: | cut and paste of the rewrite line to lighttpd, restart webserver = no go on accessing through localhost |
Hmm- okay, I forgot that '/'s are delimeters. I'll fix that and double check my work and post back. |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Tue Jul 10, 2007 11:57 pm Post subject: |
|
|
Hobbes-X wrote: |
Code: | url.rewrite = ( "^/mythweb/(tv|music|video|weather|settings|status|stats|backend_log).*$" => "mythweb.php/$0" ) |
|
Maybe url.redirect = ( "^/mythweb/(tv|music|video|weather|settings|status|stats|backend_log).*$" => "mythweb.php/$0" )
instead of url.rewrite. This was a no-go, also.
Then added "mod_redirect", to the server.modules section of the conf file. This did some kind of redirect in the address line of the web browser, but received error "An unknown module was specified"
Fatal error: Call to a member function query() on a non-object in /var/www/localhost/htdocs/mythweb/includes/session.php on line 60
I need to investigate this furthur because it appears that i'm getting this fatal error line on some pages just using http://tivo/ before i added this other redirect stuff.
Last edited by shadowvcd on Thu Jul 12, 2007 12:10 am; edited 1 time in total |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Wed Jul 11, 2007 12:33 am Post subject: |
|
|
I am getting this error at the bottom of every page when I access mythweb thru http://tivo/
Fatal error: Call to a member function query() on a non-object in /var/www/localhost/htdocs/mythweb/includes/session.php on line 60 |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Wed Jul 11, 2007 5:33 am Post subject: |
|
|
shadowvcd wrote: | I am getting this error at the bottom of every page when I access mythweb thru http://tivo/
Fatal error: Call to a member function query() on a non-object in /var/www/localhost/htdocs/mythweb/includes/session.php on line 60 |
Hmm- the lines have changed a bit in the current svn of session.php, but query() grabs some variables from the server environment in just about every case. Care to run:
Code: | nano -w +60 /var/www/localhost/htdocs/mythweb/includes/session.php |
If it's the same version as what's on my system, it'd be this function:
Code: | function sess_write($id, $data) {
global $db;
if (!empty($_SERVER['REMOTE_USER']))
$id = 'user:'.$_SERVER['REMOTE_USER'];
$db->query('REPLACE INTO mythweb_sessions (id, modified, data) VALUES(?,NULL,?)',
$id, $data);
if (!$db->affected_rows())
return false;
// Return true
return true;
}
|
Which would suggest you're not getting a database object, which would also suggest you might have missed this addition to /var/www/localhost/htdocs/mythweb/includes/init.php:
Code: | // Define db access for Lighttpd.
$_SERVER["db_server"] = "localhost"; // change if MythTV MySQL db is elsewhere
$_SERVER["db_name"] = "mythconverg";
$_SERVER["db_login"] = "mythtv";
$_SERVER["db_password"] = "mythtv_password";
// End of change |
Or, perhaps, PHP is helpfully preventing you from overwriting the $_SERVER global variable. Probably the correct thing to do, anyways, but to get it working.... Or you need to correct them to the proper values (mythtv_password) is not the default for the mythconverg database)
For the URL rewrite, I ah, completely forgot to change the output side of the redirect to include the /mythweb directory also Try this one instead:
Code: | url.rewrite = ( "^/mythweb/(tv|music|video|weather|settings|status|stats|backend_log).*$" => "/mythweb/mythweb.php/$0" ) |
|
|
Back to top |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Wed Jul 11, 2007 2:33 pm Post subject: |
|
|
Everyone who I have spoken too who uses lighttpd with mythweb gets that same error. If you google for the error you will get other people's mythweb installations. I wouldn't worry about it. |
|
Back to top |
|
|
Rob1n l33t
Joined: 29 Nov 2003 Posts: 714 Location: Cambridge, UK
|
Posted: Wed Jul 11, 2007 3:02 pm Post subject: |
|
|
I don't. I believe this was fixed by a patch posted on the mailing list a while back. Here's the diff against 0.20-fixes SVN:
Code: |
--- includes/objects/Database.php (revision 13790)
+++ includes/objects/Database.php (working copy)
@@ -89,6 +89,17 @@
}
/**
+ * Destructor to save the session before the database connection dies
+/**/
+ function __destruct() {
+ // Restore global db object reference for session write
+ global $db;
+ $db = $this;
+ // Ask session to write and close now, before we lose the db object forever
+ session_write_close();
+ }
+
+/**
* This takes the place of a database constructor. It should be called directly
* without an object as:
*
|
|
|
Back to top |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Wed Jul 11, 2007 3:31 pm Post subject: |
|
|
Thanks! |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Wed Jul 11, 2007 3:38 pm Post subject: |
|
|
Rob1n wrote: | I don't. I believe this was fixed by a patch posted on the mailing list a while back. Here's the diff against 0.20-fixes SVN:
Code: |
--- includes/objects/Database.php (revision 13790)
+++ includes/objects/Database.php (working copy)
@@ -89,6 +89,17 @@
}
/**
+ * Destructor to save the session before the database connection dies
+/**/
+ function __destruct() {
+ // Restore global db object reference for session write
+ global $db;
+ $db = $this;
+ // Ask session to write and close now, before we lose the db object forever
+ session_write_close();
+ }
+
+/**
* This takes the place of a database constructor. It should be called directly
* without an object as:
*
|
|
Thanks Rob1n. I added this to Database.php and it got rid of that error. |
|
Back to top |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Wed Jul 11, 2007 3:40 pm Post subject: |
|
|
Nicias wrote: | Everyone who I have spoken too who uses lighttpd with mythweb gets that same error. If you google for the error you will get other people's mythweb installations. I wouldn't worry about it. |
EDIT: Erm- Guess not?
Googling around a bit more today, and it seems that cgi implementations of PHP combined with lighttpd have a problem filling out authentication related environment variables. (For example, see: lighttpd trac)
You might be able to get around this by adjusting the session management in mythweb to use something else for the session id. You wouldn't want just anyone getting your session though, so you'd still want it to be based on the remote user... Remote IP address might be the best of what's available, but that's much less secure than an authenticated username. Perhaps a remote IP salted with the current day/hour? Now with automatic hourly session desctruction! |
|
Back to top |
|
|
shadowvcd n00b
Joined: 22 Apr 2002 Posts: 27
|
Posted: Wed Jul 11, 2007 3:52 pm Post subject: |
|
|
Hobbes-X wrote: |
For the URL rewrite, I ah, completely forgot to change the output side of the redirect to include the /mythweb directory also Try this one instead:
Code: | url.rewrite = ( "^/mythweb/(tv|music|video|weather|settings|status|stats|backend_log).*$" => "/mythweb/mythweb.php/$0" ) |
|
This didn't work Hobbes. I get "An unknown module was specified". If you want to toubleshoot this further, I'm willing to keep testing. My original goal to get mythweb and lighttpd working has been met. |
|
Back to top |
|
|
|