bfabiszewski / ulogger-server

μlogger • web viewer for tracks uploaded with μlogger mobile client
GNU General Public License v3.0
538 stars 85 forks source link

Blank user/tracks dropdown boxes #119

Closed MalakymR closed 4 years ago

MalakymR commented 4 years ago

Fresh install on CentOS 8 shows blank user/tracks selections.

Database shows user, and track and positions created from client.

Installed modules php-common, php-json, php-pdo, php-mysqlnd, php-session, php-simplexmp, php-xmlwriter installed. (Are there any new modules needed?)

No errors in httpd error logs.

ulogger-server Screenshot from 2020-04-17 22-28-17

bfabiszewski commented 4 years ago

I assume you are using latest dev build. Did you upgrade database to new scheme? I tried to note required the changes here. Bear in mind this is still work in progress.

MalakymR commented 4 years ago

Latest, and this is fresh install so no upgrade done.

What I am seeing is no specific SQL requests on page refresh.

This is what mysql runs on refreshing the page (after login) - it seems to not be making any kind of request for list of users or tracks etc.

2020-04-19T18:16:24.674340Z   112 Query SET NAMES 'utf8'
2020-04-19T18:16:24.674536Z   112 Prepare   SELECT name, value FROM config
2020-04-19T18:16:24.674554Z   112 Execute   SELECT name, value FROM config
2020-04-19T18:16:24.674793Z   112 Prepare   SELECT id, name, url, priority FROM ol_layers
2020-04-19T18:16:24.674830Z   112 Execute   SELECT id, name, url, priority FROM ol_layers
2020-04-19T18:16:24.674958Z   112 Close stmt    
2020-04-19T18:16:24.674971Z   112 Close stmt    
2020-04-19T18:16:24.675327Z   112 Quit  

Not seeing an error in php or httpd logs (thinking maybe missing component, but seems okay).

bfabiszewski commented 4 years ago

Did setup script finish without problems? I will have to try fresh install myself. Automated tests might not detect some problems. Regarding required modules see what I use in docker.

MalakymR commented 4 years ago

No problems with the script. The database layout was setup and I can login with my new user too.

Tracks from the phone get through okay and I can see in the database if I look directly.

Packages sometimes vary on systems so have to figure out which packages, but it seems all are detected fine (these are all php7 even though the package isn't php7-

dnf install php-ctype php-fpm php-json php-pdo php-session php-simplexml php-xmlwriter
Last metadata expiration check: 0:00:33 ago on Sun 19 Apr 2020 19:32:26 BST.
Package php-common-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.
Package php-fpm-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.
Package php-json-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.
Package php-pdo-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.
Package php-common-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.
Package php-xml-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.
Package php-xml-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.

dnf install php-mysqlnd
Last metadata expiration check: 0:02:18 ago on Sun 19 Apr 2020 19:32:26 BST.
Package php-mysqlnd-7.2.11-2.module_el8.1.0+209+03b9a8ff.x86_64 is already installed.
bfabiszewski commented 4 years ago

Any errors in browser javascript console?

MalakymR commented 4 years ago

I've found the problem thank you.

Didn't think to use the console - showed /js/dist/bundle.js was missng.

Checked extracted zip file, it was missing.

It seems "unzip" is missing this file/folder out.

When unzipping in "Archive Manager" in Gnome it works fine.

I installed git and cloned the repo and its extracted fine, and everything works.

You can see here unzip (UnZip 6.00) simply passes by the files inside.

  inflating: ulogger-server-master/index.php  
   creating: ulogger-server-master/js/
   creating: ulogger-server-master/js/dist/
 extracting: ulogger-server-master/js/dist/.gitignore  
   creating: ulogger-server-master/js/src/
MalakymR commented 4 years ago

Hi,

In regards to upgrade script, I have collected everything needed to "upgrade".

The only thing this is missing - is reading settings from the old config.php and setting the database based on that.

I would suggest always writing changes into .sql update files, even if its not for a release.

https://gist.github.com/MalakymR/b803a3a9b6c1c8a0705584e418f62221

I've not used "use " as ideally the user should "mysql -p

" to run the script On 19/04/2020 20:09, Bartek Fabiszewski wrote: > > Any errors in browser javascript console? > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > , > or unsubscribe > . >