●MythDoraのMythWeb設定(PART2)
前回の続きになりまして、問題点があるのでそれを修正します。
■録画済のページからファイルをダウンロードしようとサーバーエラーが発生する。
mythwebの録画済のページでリンクをクリックするとダウンロードが開始されるはずなんですがサーバーエラーになってしまいます。まず以下を確認しましょう。
・public_htmlとmythwebは権限を755にしておきます。
・mythwebの所有者はhogeにしておきます。
・/home/hoge/public_html/mythweb/dataは所有者をapacheにして権限は755にしておきます。
以上を確認したらmythweb.plに手を入れます。
※このやり方はオススメできません^^; もっと賢い方法があると思います。
(ほんとは、.htaccessファイルから取得できそうなもんなんですが・・・)
[root@kororin mythweb]# pwd
/home/hoge/public_html/mythweb
[root@kororin mythweb]# vi mythweb.pl
# Connect to the database
の下付近に以下の4行を追加(環境にあわせて修正してください。)
my $db_name = 'mythconverg';
my $db_server = '127.0.0.1';
my $db_login = 'mythtv';
my $db_password = 'mythtv';
以下コメントアウト
#our $dbh = DBI->connect("dbi:mysql:database=$ENV{'db_name'}:host=$ENV{'db_server'}",
# $ENV{'db_login'},
# $ENV{'db_password'});
以下を追加します。
our $dbh = DBI->connect("dbi:mysql:database=$db_name:host=$db_server",$db_login,$db_password);
※ mythfrontendの設定でもパスワードの設定があるので上記と同じにしておいてください。
また、.htaccessにもパスワードの設定がありますので同じにしておいてください。
※ パスワードを変更する場合は、次の録画開始まで時間があることを確認してから行ってください^^;
☆☆☆参考☆☆☆
mythtvユーザのパスワードの変更方法
[root@kororin mythweb]# mysql -u root -p mythconverg
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 72 to server version: 5.0.27
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> set password for mythtv@localhost = password('hogehoge');
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> quit
ここまで修正したら、録画済みページでリンクをクリックしてみましょう。
実は、ダウンロードは開始されるのですが、このままではファイル名が文字化けしてしまいます^^;
MythDoraでの日本語問題がまた発生したのでした。
なんちゃって回避方法はまた次回にでも。