Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server returning null response for fetching uploaded data #21

Closed
bhanuc opened this issue Mar 2, 2016 · 5 comments
Closed

Server returning null response for fetching uploaded data #21

bhanuc opened this issue Mar 2, 2016 · 5 comments

Comments

@bhanuc
Copy link

bhanuc commented Mar 2, 2016

I have configured everything almost correctly ( apache2 server on laptop accessible on 192.168.1.102 and all values set correctly in both config file and front-end file) Now when I run software using make run, I get logs like :
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949921
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949921
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949927
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949927
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949931
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949931
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949932
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:18:1456949938
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949940
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949946
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949949
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949951
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949956
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949960
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949961
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949965
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949972
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949972
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949976
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949976
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949980
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949982
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949985
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949985
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:19:1456949993
200:Count: 2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950001
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950001
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950002
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950010
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950010
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950019
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950021
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950022
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950025
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950029
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950031
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950035
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950038
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950045
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950047
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950052
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:20:1456950054
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950060
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950061
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950064
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950071
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950074
200:Count: 2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950077
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950081
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950084
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950085
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950089
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950092
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950096
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950101
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950101
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950106
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950110
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950114
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950116
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950118
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:21:1456950118
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950123
200:Count: 1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950124
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950124
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950133
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950134
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950134
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950137
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950137
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950138
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950140
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950143
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950146
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950148
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950156
200:Count: 2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950158
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950159
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950165
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950166
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950168
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950169
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950176
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:22:1456950177
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:23:1456950181
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:23:1456950182
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:23:1456950182
200:Count: -2
Location: 1
Raw Timestamp: 2016-03-02 20:23:1456950186
200:Count: 2
Location: 1
Raw Timestamp: 2016-03-02 20:23:1456950188
200:Count: -1
Location: 1
Raw Timestamp: 2016-03-02 20:23:1456950192

Which seems like it is recording the data, but events page always return a json response. Where should I start debugging. Thanks

@DHaylock
Copy link
Contributor

DHaylock commented Mar 3, 2016

Hi @bhanuc,

What json response are you getting?

@bhanuc
Copy link
Author

bhanuc commented Mar 3, 2016

The response is completely empty.

On Thu, Mar 3, 2016 at 3:14 PM, David Haylock notifications@github.com
wrote:

Hi @bhanuc https://github.com/bhanuc,

What json response are you getting?


Reply to this email directly or view it on GitHub
#21 (comment)
.

@DHaylock
Copy link
Contributor

DHaylock commented Mar 3, 2016

Is it this [ ] ?

Can you check your database to see if the data is going into it?

@bhanuc
Copy link
Author

bhanuc commented Mar 3, 2016

Yes it is [ ] and in the database I just noticed that the time stamp values are all 0000-00-00 00:00:00 whereas the pi console shows the correct time stamp 2016-03-03 20:48:1457038123. rest values are correct.

@DHaylock
Copy link
Contributor

DHaylock commented Apr 5, 2016

Hi @bhanuc,

The php script was nulling the timestamp so have removed my_real_escape_string.

You might need to change this line Line 220 to be a capital S.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants