[GH-ISSUE #7] can't login #1

Closed
opened 2026-03-02 03:21:11 +03:00 by kerem · 2 comments
Owner

Originally created by @ghost on GitHub (Jan 23, 2018).
Original GitHub issue: https://github.com/clonos/control-pane/issues/7

Originally assigned to: @olevole on GitHub.

I build clonos on freebsd 11 following this guide.

some log

2018/01/23 18:26:09 [error] 4986#100703: *36 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function query() on null in /usr/local/www/clonos/php/db.php:149
Stack trace:
#0 /usr/local/www/clonos/php/clonos.php(2478): Db->selectAssoc('select id,usern...')
#1 /usr/local/www/clonos/php/clonos.php(368): ClonOS->userRegisterCheck(Array)
#2 /usr/local/www/clonos/php/clonos.php(183): ClonOS->login()
#3 /usr/local/www/clonos/public/json.php(12): ClonOS->__construct('/usr/local/www/...')
#4 {main}
  thrown in /usr/local/www/clonos/php/db.php on line 149" while reading response header from upstream, client: 192.168.0.21, server: , request: "POST /json.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "192.168.0.16", referrer: "http://192.168.0.16/overview/"
Originally created by @ghost on GitHub (Jan 23, 2018). Original GitHub issue: https://github.com/clonos/control-pane/issues/7 Originally assigned to: @olevole on GitHub. I build clonos on freebsd 11 following this [guide](https://clonos.tekroutine.com/installation_on_freebsd.html). some log ``` 2018/01/23 18:26:09 [error] 4986#100703: *36 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function query() on null in /usr/local/www/clonos/php/db.php:149 Stack trace: #0 /usr/local/www/clonos/php/clonos.php(2478): Db->selectAssoc('select id,usern...') #1 /usr/local/www/clonos/php/clonos.php(368): ClonOS->userRegisterCheck(Array) #2 /usr/local/www/clonos/php/clonos.php(183): ClonOS->login() #3 /usr/local/www/clonos/public/json.php(12): ClonOS->__construct('/usr/local/www/...') #4 {main} thrown in /usr/local/www/clonos/php/db.php on line 149" while reading response header from upstream, client: 192.168.0.21, server: , request: "POST /json.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "192.168.0.16", referrer: "http://192.168.0.16/overview/" ```
kerem closed this issue 2026-03-02 03:21:11 +03:00
Author
Owner

@olevole commented on GitHub (Jan 23, 2018):

It seems you do not have a database with accounts. Initialization of the database occurs via:

git clone https://github.com/cbsd/cbsd-forms-clonos_database.git /usr/local/cbsd/modules/forms.d/clonos_database

+

cbsd initenv

After this operation default databases will be placed on:

/var/db/clonos/clonos.sqlite

you can check that this database exists and your web user has access there ?

E.g.:

su -m www -c 'sqlite3 /var/db/clonos/clonos.sqlite "SELECT username FROM auth_user"'

If web user is www.
This user should be in 'cbsd' group and /var/db/clonos/clonos.sqlite must have read/write access to the web user.

<!-- gh-comment-id:359895836 --> @olevole commented on GitHub (Jan 23, 2018): It seems you do not have a database with accounts. Initialization of the database occurs via: ~~~ git clone https://github.com/cbsd/cbsd-forms-clonos_database.git /usr/local/cbsd/modules/forms.d/clonos_database + cbsd initenv ~~~ After this operation default databases will be placed on: _/var/db/clonos/clonos.sqlite_ you can check that this database exists and your web user has access there ? E.g.: ~~~ su -m www -c 'sqlite3 /var/db/clonos/clonos.sqlite "SELECT username FROM auth_user"' ~~~ If web user is **www**. This user should be in 'cbsd' group and /var/db/clonos/clonos.sqlite must have read/write access to the web user.
Author
Owner

@ghost commented on GitHub (Jan 26, 2018):

problem has sloved, thank you

<!-- gh-comment-id:360779983 --> @ghost commented on GitHub (Jan 26, 2018): problem has sloved, thank you
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/control-pane#1
No description provided.