Fatal errors with installation of PWS Dashboard

I have installed PWS Dashboard. Followed the instructions but more than 1 hour is staying like that ( picture down). I have consoleWD on Raspberry pi 4. Can anyone help me to understand what the problem is ?
My site:

http://norddyroy.com/pwsWD/


This behavior is caused by a fatal php error.
For now, please test with full error reporting switched on: http://norddyroy.com/pwsWD/_test.php

These is the fatal error

Fatal error</b>:  Uncaught Error: Class 'DOMDocument' not found in /var/www/html/pwsWD/fct_yrno_shared.php:195
Stack trace:
#0 /var/www/html/pwsWD/fct_yrno_shared.php(54): pws_check_xml(false, Array)
#1 /var/www/html/pwsWD/fct_yrno_block.php(44): include_once('/var/www/html/p...')
#2 /var/www/html/pwsWD/PWS_index2.php(498): include('/var/www/html/p...')
#3 /var/www/html/pwsWD/index.php(14): include('/var/www/html/p...')
#4 /var/www/html/pwsWD/_test.php(7): include('/var/www/html/p...')
#5 {main}
  thrown in <b>/var/www/html/pwsWD/fct_yrno_shared.php</b> on line <b>195</b>

Some (older) data-sets use xml. So that part of PHP is needed by multiple scripts.

Please contact your website-provider as the php version is missing essential parts.
They can read this on how to install DOM/xml support: PHP: Introduction - Manual

Wim

My web server is on my Raspberry pi. Maybe I have to reinstall php ? Something is wrong with the installation, maybe?

There is nothing “wrong” or “errornous” It is incomplete for the task of running some scripts.
Often the dafault first install of a php server is as small as possible as system-programmers only want to add those components which are needed.

Therefor PHP-server has multiple-dozens of optional components one can install or leave-out.

[ol]
[li]If one is missing the PHP-parser will throw a fatal error[/li]
[li]You Google that fatal error or you check the https://www.php.net/ website for it.[/li]
[li]You then know what component is missing and you have to add that to your php-server setup (.ini) settings.[/li][/ol]

===

As templates are normally installed at website-providers systems, those providers install all most often needed components.
You will have to run the template a few times to detect what components are missing.

I attach a one-line php script which displays all installed components for your website-PHP-server.
When you run it, it will display all installed components.

Wim


info.php.zip (552 Bytes)

Ok Wim, maybe you can find something here:
http://norddyroy.com/info.php

We have a progress , Wim :smiley:

http://norddyroy.com/pwsWD/index.php

Have installed php-dom and php-xml on the server ,so PWS Dashboard is running now. Just a little problem with the forecast from yr.no

Now nothing is working . I tried to install php-xml7.3 as I thought that it will fix the forecast problem and now when I try to open the site , it is downloading index.php :oops:… OOPS!

Probably you switched off php by accident.
Sometimes it needs a version number in apache setup such as “php73”
But that is all I know
Wim

If i try to uninstall php and install it again ?

I uninstalled and installed Apache and php again several times ,but still no success . I just don’t know what to do . It says that Apache is running , PHP 7.3 is installed but not running.
http://www.norddyroy.com/pwsWD/

I can not help you with this.
Maybe you should make a new topic
in http://discourse.weather-watch.com/c/23
with a title “Help needed with Apache/PHP on a raspberry” ?

Then other people will see your message also.

Wim

Ok, Now php is running. I solved it with this instructions :

But now it seems that PWS Dash. is not starting after the settings . Still staying :…Unable to open ./_my_settings/settings.php file check file permissions !…I think the permissins are OK. :?


You were starting it in the terminal ?
No problem when starting in the browser !

The settings are gone, but it starts OK with default password

Wim


Consolewd are started in the terminal . I’m opening norddyroy.com/pwsWD and start to do the settings . After that i push the green button down and it shows that : (the picture from the upper post). So i’m trying to change the the data on the first configuration’s page but when pussing * save configuration *, it’s opening that page . Maybe because of the permissions or something.

OK,
Maybe the user for the folders is incorrect.
If you moved the folders using your pi account the folders and the contents all belong to “pi”
The apache scripts are running as user “www” and are based on the message not allowed to store a file in that folder.
Maybe “php” as user when you are running now as php7.

Or for folders the rights are to low to get data stored inside the folders.

I tested another script which wants to write to that folder and the same problem occurs

ERROR: The updated history could not be saved. Please contact support.

I attach a screenshot how the rights look when using an ftp program

Succes, Wim

This is the line whith the error-message in easyweather

PWS_easyweathersetup.php:249:         $fp = fopen($sttngs_fl, "w") or die("Unable to open ./_my_settings/settings.php file check file permissions !");


Now the permissions on /html/ er Ok . Not sure about /www/ folder .
Here is the last error data from the error.log file :
[Mon May 25 09:39:13.147137 2020] [mpm_prefork:notice] [pid 4683] AH00169: caught SIGTERM, shutting down
[Mon May 25 09:39:36.767893 2020] [mpm_prefork:notice] [pid 639] AH00163: Apache/2.4.38 (Raspbian) configured – resuming normal operations
[Mon May 25 09:39:36.774011 2020] [core:notice] [pid 639] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon May 25 09:56:56.909482 2020] [mpm_prefork:notice] [pid 639] AH00169: caught SIGTERM, shutting down
[Mon May 25 09:57:24.572061 2020] [mpm_prefork:notice] [pid 551] AH00163: Apache/2.4.38 (Raspbian) configured – resuming normal operations
[Mon May 25 09:57:24.575167 2020] [core:notice] [pid 551] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon May 25 10:47:07.971857 2020] [php7:error] [pid 679] [client 81.164.188.21:57304] script ‘/var/www/html/pwsWD/info.php’ not found or unable to stat
[Mon May 25 11:29:26.711748 2020] [mpm_prefork:notice] [pid 551] AH00169: caught SIGTERM, shutting down
[Mon May 25 11:29:49.831139 2020] [mpm_prefork:notice] [pid 623] AH00163: Apache/2.4.38 (Raspbian) configured – resuming normal operations
[Mon May 25 11:29:49.832806 2020] [core:notice] [pid 623] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon May 25 11:34:54.746666 2020] [php7:warn] [pid 860] [client 81.164.188.21:57668] PHP Warning: file_get_contents(./jsondata/WDapi.txt): failed to open stream: No such file or directory in /var/www/html/pwsWD/PWS_dump_api.php on line 31, referer: http://norddyroy.com/pwsWD/PWS_module_test.php


I noticed that i don’t have settings.php file in *_my_settings * directory


There is no settings.php until easyweathersetup (PWS_Dashboard template setup version PWSD_2004) has correctly saved that file. After the first save of that file, you can run the Dashboard and also further update the settings .

But saving of files into the _my_settings/ folder does still not work.

Wim

I did a file setting.php manual and the Pws dashboard stated. But how can i go to the settings and to change them ?
http://norddyroy.com/pwsWD/

Seems some progress http://norddyroy.com/pwsWD/_test.php
All blocks are displayed and the menu also.

Problem is now

Fatal error: Uncaught Error: Call to undefined function curl_init() in /var/www/html/pwsWD/PWS_load_files.php:350 Stack trace: #0 /var/www/html/pwsWD/PWS_load_files.php(225): fnctn_load_file('Earthquakes') #1 {main} thrown in /var/www/html/pwsWD/PWS_load_files.php on line 350

Now there can no external files be read. The CURL component is missing from your PHP.

Wim