Hello, If the permissions on /home weren't correct, the Belchertown and Seasons skins wouldn't work? What information would you need?
Le jeudi 12 juin 2025 à 03:24:59 UTC+2, vince a écrit : > On a pi using a venv, the usual error is that $HOME is mode 700 and the > webserver cannot read through the top of $HOME down into the www-data files > therein. So for this thread I'd suggest Lucien check his permissions on > $HOME and which groups user 'lucien' and whatever user the webserver runs > as (www-data usually). > > My guess is that if you run the following commands your output will look > something like: > > $ ls -al /home > total 20 > drwxr-xr-x 5 root root 4096 May 13 22:57 . > drwxr-xr-x 18 root root 4096 Mar 15 2024 .. > drwx------ 10 lucien lucien 4096 Dec 12 11:54 lucien > > $ groups lucien > lucien: lucien users > > $ groups www-data > www-data: www-data > > (so by default, the webserver cannot read files under the other account's > $HOME) > > At a minimum, it might be worth a quick check to see more info on the > configuration. Lucien's problem descriptions are a bit minimal.... > > > On Wednesday, June 11, 2025 at 4:58:02 PM UTC-7 Glenn McKechnie wrote: > >> >> I haven't received anything to my skin.conf gmail address. I assume you >> sent the files? >> >> Interesting that it runs under Apache. A bit of a puzzle. >> >> The location of the weewx database has to be visible to the web server. >> The servers have different ideas on what is restricted however the default >> location for a weewx-venv installation has proven okay with apache, >> assuming your installation allows the webserver to display those files in >> the first instance. If you can access the weewx html pages via your browser >> then I'd consider that a working installation and the database should be >> accessible via the php installation - providing that is set up. *apt >> install php-sqlite3* should do that, and *apt install php-cgi *is what I >> have noted for a lighttpd installation. You may have to enable them in the >> server configuration as per note 6. in the README. >> >> You can test your php installation and see if it has SQLite support by >> creating a test.php file with the following contents, save it in your >> webserver directory, then open it with your browser. Have a look for any >> SQLite >> test.php... >> <?php >> phpinfo(); >> ?> >> >> >> >> Cheers >> Glenn >> >> Various WeeWx addons at >> https://github.com/glennmckechnie >> On Sun, 8 Jun 2025 at 17:42, 'lucien mornet' via weewx-user < >> [email protected]> wrote: >> >>> I haven't provided you with my installation >>> rpi4, weewx-venv configuration >>> >>> Le dimanche 8 juin 2025 à 09:30:54 UTC+2, lucien mornet a écrit : >>> >>>> >>>> Thank you for your replies. I have the same error with Apache. I'll >>>> send you the files. >>>> Le dimanche 8 juin 2025 à 02:29:51 UTC+2, Glenn McKechnie a écrit : >>>> >>>>> First thought is a permissions issue, but the error message is usually >>>>> more explicit when it's that. I don't have a running instance of lighttpd >>>>> anymore so I'm not sure how it treats paths / files. Mine is running with >>>>> apache and the weewx-venv set up. >>>>> >>>>> The database that exists at /home/lucien/weewx-data/archive/weewx.sdb; >>>>> I assume is readable by the main weewx process and has valid contents. >>>>> >>>>> When I get a moment I'll do a simulation setup using lighttpd. >>>>> >>>>> My direct email address can be found within the various files. >>>>> wxobs/skin.conf has it at the top. >>>>> >>>>> Send, to that address, your wxobs/skin.conf file >>>>> your /var/www/html/weewx/wxobs/index.php file >>>>> and your @include file. That file is referenced around line 62 of the >>>>> index.php file. The following snippets shows >>>>> '/usr/share/php/wxobs_weatherpi.inc' but I need the one from your path. >>>>> >>>>> *X >>>>>> >>>>>> >>>>>> >>>>>> *ini_set('display_errors', 1); >>>>>> >>>>>> >>>>>> >>>>>> *error_reporting(~0); >>>>>> >>>>>> >>>>>> >>>>>> */ >>>>>> >>>>>> >>>>>> >>>>>> $start = microtime(true); >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> if ((@include '/usr/share/php/wxobs_weatherpi.inc') === false) { >>>>>> >>>>>> >>>>>> >>>>>> echo "<div class=\"alert\">"; >>>>> >>>>> >>>>> >>>>> >>>>> Cheers >>>>> Glenn >>>>> >>>>> Various WeeWx addons at >>>>> https://github.com/glennmckechnie >>>>> >>>>> >>>>> On Sun, 8 Jun 2025 at 05:31, 'lucien mornet' via weewx-user < >>>>> [email protected]> wrote: >>>>> >>>>>> Hello, I installed the obs skin, but access to the database fails. >>>>>> Excerpt from the conf section of weewx.conf for the wxobs skin: >>>>>> [StdReport] >>>>>> [[wxobs]] >>>>>> enable = true >>>>>> lang = en >>>>>> skin = wxobs >>>>>> HTML_ROOT = /var/www/html/weewx/wxobs >>>>>> unit_system = METRIC >>>>>> [[[Units]]] >>>>>> [[[[Groups]]]] >>>>>> group_direction = degree_compass >>>>>> group_percent = percent >>>>>> group_pressure = hPa >>>>>> group_rain = mm >>>>>> group_temperature = degree_C >>>>>> group_speed = km_per_hour >>>>>> >>>>>> lhas output var/log/lighttpd/error.log >>>>>> >>>>>> 2025-06-07 16:42:22: (mod_fastcgi.c.449) FastCGI-stderr:PHP Fatal >>>>>> error: Uncaught Exception: Unable to open database: unable to open >>>>>> database file in /var/www/html/weewx/wxobs/index.php:431 >>>>>> 2025-06-07 16:42:22: (mod_fastcgi.c.449) FastCGI-stderr:Stack trace: >>>>>> 2025-06-07 16:42:22: (mod_fastcgi.c.449) FastCGI-stderr:#0 >>>>>> /var/www/html/weewx/wxobs/index.php(431): SQLite3->__construct() >>>>>> 2025-06-07 16:42:22: (mod_fastcgi.c.449) FastCGI-stderr:#1 {main} >>>>>> 2025-06-07 16:42:22: (mod_fastcgi.c.449) FastCGI-stderr: thrown in >>>>>> /var/www/html/weewx/wxobs/index.php on line 431 >>>>>> >>>>>> php8.2 install >>>>>> >>>>>> In the file: /var/www/html/weewx/wxobs The database path is correct. >>>>>> Extract from the file: index.php >>>>>> >>>>>> } elseif ($php_dbase === 'sqlite') { >>>>>> if ($debug=='1') { >>>>>> echo "<p class=\"debug\">database is sqlite with path/name: >>>>>> /home/lucien/weewx-data/archive/weewx.sdb</p>"; >>>>>> } >>>>>> $db = new SQLite3($php_sqlite_db); >>>>>> } else { >>>>>> echo "<div class =\"alert\"><p>Failed to access the database by >>>>>> any known methods.</p></div>"; >>>>>> } >>>>>> >>>>>> I don't know where to look anymore. Thank you for your help. Have a >>>>>> nice day. >>>>>> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "weewx-user" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To view this discussion visit >>>>>> https://groups.google.com/d/msgid/weewx-user/d93de9f2-37d8-42a6-993a-07ec2c004835n%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/weewx-user/d93de9f2-37d8-42a6-993a-07ec2c004835n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "weewx-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion visit >>> https://groups.google.com/d/msgid/weewx-user/2f35eb55-fce5-4e89-8773-4e321382f79cn%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/weewx-user/2f35eb55-fce5-4e89-8773-4e321382f79cn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/0d248e00-feb9-499d-8c3e-c407363dea6dn%40googlegroups.com.
