Closed FlamingSpork closed 8 years ago
The DB schema is in a file that must be imported first, /sql/scouting_structure.2016.sql. @samperlmutter and @wazateer1 can give you a hand if you need more assistance. The database should be completely empty.
Once you start submitting some scouting forms you will have some data. Not sure if what you meant by empty was the lack of data or the lack of tables.
I've imported the structure, but now it doesn't let me log in either with the admin user or a user I created.
You shouldn't need to log in to scout @wazateer1 and @samperlmutter can help you with the wagering madness that was added on.
Hey FlamingSpork, thanks for trying out our Scouting System! Did you make the accounts after you imported the structure? This is important. I see you have direct access to your SQL server, try "SELECT * FROM scouters" to see if the accounts are in your SQL database.
Also, as a way of making the admin account customizable, it must be created first by registering it. This way it may have whatever name you want, but to make sure that not anyone can create the admin account the account must be created with the password "password", or whatever will md5hash into $adminPswsHash
I tried creating some accounts after importing the structure, but it still says that they are invalid. I did create the admin account as you suggested, but it doesn't allow me to log in to it.
Huh, that sounds odd. Maybe the php scripts ar enot running properly? If you are using a browser with developer options, try viewing the requests your browser is making. On google chrome it's Ctrl+Shift+J and then the Network tab. Once you click login on the login page it should show a request to checkUser.php. By clicking that request and then clicking the response option you can see what kind of data the php script is sending back.
The login fails with a error 500. This is what the console says:
POST http://localhost/angular/php/checkUser.php 500 (Internal Server Error)
(anonymous function) @ angular.js:10661
q @ angular.js:10480
g @ angular.js:10187
(anonymous function) @ angular.js:14634
n.$eval @ angular.js:15916
n.$digest @ angular.js:15727
n.$apply @ angular.js:16024
(anonymous function) @ angular.js:23416
n.event.dispatch @ jquery-2.1.4.min.js:3
r.handle @ jquery-2.1.4.min.js:3
If the php is returning an error, it may be contained in what the server actually returns. Can you go to the Network tab and see the actual text it is returning?
Chrome says This request has no response data available.
Request details:
Request URL:http://localhost/angular/php/checkUser.php
Request Method:POST
Status Code:500 Internal Server Error
Remote Address:127.0.0.1:80
Response Headers
HTTP/1.0 500 Internal Server Error
Date: Sun, 17 Apr 2016 13:05:40 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.14
Content-Length: 0
Connection: close
Content-Type: text/html
Request Headers
POST /angular/php/checkUser.php HTTP/1.1
Host: localhost
Connection: keep-alive
Content-Length: 35
Pragma: no-cache
Cache-Control: no-cache
Accept: application/json, text/plain, */*
Origin: http://localhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Content-Type: application/json;charset=UTF-8
Referer: http://localhost/angular/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,es-419;q=0.6,es;q=0.4,en-GB;q=0.2
Request Payload
{"username":"spork","pswd":"spork"}
Firefox also reports an empty response.
Now that is odd. When we report an error in our own code, the first response header is usually a 500 SQL Error. Does your PHP error log report anything?
Apache reports a PHP error:
[Sun Apr 17 10:06:12.213706 2016] [:error] [pid 5338] [client 127.0.0.1:33607] PHP Fatal error: Call to undefined method mysqli_stmt::get_result() in /var/www/html/angular/php/functions.php on line 423, referer: http://localhost/angular/
A quick search seems to suggest that I need to install some Apache/PHP modules.
It works (or at least allows me to log in)! I needed to install php5-mysqlnd
and enable it in php.ini.
Thanks for your help!
Hello! I'm from team 3003, and I'm trying to use your scouting system. I have edited the config file:
Even though I created the scouting database, it it completely empty:
Whenever I try to login (either with admin or an account I just created) it fails.