Comments (15)
First check your current permissions a day post them:
ls -l /var/www
ls -l /var/www/torque
Just to be sure, try running this command:
sudo chown -R www-data:www-data /var/www
Finally see if anything changed:
ls -l /var/www
ls -l /var/www/torque
Start with this, but eventually you'll want to add your user to the www-data group and give owner/group permissions of these folders (so you can edit files and not have to use root and thus reset ownership afterwards).
from torque.
surfrock66@sr66-blade:/var/log/apache2$ ls -l /var/www
total 40
drwxr-xr-x 3 www-data users 4096 Sep 16 2013 ajaxplorer
drwxrwsr-x 2 surfrock66 www-data 4096 Oct 3 2013 ajaxterm
drwxr-xr-x 4 www-data users 4096 Sep 9 2013 apps-proxy
drwxr-xr-x 2 root root 4096 Apr 3 05:21 html
-rw-r--r-- 1 root www-data 177 Nov 5 2013 index.html
drwxrwsr-x 2 surfrock66 www-data 4096 Jan 2 2014 maps
drwxr-xr-x 5 root root 4096 Sep 9 2013 proftpd
-rw-r--r-- 1 root root 0 Sep 17 2013 server.key
drwxr-xr-x 4 surfrock66 surfrock66 4096 Jul 23 21:32 torque
drwxr-xr-x 21 www-data users 4096 Nov 19 2013 ttrss
drwxrwsr-x 3 www-data www-data 4096 Sep 25 2013 webvnc
surfrock66@sr66-blade:/var/log/apache2$ ls -l /var/www/torque
total 64
-rw-r--r-- 1 surfrock66 surfrock66 214 Jul 23 21:32 creds.php
drw-r--r-- 2 surfrock66 surfrock66 4096 Jul 23 21:31 data
-rw-r--r-- 1 surfrock66 surfrock66 1629 Jul 23 21:31 export.php
-rw-r--r-- 1 surfrock66 surfrock66 843 Jul 23 21:31 get_columns.php
-rw-r--r-- 1 surfrock66 surfrock66 880 Jul 23 21:31 get_sessions.php
-rw-r--r-- 1 surfrock66 surfrock66 1679 Jul 23 21:31 parse_functions.php
-rw-r--r-- 1 surfrock66 surfrock66 2756 Jul 23 21:31 plot.php
-rw-r--r-- 1 surfrock66 surfrock66 18334 Jul 23 21:31 session.php
drw-r--r-- 4 surfrock66 surfrock66 4096 Jul 23 21:31 static
-rw-r--r-- 1 surfrock66 surfrock66 69 Jul 23 21:31 timezone.php
-rw-r--r-- 1 surfrock66 surfrock66 1526 Jul 23 21:31 upload_data.php
-rw-r--r-- 1 surfrock66 surfrock66 1204 Jul 23 21:31 url.php
surfrock66@sr66-blade:/var/log/apache2$ sudo chown -R www-data:www-data /var/www
[sudo] password for surfrock66:
surfrock66@sr66-blade:/var/log/apache2$ ls -l /var/www
total 40
drwxr-xr-x 3 www-data www-data 4096 Sep 16 2013 ajaxplorer
drwxrwsr-x 2 www-data www-data 4096 Oct 3 2013 ajaxterm
drwxr-xr-x 4 www-data www-data 4096 Sep 9 2013 apps-proxy
drwxr-xr-x 2 www-data www-data 4096 Apr 3 05:21 html
-rw-r--r-- 1 www-data www-data 177 Nov 5 2013 index.html
drwxrwsr-x 2 www-data www-data 4096 Jan 2 2014 maps
drwxr-xr-x 5 www-data www-data 4096 Sep 9 2013 proftpd
-rw-r--r-- 1 www-data www-data 0 Sep 17 2013 server.key
drwxr-xr-x 4 www-data www-data 4096 Jul 23 21:32 torque
drwxr-xr-x 21 www-data www-data 4096 Nov 19 2013 ttrss
drwxrwsr-x 3 www-data www-data 4096 Sep 25 2013 webvnc
surfrock66@sr66-blade:/var/log/apache2$ ls -l /var/www/torque
total 64
-rw-r--r-- 1 www-data www-data 214 Jul 23 21:32 creds.php
drw-r--r-- 2 www-data www-data 4096 Jul 23 21:31 data
-rw-r--r-- 1 www-data www-data 1629 Jul 23 21:31 export.php
-rw-r--r-- 1 www-data www-data 843 Jul 23 21:31 get_columns.php
-rw-r--r-- 1 www-data www-data 880 Jul 23 21:31 get_sessions.php
-rw-r--r-- 1 www-data www-data 1679 Jul 23 21:31 parse_functions.php
-rw-r--r-- 1 www-data www-data 2756 Jul 23 21:31 plot.php
-rw-r--r-- 1 www-data www-data 18334 Jul 23 21:31 session.php
drw-r--r-- 4 www-data www-data 4096 Jul 23 21:31 static
-rw-r--r-- 1 www-data www-data 69 Jul 23 21:31 timezone.php
-rw-r--r-- 1 www-data www-data 1526 Jul 23 21:31 upload_data.php
-rw-r--r-- 1 www-data www-data 1204 Jul 23 21:31 url.php
surfrock66@sr66-blade:/var/log/apache2$
from torque.
That looks like it should have done the trick. Your ownerships were definitely messed up. Does it work now?
from torque.
Now my error.log looks like this...thousands of entries of it:
[Thu Jul 24 13:28:54.070479 2014] [:error] [pid 1616] [client 198.217.64.22:55746] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /var/www/torque/parse_functions.php on line 6, referer: http://hda.surfrock66.com/torque/session.php
[Thu Jul 24 13:28:54.070505 2014] [:error] [pid 1616] [client 198.217.64.22:55746] PHP Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /var/www/torque/parse_functions.php on line 7, referer: http://hda.surfrock66.com/torque/session.php
[Thu Jul 24 13:28:54.070530 2014] [:error] [pid 1616] [client 198.217.64.22:55746] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /var/www/torque/parse_functions.php on line 6, referer: http://hda.surfrock66.com/torque/session.php
[Thu Jul 24 13:28:54.070558 2014] [:error] [pid 1616] [client 198.217.64.22:55746] PHP Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /var/www/torque/parse_functions.php on line 7, referer: http://hda.surfrock66.com/torque/session.php
from torque.
I dug into it a bit and think you're getting these errors in parse_functions.php because of the changes made to CSV file parsing in PHP 5.5 (which your server is running), so I modified the CSVtoJSON function in parse_functions.php to work with all PHP 5.x versions. Go ahead and replace your current file with the updated parse_functions.php file and let me know if that solves the issue you're having.
from torque.
Error when plotting:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '! FROM raw_logs WHERE sessio' at line 1
I don't see that SQL call in this file or plot...I'm looking through the source, but you may know it faster.
from torque.
By the way it's public for now, if you want to see: http://hda.surfrock66.com/torque/
from torque.
Browsing to your session.php file and inspecting the requests, I see that tons (all) of your static resources are failing to load. This is because you don't have the static
folder at torque/static/
with all the js/css files it is asking for! You also don't have the data
folder at torque/data/
, which also explains why the earlier command about parsing the CSV file was failing. That file is supposed to be at torque/data/torque_keys.csv
.
So you need to copy the static folder and the data folder to your torque directory.
As for the error with SQL syntax, there is a call that looks like what you posted in plot.php: here is the line.
After you copy the static and data folders to your torque directory, make sure your permissions are set. Just run these commands to get everything squared away after copying in the files:
sudo chmod -R 644 /var/www/torque/*
sudo chmod 755 /var/www/torque/
sudo chown -R www-data:www-data /var/www/torque
from torque.
weird...I ran that yesterday and it didn't run recursively. I just chmod'd static and data to 755 and now it works fine.
from torque.
I still get some errors choosing specific sensors though. Choose "Speed ODB" and you'll see that. I dropped the new parse_functions.php in there.
from torque.
Looks like it's working just fine. Remember you have to select a session first, then select your sensors. The default map that is shown when you go to session.php is a map of Area 51, not your GPS data. So selecting sensors from the default session page doesn't do any good.
from torque.
Try this: go to session.php. Choose the 2nd session (July 24, 2014 03:53pm) then select "Speed (OBD)" and hit plot. I see the map fine, but when I hit plot, I'm taken here: http://awesomescreenshot.com/05437oda6b URL is http://hda.surfrock66.com/torque/session.php?id=1406242396033&s1=kd&s2=Plot!
from torque.
You need to select exactly 2 sensors (so Speed OBD + something else) and it will render properly. I was able to replicate the problem you described though when I only selected 1 sensor.
This points out a useful bug though -- if the user only selects 1 sensor to plot, then it should only plot that 1 or it should automatically select a 2nd for them to avoid this error. I'll try and find time to fix that this weekend.
from torque.
Makes sense, thanks! Thanks for helping me figure this out, and I really appreciate this as I prefer self-hosted solutions.
The only other feature I'd like to see (and I don't think you can necessarily do this) is transferring data from Ian's version into this one...he'd first have to enable an export for you to have an import, unless you can think of a way to upload old tracks from the app itself (which
from torque.
Hi,
Any resolution to mysql issues referred in 'As for the error with SQL syntax, there is a call that looks like what you posted in plot.php: here is the line.'
Thanks.
from torque.
Related Issues (20)
- plot.php mysql
- Unknown column 'kd' in 'field list' HOT 5
- Map issue HOT 3
- url.php HOT 2
- map_matching issue
- Upgraded to php7 HOT 4
- OBD data not uploading HOT 10
- Maps not displaying without Google Maps API Key HOT 1
- Question: Upload continues after ride ends HOT 4
- Change demo link to working link HOT 1
- There is no session to select
- Web server showing blank page HOT 2
- Database Parameters HOT 2
- incompatible with sql_mode=only_full_group_by HOT 2
- Farenheight
- Sync problem after installing ssl on the server HOT 3
- Uploading faults to web server
- error in configuring websever HOT 32
- Torque API HOT 3
- Export data by Torque HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torque.