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

Fresh install I get Invalid credentials #5

Closed
missnebun opened this issue Aug 17, 2016 · 9 comments
Closed

Fresh install I get Invalid credentials #5

missnebun opened this issue Aug 17, 2016 · 9 comments

Comments

@missnebun
Copy link

missnebun commented Aug 17, 2016

I follow in install instruction ... but I get Invalid Credentials
I install 411 in Ubuntu 16.04.1 LTS

The user exist in the database everything looks fine ... any idea ?

image

@Kennysan
Copy link

If you try re-running the create_user.php script and create a new user, are you able to log in with that user?

@missnebun
Copy link
Author

/var/www/411$ bin/create_user.php
Creating new user
Username: user1
Real name: user1
Password: user
Email: user@example.com
Admin (y/n): y

User created! ID: 2

image

Same thing.

I tried yesterday with CentOS6 and php 7 and I have the same problem... today I installed ubuntu and I have the same issue. Not sure what I am doing wrong.

@kiwiz
Copy link
Contributor

kiwiz commented Aug 17, 2016

Could you provide the database row (including password hash) for 'user1'?

@missnebun
Copy link
Author

sudo apt-get install apache2 libapache2-mod-php php-xml php7.0-sqlite php7.0-curl nodejs-legacy npm sqlite3 zip

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading 1.2.0...

Composer successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

sudo npm install -g grunt-cli bower

git clone https://github.com/kiwiz/411.git

sudo cp -R 411 /var/www/

sudo chown -R grosca:www-data /var/www/411/

sudo a2enmod rewrite
sudo a2enmod headers

sudo cat /etc/apache2/sites-enabled/411.conf

<VirtualHost *:80>
ServerName 411alerts.example.com

php_value include_path ".:/var/www/411/phplib"

DirectoryIndex index.php index.html index.htm
DocumentRoot /var/www/411/htdocs
<Directory /var/www/411/htdocs>
    AllowOverride Indexes FileInfo Options
    Options -Indexes +FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

sudo service apache2 restart

/var/www/411$ npm install

/var/www/411$ bower install

/var/www/411$ composer install

/var/www/411$ sqlite3 data.db < db.sql

/var/www/411$ sudo chmod 664 data.db

/var/www/411$ sudo chown grosca:www-data data.db

grosca@nyvm2906:/var/www/411$ bin/create_site.php
Creating new site
Site name: 411alerts.example.com
Hostname: nyvm2906
From email: alerts@example.com
From Error email: alerts@example.com
Default To email: alerts@example.com

Site created! ID: 1
grosca@nyvm2906:/var/www/411$ bin/create_user.php
Creating new user
Username: user1
Real name: user1
Password: user1
Email: ex@example.com
Admin (y/n): y

User created! ID: 1

$2y$10$ny3g2tcgU3D2aIL4DZ.AVOXzRgQce5MnaOEMN01KcgT5UG5kTL7.C

image

@kiwiz
Copy link
Contributor

kiwiz commented Aug 17, 2016

Ah, I've got it. You need to specify the full hostname that you're serving 411 from for the Hostname (not Site name). In this example, the hostname would be "411alerts.example.com". Lemme know if that works. :]

@missnebun
Copy link
Author

Damn !!!! that did the trick !!! Well my hostname of the server is nyvm2906 and my site name is 411alerts.example.com :))

Now I get this error:

[Wed Aug 17 13:27:47.685528 2016] [:error] [pid 25739] [client 10.246.12.170:55819] except [NONE] FOO\UnauthorizedException: "Invalid nonce specified" at [/var/www/411/phplib/REST.php:101] 0:[FOO\REST->route() called at [/var/www/411/htdocs/api/login.php:6]], referer: http://411alerts.example.com/login

any idea ?

image

@missnebun
Copy link
Author

I never got to login because I get this error now.

[Wed Aug 17 14:55:24.379220 2016] [:error] [pid 25738] [client 10.246.12.170:59647] except [NONE] FOO\UnauthorizedException: "Invalid nonce specified" at [/var/www/411/phplib/REST.php:101] 0:[FOO\REST->route() called at [/var/www/411/htdocs/api/login.php:6]], referer: http://411alerts.example.com/login

@kiwiz
Copy link
Contributor

kiwiz commented Aug 17, 2016

That's odd... I just created a Gitter. Will probably be easier to do the debugging there.

@missnebun
Copy link
Author

@kiwiz I think has something to do with dns . I set the hostname as the hostname of the server and works. 411.example.com was just an entry on my hosts file.

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

3 participants