Steve,

Comments below.

Gary

On Thursday, 22 June 2017 11:37:20 UTC+10, Steve2Q wrote:
>
> Gary,  I have been plodding along but no joy. What is happening is after I 
> make the changes to weewx.conf, post_gauge-data.php, etc., Weewx wont even 
> start, so I don't have a syslog file for you to look at.
>

Looking at the weewx.conf you posted you have two [RealtimeGaugeData] 
stanzas:

# This is the stanza for Real Time Guage Data

[RealtimeGaugeData]
    [RealtimeGaugeData]

This will certainly cause weeWX to hiccup very early in the startup, though 
it should give some output to log. I put the same config on a test system 
and received the following in the log:

Jun 22 15:24:17 jessie114 weewx[2288]: engine: Initializing weewx version 
3.7.1
Jun 22 15:24:17 jessie114 weewx[2288]: engine: Using Python 2.7.9 (default, 
Jun 29 2016, 13:08:31) #012[GCC 4.9.2]
Jun 22 15:24:17 jessie114 weewx[2288]: engine: Platform Linux-3.16.0-4-amd64
-x86_64-with-debian-8.8
Jun 22 15:24:17 jessie114 weewx[2288]: engine: Locale is 'en_AU.UTF-8'
Jun 22 15:24:17 jessie114 weewx[2288]: engine: pid file is /var/run/weewx.
pid
Jun 22 15:24:17 jessie114 weewx[2279]: Starting weewx weather system: weewx.
Jun 22 15:24:17 jessie114 weewx[2292]: engine: Error while parsing 
configuration file /home/weewx/weewx.conf
Jun 22 15:24:17 jessie114 weewx[2292]: ****    Reason: 'Duplicate section 
name at line 407.'

You need to remove the second [RealtimeGaugeData] heading. I had a look 
through your posted weewx.conf and nothing else jumps out at me, though the 
proof will be in the pudding so to speak. Once you have made that change 
stop then start weeWX and see how it goes. If weeWX still appears not to 
start, and nothing seems to be in the log, then run weeWX directly; 
<http://weewx.com/docs/usersguide.htm#Running_directly> that should give 
you some output direct to screen and hopefully it will indicate what the 
problem is.

Before we worry about the HTTP POST side of things we need to make sure 
gauge-data.txt is being generated by weeWX, if it isn't we will likely end 
up chasing our tails trying to sort out HTTP POST.
 

> If you have the time, maybe you could look over some files and see if you 
> can find what I am doing wrong.
>
> This is my web server structure:
> root directory
>  |
>   -photokinetics.org
>    |
>  -Weather
>       |
> - all my weather data in which I created a folder called gauges (which is 
> empty)
>
> On my Weewx machine (RaspberryPi) I used setup.py to do the initial 
> install of weewx.
>
>  First attachment is my post_gauge-data.php file.
>
> Next is my weewx.conf file renamed weewx.conf.modded.txt
>
> rtg.py is in /home/weewx/bin/user
>
> My web server has a folder called .php which contains folders labeled 7.0, 
> 5.6, 5.5, 5.4 and 5.3  Does this mean that my server has php installed and 
> configured?
>

Would seem to be a good sign, if I go to 
http://photokinetics.org/Weather/post_gauge-data.php in my browser I get 
the following error message displayed: 

Parse error: syntax error, unexpected '/' in /home/n2qlq/photokinetics.org/
Weather/post_gauge-data.php on line 28

That tells me 2 things. Firstly, PHP is installed because line 28 is trying 
to be executed (rather than 'displayed' which is what would happen if PHP 
was not enabled). Secondly, there is an error at line 28 in the file. 
Looking at the post_gauge-data.php you posted line 28 is:

$json_file = /photokinetics.org/Weather/gauges/gauge-data.txt

whereas the original was:

$json_file = "data/gauge-data.txt";

so you need to put the quotes back in and end the line with a semi-colon. 
If I am reading your server directory structure correctly (some of those 
lines don't line up to well on a web page) you probably want $json_file to 
be set as follows:

$json_file = "gauges/gauge-data.txt";


> Anyway, Gary, I really appreciate your time in trying to help me out.
>
> Steve
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to