Gentoo Wiki


This article is still a Stub. You can help Gentoo-Wiki by expanding it.

MythTV Series






Setting up Mythweb

Install apache2 and php 5, if you have not already done so. If you would like a more lightweight web server, you can use Lighttpd instead of Apache. See HOWTO Setup MythWeb with Lighttpd for that.

If you want mythweb to be installed automatically, make sure that the vhosts use flag is not set when emerging.

So, emerge it:

emerge -av mythweb

Copy mythweb's config to your /etc/apache2/modules.d, substituting the current version of mythweb for 0.21_p16809 (used here):

cp /usr/share/webapps/mythweb/0.21_p16809/htdocs/mythweb.conf.apache /etc/apache2/modules.d/mythweb.conf

Edit your new /etc/apache2/modules.d/mythweb.conf to reflect your setup, including the directory of your mythweb install, and your mythtv's mysql credentials.

Start or restart apache:

/etc/init.d/apache2 restart

And you should have mythweb accessible at http://localhost/mythweb!

See the mythweb page at and mythweb's INSTALL for more on installing mythweb.

MythWeb Hints

When I installed Mythweb-0.19, I had little trouble, so I tried to summarise the results I found. Since it's not recommended to modify I started another place for that.

In order for the included .htaccess to work properly, you will need to set apache's "AllowOverride" setting to "All" (or at least "Options") for the root mythweb directory. This directive lives within <Directory/> tags, so make sure you're adding the setting for the correct directory. eg

File: /etc/apache2/httpd.conf
 <Directory /var/www/localhost/htdocs/mythweb>
        AllowOverride all
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

I get the following error when trying to display http://localhost/mythweb.php
Fatal error: Call to undefined function preg_replace() in /var/www/localhost/htdocs/mythweb/includes/init.php on line 28
You need to set the pcre useflag for your dev-lang/php (Adds support for Perl Compatible Regular Expressions).

I get the following error when trying to display the status page: http://localhost/status
Error at /var/www/localhost/htdocs/mythweb/modules/status/handler.php, line 26: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration
You need to enable allow_url_fopen = On in your php.ini file.

NOTE: I found I needed to stop and restart Apache2 to get the change to take.

If you don't want to turn on the setting globally (which is a good idea for security reasons), you can enable it only for your VirtualHost if you are using Apache.

Add this line to your vhosts config for the entry MythWeb uses:

php_admin_flag allow_url_fopen on
See PHP configuration changes for more info.
Retrieved from ""

Last modified: Mon, 15 Sep 2008 05:32:00 +0000 Hits: 15,956