Mythweb looking in wrong directory for weather map

Bug #270934 reported by MarcRandolph
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mythbuntu
Expired
Low
Unassigned

Bug Description

Running 0.21-weekly fixes on 8.04.
Radar weather maps haven't shown up on mythweb since I did my original 0.20.2 / 7.10 Mythbuntu install. Finally getting around to figuring out why and looked in apache error.log, I see that mythweb was looking in /var/www/data/cache rather than /var/www/mythweb/data/cache for the radar image. I had to do the following to get it to work:

/var/www/data/cache$ sudo ln -s ../../mythweb/data/cache/SouthCentralDopplerRadar1800-0 SouthCentralDopplerRadar1800-0
/var/www/data/cache$ sudo ln -s ../../mythweb/data/cache/SouthCentralDopplerRadar1800-1 SouthCentralDopplerRadar1800-1
/var/www/data/cache$ sudo ln -s ../../mythweb/data/cache/SouthCentralDopplerRadar1800-2 SouthCentralDopplerRadar1800-2
/var/www/data/cache$ sudo ln -s ../../mythweb/data/cache/SouthCentralDopplerRadar1800-3 SouthCentralDopplerRadar1800-3
/var/www/data/cache$ sudo ln -s ../../mythweb/data/cache/SouthCentralDopplerRadar1800-4 SouthCentralDopplerRadar1800-4
/var/www/data/cache$

It is probably going to be close to beta time before I can try an 8.10 build, so I wanted to record this now on the chance it is an easy fix to get in sooner than later.

Tags: cache mythweb
MarcRandolph (mrand)
Changed in mythbuntu:
importance: Undecided → Low
MarcRandolph (mrand)
description: updated
Revision history for this message
Thomas Mashos (tgm4883) wrote :

Confirmed. And easier symlink is sudo ln -s /var/www/mythweb/data/ /var/www/

Changed in mythbuntu:
status: New → Confirmed
Revision history for this message
laga (laga) wrote :

I am attaching a patch which might fix this issue. It's untested because I don't seem to be able to set up MythWeather on my backend.

To apply, download the patch to /var/ww/mythweb and run:

patch -p0 < mythweb.patch

Of course, please revert your symlinks beforehand ;)

Revision history for this message
MarcRandolph (mrand) wrote :

With the patch, I get the following error within the browser:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /usr/share/mythtv/mythweb/modules/weather/tmpl/default/weather.am.php on line 35

If I adjust line 35 of the patch from
+ echo "images[$i].src = \ getcwd() . "/". cache_dir ."/". $matches[1] ."-$i\";\n";
to be
+ echo "images[$i].src = \"" . getcwd() . "/". cache_dir ."/". $matches[1] ."-$i\";\n";

I no longer get a php error, but weather map doesn't show. /var/log/apache/error.log seems to indicate getcwd() points to /var/www/usr for some reason:

[Tue Sep 23 13:05:44 2008] [error] [client 127.0.1.1] File does not exist: /var/www/usr, referer: http://media/mythweb/weather

In trying to come up with another work-around, I noticed that these very lines of code have changed in upstream trunk. See:
http://svn.mythtv.org/trac/ticket/5171

Unfortunately that doesn't fix it either - it ends up pointing to the same place as 0.21-fixes:
[Tue Sep 23 12:12:33 2008] [error] [client 127.0.1.1] File does not exist: /var/www/data/cache, referer: http://media/mythweb/weather

Revision history for this message
sebrock (sebrock) wrote :

I fixed it by creating a virtual host in apache2 configuration. I guess this is what the developer thought aswell. If the apache2 server was configured for MythWeb alone it would have worked as the /data/cache dir would be in the www-root dir. Assigning MythWeb a virtual host simulates this:

http://mythweb.xxxx.com/

instead of:

http://xxxx.com/mythweb/

Revision history for this message
Thomas Mashos (tgm4883) wrote :

Marking incomplete as this release isn't supported anymore. Can anyone confirm that this issue is still present on a supported Mythbuntu/MythTV release?

Changed in mythbuntu:
status: Confirmed → Incomplete
Thomas Mashos (tgm4883)
Changed in mythbuntu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.