sipcapture / homer-api

HOMER 5: Back-End (API) DEPRICATED - use sipcapture/homer-app
http://sipcapture.org
27 stars 67 forks source link

DB won't connect unless the connector is explicitly defined #60

Closed Jaykah closed 8 years ago

Jaykah commented 8 years ago

I was getting the following error when trying to log in:

[Thu Nov 26 00:36:58.274946 2015] [:error] [pid 40264] [client 10.0.0.7:59922] PHP Notice:  Use of undefined constant DATABASE_CONNECTOR - assumed 'DATABASE_CONNECTOR' in /var/www/html/api/Authentication/internal.php on line 54

Which was solved by adding:

define('DATABASE_CONNECTOR', 'PDOConnector');

to the configuration.php file

Just wanted to leave it here in case anyone encounters the same issue. Plus it would be great to update the sample config file with that line.

lmangani commented 8 years ago

@Jaykah thanks what is your OS and version? PHP Notices in general are best disabled for Homer

Jaykah commented 8 years ago

@lmangani


DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

I have only enabled that notice for debugging purposes.

adubovikov commented 8 years ago

but we have already it in the preferences.php

https://github.com/sipcapture/homer-api/blob/master/api/preferences.php#L57 not needed redefine it twice.