You are not logged in.

#1 2012-05-09 18:54:58

boomshalek
Member
Registered: 2007-10-12
Posts: 98

[SOLVED] change the paths for mythweb after upgrade to 0.25-3

Hi,

Latest mythweb upgrade showed the following upgrade message:

MythWeb files are now in /var/lib/mythtv/mythweb
Please update your server configuration accordingly

Therefore I changed /etc/httpd/conf/extra/mythweb.conf this way:

# OLD    <Directory "/srv/http/mythweb" >
    <Directory "/var/lib/mythtv/mythweb" >

But this only shows the directory listing in the webbrowser.

So changed /etc/php/php.ini and added :/var/lib/mythtv/mythweb to:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/mythtv/:/var/lib/mythtv/mythweb

Still only directory listings. I am using SSL to access mythweb.
EDIT: I just saw that Digest Authentification doesn't work anymore either for mythweb. Direct access possible.

Does someone have a clue where to change what ?

Last edited by boomshalek (2012-05-14 22:25:48)

Offline

#2 2012-05-10 02:32:00

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 317

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

Could it be you are affected by the latest upgrade to PHP?
http://www.archlinux.org/news/php-updat … ersion-54/

Offline

#3 2012-05-11 21:51:29

dontbugme
Banned
Registered: 2011-11-04
Posts: 166
Website

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

i have the same problem...
and i didn't update to php5.4 (because mythweb isn't working with 5.4)
(ignorepk = php php-apache)

only directory listings sad

i think a index.php ore something is missing?

Offline

#4 2012-05-12 18:23:02

boomshalek
Member
Registered: 2007-10-12
Posts: 98

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

twelveeighty wrote:

Could it be you are affected by the latest upgrade to PHP?
http://www.archlinux.org/news/php-updat … ersion-54/

I certainly have upgraded to the latest. I will leave it upgraded as downgrading apparently does not solve it

dontbugme wrote:

i have the same problem...
and i didn't update to php5.4 (because mythweb isn't working with 5.4)
(ignorepk = php php-apache)

only directory listings sad

i think a index.php ore something is missing?

Offline

#5 2012-05-13 11:28:56

bnitkin
Member
From: Easton, PA
Registered: 2012-05-13
Posts: 6
Website

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

I have the same problem, but came closer to a solution.
I made two changes to /etc/httpd/conf/extra/mythweb.conf, and now I have PHP's white screen of death instead of Apache's 404.
The first change was adding an alias line to tell apache which url to assign Mythweb. The other change I needed to make was uncommenting the RewriteBase directive, further down in the same file:

    Alias /mythweb /var/lib/mythtv/mythweb
    <Directory "/var/lib/mythtv/mythweb">
        Options -All +FollowSymLinks +IncludesNoExec
        Order allow,deny
        ...
        RewriteBase    /mythweb

So, now I'm stuck with a WSOD - Apache serves a completely blank page. Ideas?

Offline

#6 2012-05-14 12:34:42

bnitkin
Member
From: Easton, PA
Registered: 2012-05-13
Posts: 6
Website

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

MythWeb returns!
It appears that there's a typo in line 50 of /usr/share/mythtv/bindings/php/MythBase.php. It reads:

Cache::setObject($this->cacheKey, &$this, $this->cacheLifetime);

Removing the ampersand brought MythWeb back.
Also, make sure to remove the line below from /etc/php/php.ini; the home page has more details on that.

extension=json.so

I found most of the errors in the Apache error log; it'll be helpful if the fix above doesn't solve your troubles.

Offline

#7 2012-05-14 22:25:16

boomshalek
Member
Registered: 2007-10-12
Posts: 98

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

boomshalek's post #1 combined with bnitkin's posts #5 & #6 seem to solve the issues.

@bnitkin: thx, godlike !

SOLVED

Offline

#8 2012-05-21 11:55:22

farmerdave
Member
Registered: 2011-11-23
Posts: 71

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

boomshalek wrote:

boomshalek's post #1 combined with bnitkin's posts #5 & #6 seem to solve the issues.

If I follow these I go around full circle and get back to an Access Forbidden screen.

Offline

#9 2012-05-21 12:05:56

bnitkin
Member
From: Easton, PA
Registered: 2012-05-13
Posts: 6
Website

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

@boomshalek - I'm glad I could help!
@farmerdave - That sounds like an apache config error.
Is there a section that looks like this near the top of your /etc/httpd/conf/extra/mythweb.conf file?

    <Directory "/var/lib/mythtv/mythweb/data">
        Options -All +FollowSymLinks +IncludesNoExec
        Order allow,deny
        Allow from 192.168
    </Directory>
    <Directory "/var/lib/mythtv/mythweb" >
        Order allow,deny
        Allow from 192.168

That section tells Apache that, by default, no one can access the directory. The allow line gives anyone on my local network (192.168.*.*) is permission to visit the directory /var/lib/mythtv/mythweb.
My guess is that the alias line is telling Apache to serve the right directory, but that directory is outside of the document root, so Apache is configured to deny access.

Also, check the ownership of the new mythweb directory. The apache user (http, on my machine), should be able to read and write in all mythweb directories.

Offline

#10 2012-05-21 12:16:17

farmerdave
Member
Registered: 2011-11-23
Posts: 71

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

Mine looks like this

#    <Directory "/srv/http/mythweb/">
Alias /mythweb /var/lib/mythtv/mythweb
    <Directory "/var/lib/mythtv/mythweb/">
        Options -All +FollowSymLinks +IncludesNoExec
    </Directory>
#    <Directory "/srv/http/mythweb/" >
    <Directory "/var/lib/mythtv/mythweb/" >

Offline

#11 2012-05-21 12:20:47

farmerdave
Member
Registered: 2011-11-23
Posts: 71

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

I tried adding the "Order" and "Allow" commands, but no changes. Same with the extra "data" folder on the end of the folder list.

$ ls -l /var/lib/mythtv/
total 4
drwxr-xr-x 12 http http 4096 May  9 20:04 mythweb

My permissions seem ok here.
In my apache.log I get the following:

[Mon May 21 21:48:20 2012] [error] [client ::1] client denied by server configuration: /var/lib/mythtv/mythweb/, referer: http://localhost/

Last edited by farmerdave (2012-05-21 12:24:56)

Offline

#12 2012-05-21 12:24:58

bnitkin
Member
From: Easton, PA
Registered: 2012-05-13
Posts: 6
Website

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

So, what happens if you add a line to each directory section reading:

order deny,allow #Evalate deny, then allow
allow from 192.168 #Allow local access
deny from all #Block everything else (an ssh tunnel will get through this...)

That's the code I'm using - it'll allow your local network to connect to mythweb, but no one else. Alternately, you could open mythweb to the world (assuming there's no firewall in the way) with:

Alias /mythweb /var/lib/mythtv/mythweb
    <Directory "/var/lib/mythtv/mythweb/">
        Options -All +FollowSymLinks +IncludesNoExec
        order deny,allow
        allow from all
    </Directory>
    <Directory "/var/lib/mythtv/mythweb/" >
        order deny,allow
        allow from all

There are more details at http://docstore.mik.ua/orelly/linux/apache/ch05_06.htm (and google. Powerful tool, google.)

EDIT:
What's your mythweb.conf look like now? Apache is reading mythweb.conf (otherwise the alias wouldn't be processed), but it doesn't seem to be picking up on the rules.
Also, did you restart apache after modifying the files? It's running as a daemon named httpd.

Last edited by bnitkin (2012-05-21 12:28:25)

Offline

#13 2012-05-21 13:23:37

farmerdave
Member
Registered: 2011-11-23
Posts: 71

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

I restarted httpd in between each attempt. Trying to add the first change above gives

Syntax error on line 36 of /etc/httpd/conf/extra/mythweb.conf:
order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure'

Offline

#14 2012-05-21 13:35:27

bnitkin
Member
From: Easton, PA
Registered: 2012-05-13
Posts: 6
Website

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

I didn't realize before, but the order directive cares about spaces - there can't be any whitespace between deny and allow.

Typo notwithstanding, everything looks to be in order. I'm not sure where else Apache would be told to bar access. Are you connecting to the mythweb server locally? The rules I posted before only allow computers with a 192.168 IP address to connect.

You could also try replacing the allow/deny/order directives with "Allow from all". If you're behind a firewall, the computer should be fine. If not, that would open mythweb to the outside world, which could be dangerous.

Offline

#15 2012-05-22 09:09:05

farmerdave
Member
Registered: 2011-11-23
Posts: 71

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

Solved. As said earlier, posts #1, #5 and #6 are the solution.

Last edited by farmerdave (2012-05-22 10:35:38)

Offline

#16 2012-05-23 09:20:28

sultanoswing
Member
Registered: 2008-07-23
Posts: 287

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

Solved for me too now using the directory and instructions above. Sweet!


Arch 4.4.13-lts (x86_64) w/Gnome 3.20.2
ASUS P7P55-E-Pro, Geforce GT430, i5-750, 8GB, Samsung 830 SSD | Intel NUC 5i5RYK | ASUS ux303ua | HP Folio 13

Online

#17 2012-08-21 02:46:28

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

Not sure what I'm missing, all I get is directory listing.  Changed the directories, added the alias, there is no ampersand, fixed openbasedir, RewriteBase, ....

allows and denies all appear to be proper.  So I think I have covered 1, 5 and 6, and still, just directory listings.

Edit:  I tried to go to ip/mythweb/mythweb.php

I get the following in the apache error_log:

[error] [client 192.168.77.20] script '/srv/http/mythweb/mythweb.php' not found or unable to stat

Not sure where this is coming from; mythweb.conf has no path to /srv...., although DocumentRoot in httpd.conf does have this path.

Edit: Solved

I was missing an Include statement in httpd.conf for mythweb.conf
I had a permissions error on a directory above; fixed courtesy of http://wiki.apache.org/httpd/13PermissionDenied

Last edited by timm (2012-08-24 03:04:39)

Offline

#18 2012-08-24 16:49:56

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

Just to say that after making all the changes in 1,5 and 6 I still had an Access Forbidden error (much like farmerdave in post 8 - although farmerdave doesn't elaborate on how he solved this particular issue).

It turned out to be the permissions on my /var/lib/mythtv, which were

drwx------ 6 mythtv mythtv 4.0K Aug 24 11:16 mythtv

I granted full rights with chmod 777, restarted apache and had mythweb working again.

Offline

#19 2013-01-01 00:25:09

morphjk
Member
Registered: 2010-06-10
Posts: 59

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

I'm also trying to get mythweb working but after doing everything from post 1, 5 and 6 and then trying to start httpd I get:

[root@media ~]# systemctl status httpd.service
httpd.service - Apache Web Server
          Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
          Active: failed (Result: exit-code) since Tue, 2013-01-01 11:25:46 EST; 18s ago
         Process: 14599 ExecStop=/usr/sbin/apachectl graceful-stop (code=exited, status=1/FAILURE)
         Process: 14698 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
        Main PID: 13875 (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/httpd.service

Jan 01 11:25:46 media systemd[1]: Starting Apache Web Server...
Jan 01 11:25:46 media apachectl[14698]: Syntax error on line 29 of /etc/httpd/conf/extra/mythweb.conf:
Jan 01 11:25:46 media apachectl[14698]: Invalid command '/etc/httpd/conf/extra/mythweb.conf', perhaps misspelled or defined by a module not included in the server configuration
Jan 01 11:25:46 media systemd[1]: Failed to start Apache Web Server.
Jan 01 11:25:46 media systemd[1]: Unit httpd.service entered failed state
[root@media ~]#

This is the first time trying to set it up so I haven't come from a working mythweb install before. So I'm a bit stumped.

Last edited by morphjk (2013-01-01 00:26:43)

Offline

#20 2013-01-01 00:33:31

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,095
Website

Re: [SOLVED] change the paths for mythweb after upgrade to 0.25-3

Jan 01 11:25:46 media apachectl[14698]: Syntax error on line 29 of /etc/httpd/conf/extra/mythweb.conf:
Jan 01 11:25:46 media apachectl[14698]: Invalid command '/etc/httpd/conf/extra/mythweb.conf', perhaps misspelled or defined by a module not included in the server configuration
morphjk wrote:

I'm a bit stumped.

Really? Did you read your own logs?

Offline

Board footer

Powered by FluxBB