Installation and configuration on Raspberry Pi 3
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Installation and configuration on Raspberry Pi 3
I have the raspberry pi with the latest update and upgrade.
I have installed and configured successfully apache2, mariadb (mysql), php.
I launch successfuly setup.php
The 3 server tests are successful.
I have created a weather database with user pi
I can connect to mysql successfuly with user pi
When I test the mysql connection I get this error:
This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500
anybody have ideas of what I am missing?
I have installed and configured successfully apache2, mariadb (mysql), php.
I launch successfuly setup.php
The 3 server tests are successful.
I have created a weather database with user pi
I can connect to mysql successfuly with user pi
When I test the mysql connection I get this error:
This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500
anybody have ideas of what I am missing?
- Attachments
-
- 2017-11-19-150537_1824x984_scrot.png (765.27 KiB) Viewed 77810 times
-
- 2017-11-19-150444_1824x984_scrot.png (778.85 KiB) Viewed 77810 times
Pierre Durand
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Try adding this at the end of the url:
?errors
If it does not help then the only possible way of diagnosing the problem is looking in the error log
?errors
If it does not help then the only possible way of diagnosing the problem is looking in the error log
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
I have modified the error reporting levels in /etc/php/7.0/apache2/php.ini
by modifying display_errors=On (it was off)
I then looked at the apache2 error.log file in /var/log/apache2
The error logged is the following:
[Sat Nov 18 15:29:22.054817 2017] [:error] [pid 17380] [client ::1:53924] PHP Notice: Undefined variable: lang in /var/www/html/template/install/setup.php on line 1292
Not sure as to what to do to ensure the $lang variable is set when running setup.php
by modifying display_errors=On (it was off)
I then looked at the apache2 error.log file in /var/log/apache2
The error logged is the following:
[Sat Nov 18 15:29:22.054817 2017] [:error] [pid 17380] [client ::1:53924] PHP Notice: Undefined variable: lang in /var/www/html/template/install/setup.php on line 1292
Not sure as to what to do to ensure the $lang variable is set when running setup.php
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
two more errors are found in the error.log:
[Sun Nov 19 18:03:30.457437 2017] [:error] [pid 5691] [client ::1:41200] PHP Notice: Undefined variable: firstWeekday in /var/www/html/template/install/setup.php on line 2129
[Sun Nov 19 18:03:30.457627 2017] [:error] [pid 5691] [client ::1:41200] PHP Notice: Undefined variable: firstWeekday in /var/www/html/template/install/setup.php on line 2130
[Sun Nov 19 18:03:30.457437 2017] [:error] [pid 5691] [client ::1:41200] PHP Notice: Undefined variable: firstWeekday in /var/www/html/template/install/setup.php on line 2129
[Sun Nov 19 18:03:30.457627 2017] [:error] [pid 5691] [client ::1:41200] PHP Notice: Undefined variable: firstWeekday in /var/www/html/template/install/setup.php on line 2130
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
added ?errors at the end of the URL and am getting the same error page.
The error log only displays what I listed above....
The error log only displays what I listed above....
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
PROBLEM SOLVED:
I was missing the package php-mysql
the error 500 was caused my a missing mysqli_connect() function included in the additional package php-mysql
I was missing the package php-mysql
the error 500 was caused my a missing mysqli_connect() function included in the additional package php-mysql
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
After a successful installation of the necessary packages and mysql setup,
I ran successfully the setup.php script.
the table was created and I have got a confirmation: Config created/updated.
I checked the existance of the alldata table and its fields.
I did not upload any data in the table.
Not I attempt launching the template by entering this URL:
http://localhost/template/index.php which changes to:
http://localhost/template/indexDesktop.php
and I get a totally blank page (white background).
the only visible change is the appearance of Meteotemplate on the web page Tab.
I ran successfully the setup.php script.
the table was created and I have got a confirmation: Config created/updated.
I checked the existance of the alldata table and its fields.
I did not upload any data in the table.
Not I attempt launching the template by entering this URL:
http://localhost/template/index.php which changes to:
http://localhost/template/indexDesktop.php
and I get a totally blank page (white background).
the only visible change is the appearance of Meteotemplate on the web page Tab.
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
checked the error.log file and found these notices when trying to launch the meteotemplate:
[Mon Nov 20 12:03:31.323121 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: customStation in /var/www/html/template/install/createConfig.php on line 97, referer: http://localhost/template/install/s
etup.php
[Mon Nov 20 12:03:31.323800 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: bannerID in /var/www/html/template/install/createConfig.php on line 246, referer: http://localhost/template/install/setup
.php
[Mon Nov 20 12:03:31.324106 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: alertActive in /var/www/html/template/install/createConfig.php on line 426, referer: http://localhost/template/install/se
tup.php
[Mon Nov 20 12:03:31.323121 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: customStation in /var/www/html/template/install/createConfig.php on line 97, referer: http://localhost/template/install/s
etup.php
[Mon Nov 20 12:03:31.323800 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: bannerID in /var/www/html/template/install/createConfig.php on line 246, referer: http://localhost/template/install/setup
.php
[Mon Nov 20 12:03:31.324106 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: alertActive in /var/www/html/template/install/createConfig.php on line 426, referer: http://localhost/template/install/se
tup.php
Pierre Durand
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Hi,pdurand wrote: ↑Mon Nov 20, 2017 7:53 pm checked the error.log file and found these notices when trying to launch the meteotemplate:
[Mon Nov 20 12:03:31.323121 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: customStation in /var/www/html/template/install/createConfig.php on line 97, referer: http://localhost/template/install/s
etup.php
[Mon Nov 20 12:03:31.323800 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: bannerID in /var/www/html/template/install/createConfig.php on line 246, referer: http://localhost/template/install/setup
.php
[Mon Nov 20 12:03:31.324106 2017] [:error] [pid 7087] [client ::1:60656] PHP Notice: Undefined index: alertActive in /var/www/html/template/install/createConfig.php on line 426, referer: http://localhost/template/install/se
tup.php
these are not errors, but notices, they are ok, this is not the problem.
Try this:
go to your homepage and change it as shown below and see if it tells you the error:
....indexDesktop.php?errors
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
I get this when I add ?errors
Warning: file_put_contents(homepage/css/theme.txt): failed to open stream: Permission denied in /var/www/html/template/homepage/css/themeSetter.php on line 24
Warning: file_put_contents(cache/version.txt): failed to open stream: Permission denied in /var/www/html/template/homepage/css/themeSetter.php on line 30
Fatal error: Uncaught Error: Call to undefined function utf8_encode() in /var/www/html/template/scripts/functions.php:37 Stack trace: #0 /var/www/html/template/header.php(68): lang('in the last', 'l') #1 /var/www/html/template/indexDesktop.php(83): include('/var/www/html/t...') #2 {main} thrown in /var/www/html/template/scripts/functions.php on line 37
Warning: file_put_contents(homepage/css/theme.txt): failed to open stream: Permission denied in /var/www/html/template/homepage/css/themeSetter.php on line 24
Warning: file_put_contents(cache/version.txt): failed to open stream: Permission denied in /var/www/html/template/homepage/css/themeSetter.php on line 30
Fatal error: Uncaught Error: Call to undefined function utf8_encode() in /var/www/html/template/scripts/functions.php:37 Stack trace: #0 /var/www/html/template/header.php(68): lang('in the last', 'l') #1 /var/www/html/template/indexDesktop.php(83): include('/var/www/html/t...') #2 {main} thrown in /var/www/html/template/scripts/functions.php on line 37
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
did some research and the utf8_encode() and utf8_decode() have been removed from the initial releases of PHP 7.0 versions.
I understand that they are back in from version 7.2..
I installed php7.0-xml as I unserstand that the above functions are included.
I was able to start the template page and access the admin control page.
I am pursuing the installation and configuration.
thanks to Jachym for the guidance....
I understand that they are back in from version 7.2..
I installed php7.0-xml as I unserstand that the above functions are included.
I was able to start the template page and access the admin control page.
I am pursuing the installation and configuration.
thanks to Jachym for the guidance....
Pierre Durand
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Hi,
very strange, I used 7.0, then updated to 7.1 and never had any issues, but who knows
Glad you solved it.
very strange, I used 7.0, then updated to 7.1 and never had any issues, but who knows
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
I have downloaded some blocks and have done a test layout setup.
There is only one data record for now.
I have attached two screenCaptures; one generated on the local computer where mysql an meteotemplate is defined.
the other from a remote computer trying to load the meteotemplate web page.
The remote site does not see any icons or blocks properly.
What am I missing?
There is only one data record for now.
I have attached two screenCaptures; one generated on the local computer where mysql an meteotemplate is defined.
the other from a remote computer trying to load the meteotemplate web page.
The remote site does not see any icons or blocks properly.
What am I missing?
- Attachments
-
- 2017-11-21-151224_1824x984_scrot.png (154.24 KiB) Viewed 77732 times
-
- 2017-11-21-151322_1824x984_scrot.png (366.49 KiB) Viewed 77732 times
Pierre Durand
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Hi,
I cannot help you unless you give me a link. Screenshots are usually only informative - I can say "yes, it doesnt work"
I cannot help you unless you give me a link. Screenshots are usually only informative - I can say "yes, it doesnt work"
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
try:
pierre.does-it.net
no www. before the link above.
pierre
pierre.does-it.net
no www. before the link above.
pierre
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Pierre Durand
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Hi,
the problem is that you cannot simply copy the template from one location to another. The paths are now different in the Main setup, its not localhost etc.
the problem is that you cannot simply copy the template from one location to another. The paths are now different in the Main setup, its not localhost etc.
- Fraggboy
- Forecaster

- Posts: 193
- Joined: Wed Sep 27, 2017 2:45 pm
- Location: Sunny California
- Station model: Bloomsky II + Storm
- Software: Bloomsky
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Pierre,
I was able to pull up your page. It's pretty slow.. I think I know what's going on..
Under the main setup file, do you have the paths setup correctly?
Leave the Path as default: /
The Page URL should be: http://pierre.does-it.net/template/
Scroll to the bottom and save it. The links that does load is pointing to localhost, which I will not have access to. After the change, you will access your page from the link above, and not via localhost.
EDIT: Jachym just beat me to it.
I was able to pull up your page. It's pretty slow.. I think I know what's going on..
Under the main setup file, do you have the paths setup correctly?
Leave the Path as default: /
The Page URL should be: http://pierre.does-it.net/template/
Scroll to the bottom and save it. The links that does load is pointing to localhost, which I will not have access to. After the change, you will access your page from the link above, and not via localhost.
EDIT: Jachym just beat me to it.
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Got it.
Thank you very much...
I corrected the entries is the setup.php and all works fine now.
http://pierre.does-it.net
BTW I am not copying the template from one computer to another, I am simply running it from a remote computer.
It is slow because it is running on a raspberry pi 3.
Once I have understood all the intricacies of Meteotemplare, I will dediate a server remote to the weather station to display the info.
I will have multiple weather stations (my own design, electronics and all) throughout America.
Thank you very much...
I corrected the entries is the setup.php and all works fine now.
http://pierre.does-it.net
BTW I am not copying the template from one computer to another, I am simply running it from a remote computer.
It is slow because it is running on a raspberry pi 3.
Once I have understood all the intricacies of Meteotemplare, I will dediate a server remote to the weather station to display the info.
I will have multiple weather stations (my own design, electronics and all) throughout America.
Pierre Durand
- Fraggboy
- Forecaster

- Posts: 193
- Joined: Wed Sep 27, 2017 2:45 pm
- Location: Sunny California
- Station model: Bloomsky II + Storm
- Software: Bloomsky
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Actually, it's loading quicker now since it's not timing out. I am intrigued in your weather stations you are designing. Care to share more information about them?
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
I would be glad to.
I use a Arduino like microcontroller with various sensors (Temp, Humidity, LightLevel, Inside temp, wind speed, wind direction, rain gauge and webcam.
The microcontroller is connected to a raspberry Pi 3 that is able to update the firmware on the Arduino (or Teensy)
The Raspberry Pi has MySQL, PHP, Apache2.
The microcontroller will send data to the rPi at a high rate and from there the Meteotemplate will be updated.
I am able to remotely connect to each weather station from my home to monitor
These weather station can run at any location that's has no power or landline internet connections.
I can run them on 12V batteries that are charged by solar or local power if available.
the Internet is accessed via a cellular broadband modem using LTE preferably.
If LTE is not available the data will be sent to a land station and from there the Meteotemplate will run.
These stations are mainly used by Radio Control Flying Clubs at their flying fields where most of them have no power or internet.
The weather station is valuable to club RC pilots that live far away so that they dont travel long distances if conditions are nor suitable to their flying abilities.
The webcam is also able to tell them who is at the field and flying.
I use a Arduino like microcontroller with various sensors (Temp, Humidity, LightLevel, Inside temp, wind speed, wind direction, rain gauge and webcam.
The microcontroller is connected to a raspberry Pi 3 that is able to update the firmware on the Arduino (or Teensy)
The Raspberry Pi has MySQL, PHP, Apache2.
The microcontroller will send data to the rPi at a high rate and from there the Meteotemplate will be updated.
I am able to remotely connect to each weather station from my home to monitor
These weather station can run at any location that's has no power or landline internet connections.
I can run them on 12V batteries that are charged by solar or local power if available.
the Internet is accessed via a cellular broadband modem using LTE preferably.
If LTE is not available the data will be sent to a land station and from there the Meteotemplate will run.
These stations are mainly used by Radio Control Flying Clubs at their flying fields where most of them have no power or internet.
The weather station is valuable to club RC pilots that live far away so that they dont travel long distances if conditions are nor suitable to their flying abilities.
The webcam is also able to tell them who is at the field and flying.
Pierre Durand
- Fraggboy
- Forecaster

- Posts: 193
- Joined: Wed Sep 27, 2017 2:45 pm
- Location: Sunny California
- Station model: Bloomsky II + Storm
- Software: Bloomsky
- Contact:
Re: Installation and configuration on Raspberry Pi 3
That is a very cool project you are working on! Have you thought about using the Raspberry Pi Zero to even decrease the power load? I know the Pi 3 is very efficient already..
What solar radiation shield do you plan on using? I know some work very well, while others don't which affect the readings.
What solar radiation shield do you plan on using? I know some work very well, while others don't which affect the readings.
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
The main controllers (Arduino and rPi are inside club houses or Seacans)
I only use solar radiation shields for outside sensors (Temp, Hum....)
This weather station is a work in progress as I need to adapt it to various sites and resources.
It is not meant to be high precision NASA type data, but practical for local club members and their guests when they have pilots coming from around the country to participate in Fun Flys and Scale and IMAC competitions.
I do try to get the best equipment possible whith affordable prices.
I only use solar radiation shields for outside sensors (Temp, Hum....)
This weather station is a work in progress as I need to adapt it to various sites and resources.
It is not meant to be high precision NASA type data, but practical for local club members and their guests when they have pilots coming from around the country to participate in Fun Flys and Scale and IMAC competitions.
I do try to get the best equipment possible whith affordable prices.
Pierre Durand
-
pdurand
- Observer

- Posts: 32
- Joined: Mon Oct 23, 2017 4:21 pm
- Location: Airdrie, Alberta, Canada
- Station model: Custom
- Software: Custom
- Contact:
Re: Installation and configuration on Raspberry Pi 3
Yesterday I ended the day with excitement having made so much progress with installation of the template.
This morning I resume the work and launch the template.
I go into admin mode and run Setup.php to review the settings...
I test the connection to mysql with the provided button and to my surprise I get this error:
Error: Unable to connect to MySQL.
Debugging error number: 2002
Debugging error: php_network_getaddresses: getaddrinfo failed: Name or service not known
What happened overnight?
I am searching the web but I get long winded forum streams....
This morning I resume the work and launch the template.
I go into admin mode and run Setup.php to review the settings...
I test the connection to mysql with the provided button and to my surprise I get this error:
Error: Unable to connect to MySQL.
Debugging error number: 2002
Debugging error: php_network_getaddresses: getaddrinfo failed: Name or service not known
What happened overnight?
I am searching the web but I get long winded forum streams....
Pierre Durand