wifidog / wifidog-auth

Repository for the PHP wifidog captive portal auth server
194 stars 121 forks source link

cannot connect database when install.php #8

Open limulidae opened 8 years ago

limulidae commented 8 years ago

Database connection

Trying to open a Postgresql database connection :

Unable to connect to database! Please make sure the server is online and the database "" exists. Also 'postgresql.conf' and 'pg_hba.conf' must allow the user "" to open a connection to it on host "" port 0 to continue. See the error above for clues on what the problem may be.

Please go back and retry with correct values, or fix your server configuration.

Refresh
first-leon commented 8 years ago

Yes, I confirm the bug! ubuntu 14.04 AMD 64 PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)

first-leon commented 8 years ago

Befor run install.php, i change right to config.php (for www-data only read and exec). I write manualy parameters in config.php. And run install.php! It is work!

bobble6956 commented 8 years ago

I leave permission 500 for config.php, it doesn't pass Folder Permissions check. If leave it writable, got error when connecting to DB, how can I solve that?

littlewine commented 8 years ago

Hello everyone, I am having the same bug as I am trying to install it on a raspberryPI. It is weird that no matter what I type on the browser on install.php, the value seems to be written directly into the file, but on the next page, where the psql authentication fails, those values seem to be empty.

Thanks!

Karenka91 commented 8 years ago

Hi,

i have the same Problem as littlewine. I want to install wifidog on Debian 8.5, but Wifidog can't access the database. I get the same message as limulidae.

When i look into the config.php all values are saved correctly. I installed phppgadmin and I can connect to the database without problems. So its neither a php nor a DB problem. If there is any way to get wifidog to work with this bug pls tell us ;)

Thanks

littlewine commented 8 years ago

Simple but working work-around. I changed the config.php values manually to those created on postgresql and hardcoded them into install.php too. I just wanted to see at the moment if I could pass that step and I did after all, now I am stuck on the next one (see the other open issues)! :)

Karenka91 commented 8 years ago

even when i nail it into the install.php it does not work :(

Karenka91 commented 8 years ago

ok now i figuered out that the file uses the username as port and the port as pw --- i try it tommorow again by changing the right values

mastrus commented 7 years ago

@Karenka91 i'm also trying to install wifidog on debian 8.7 and I have the same issue:

Hi,

i have the same Problem as littlewine. I want to install wifidog on Debian 8.5, but Wifidog can't access the database. I get the same message as limulidae.

When i look into the config.php all values are saved correctly. I installed phppgadmin and I can connect to the database without problems. So its neither a php nor a DB problem. If there is any way to get wifidog to work with this bug pls tell us ;)


after the spep of checking permission i run the command sudo chmod g-w /var/www/wifidog-auth/wifidog/config.php

and the installation goes fine

chenwq3 commented 7 years ago

I also encountered this problem. Any solution found?

information

Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial Linux odroid 3.10.104-131 #1 SMP PREEMPT Sat Feb 18 01:04:01 UTC 2017 armv7l armv7l armv7l GNU/Linux wifidog-gateway & wifidog-auth are both pulled from github.com

sousavarela commented 3 years ago

hi,

I have the same error, I changed the version of postgres to PostgreSQL 9.3.25 and the first one worked. thanks