# DreamFactory 2 authorization error

**URL:** <https://community.dreamfactory.com/t/dreamfactory-2-authorization-error/1764>\
**Category:** Authentication & Security\
**Created:** [November 12, 2015, 9:02pm UTC](https://community.dreamfactory.com/t/dreamfactory-2-authorization-error/1764 "2015-11-12T21:02:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkobilov](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@tkobilov](https://community.dreamfactory.com/u/tkobilov)\
**Post date:** [November 12, 2015, 9:02pm UTC](https://community.dreamfactory.com/t/dreamfactory-2-authorization-error/1764/1 "2015-11-12T21:02:34Z")

</div>

I have installed DF2 from GitHub with a postgresql as a DB. There were no error messages during installation. Then I entered into DF using admin’s email/password. It was OK and I can see Profile of Admin user. However I got following errors in apache2 log:

```
[Thu Nov 12 22:54:12.941506 2015] [:error] [pid 2886] [client 37.204.150.51:50852] REST Exception #401 > Invalid credentials supplied., referer: http://needgeo.com/dreamfactory/dist/index.html

[Thu Nov 12 22:54:13.904079 2015] [:error] [pid 2886] [client 37.204.150.51:50852] REST Exception #404 > Record not found, referer: http://needgeo.com/dreamfactory/dist/index.html

```

and in dreamfactory.log:

```
[2015-11-12 19:53:47] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:53:47] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:53:48] local.DEBUG: Resource event: system.environment.get.pre_process  
[2015-11-12 19:53:48] local.DEBUG: Resource event: system.environment.get.post_process  
[2015-11-12 19:53:48] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:53:48] local.DEBUG: Resource event: system.environment.get.pre_process  
[2015-11-12 19:53:48] local.DEBUG: Resource event: system.environment.get.post_process  
[2015-11-12 19:54:12] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:12] local.DEBUG: Resource event: user.session.post.pre_process  
[2015-11-12 19:54:12] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:12] local.DEBUG: Resource event: system.admin.session.post.pre_process  
[2015-11-12 19:54:13] local.DEBUG: Resource event: system.admin.session.post.post_process  
[2015-11-12 19:54:13] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:13] local.DEBUG: Resource event: user.custom.get.pre_process  
[2015-11-12 19:54:13] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.DEBUG: Service event: system.get.pre_process  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.app.get.pre_process  
[2015-11-12 19:54:14] local.DEBUG: Service event: system.get.post_process  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.service_type.get.pre_process  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.config.get.pre_process  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.service.get.pre_process  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.environment.get.pre_process  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.environment.get.post_process  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.role.get.pre_process  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.admin.get.pre_process  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.config.get.post_process  
[2015-11-12 19:54:14] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:14] local.DEBUG: Resource event: system.user.get.pre_process  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.role.get.post_process  
[2015-11-12 19:54:15] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.email_template.get.pre_process  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.service.get.post_process  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.app.get.post_process  
[2015-11-12 19:54:15] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.lookup.get.pre_process  
[2015-11-12 19:54:15] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:15] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.email_template.get.post_process  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.cors.get.pre_process  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.app_group.get.pre_process  
[2015-11-12 19:54:15] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:15] local.ALERT: Could not get cors config from DB - SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: select * from "cors_config" where enabled = 1
                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "cors_config" where enabled = 1)  
[2015-11-12 19:54:15] local.DEBUG: Resource event: system.event.get.pre_process  
[2015-11-12 19:54:16] local.DEBUG: Resource event: system.event.get.post_process  
[2015-11-12 19:54:16] local.DEBUG: Resource event: system.script_type.get.pre_process  
[2015-11-12 19:54:16] local.DEBUG: Resource event: system.lookup.get.post_process  
[2015-11-12 19:54:16] local.DEBUG: Resource event: system.cors.get.post_process  
[2015-11-12 19:54:16] local.DEBUG: Resource event: system.app_group.get.post_process  
[2015-11-12 19:54:16] local.DEBUG: Resource event: system.script_type.get.post_process  
[2015-11-12 19:54:22] local.DEBUG: Resource event: system.service_type.get.post_process

```

If I press Refresh button it sends me on login page again. If I change something in the profile and press Update then nothing happened. Next visiting profile shows old data.

What might be the reason? Thank you!

---

<div class="post-metadata">

**Author:** ![tkobilov](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@tkobilov](https://community.dreamfactory.com/u/tkobilov)\
**Post date:** [November 13, 2015, 12:50pm UTC](https://community.dreamfactory.com/t/dreamfactory-2-authorization-error/1764/2 "2015-11-13T12:50:25Z")

</div>

Migrating back to MySql solves the problem but of course it is not a solution because I want to use pgsql for my users.

PostrgreSQL log shows:

```
2015-11-13 14:54:37 MSK STATEMENT: select * from "cors_config" where enabled = 1
2015-11-13 14:54:38 MSK ERROR: operator does not exist: boolean = integer at character 43
2015-11-13 14:54:38 MSK HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
```

---

<div class="post-metadata">

**Author:** ![vargasbo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/vargasbo/32/618_2.png) [@vargasbo](https://community.dreamfactory.com/u/vargasbo)\
**Post date:** [February 25, 2016, 7:45pm UTC](https://community.dreamfactory.com/t/dreamfactory-2-authorization-error/1764/3 "2016-02-25T19:45:26Z")

</div>

Where you able to solve the issue and what was the cause?

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [March 2, 2016, 3:44pm UTC](https://community.dreamfactory.com/t/dreamfactory-2-authorization-error/1764/4 "2016-03-02T15:44:46Z")

</div>

This should be resolved. The latest version of DreamFactory (2.1) has been tested to use SQLite, MySQL, Postgres, and MS SQL
