weatherstorm / Sofaskin-CW9009

Sofaskin-CW9009 skin for Weewx is a modified version of the Sofaskin developed by Sven at https://neoground.com/portfolio/neowx/. He no longer supports the original skin. Please see the readme for dependency requirements to use this skin.
http://www.centuryfarmweather.com
MIT License
17 stars 11 forks source link

climate summary files don't display using text.php #17

Closed harmlessdrudge closed 3 years ago

harmlessdrudge commented 3 years ago

Just discovered this. Yields an error, e.g.,

[domain]/text.php?report=NOAA/NOAA-2021-02.txt

results in

"; echo file_get_contents($report); echo ""; } ?>

The file exists ok in the NOAA directory.

Happy to give your Ajax and jQuery version a test or to fix if you know already what causes this. Not immediately obvious to me right now what's wrong.

Loughlinstown commented 3 years ago

Working fine for me - https://www.loughlinstown.ie/text.php?report=NOAA/NOAA-2021-02.txt

harmlessdrudge commented 3 years ago

OK. I may have made a breaking change to template (am working on a test system with Ubuntu, Python3 and some other changes from my old RaspiOS install) but if this bit is changed/changing ...

harmlessdrudge commented 3 years ago

Just to confirm I have the same issue with latest unchanged version of (Sofaskin-CW9009-master) template. I changed HTML_ROOT to /var/www/domain but don't think that should matter; files are created in the right place; am using a virtual host with Apache2; WeeWX 4.4.

Just noticed that the title line displayed in the header, between coordinates and date/time reads

Climate Summary for $title"; ?>

Penny drop: it helps to have PHP installed /groan. Solution

sudo apt install php libapache2-mod-php
sudo systemctl restart apache2

Maybe add something explicit to the installation instructions? :-)

If new solution saves 18Mb of space and PHP cruft that would be nice.

weatherstorm commented 3 years ago

It's a good point to mention that PHP module needs to be installed if your running your own web server. Most commercially available web spaces offer PHP by default so this hasn't been a big issue. Anayways, I did add some instructions for this to the readme.

I do have a javascript version working which would remove the PHP requirement but I haven't added it to the code base yet.

weatherstorm commented 3 years ago

Fixed