[isf-wifidog] Trouble with Wifi Install

V Patel sgrlogs at gmail.com
Dim 27 Aou 16:22:46 EDT 2006


let me guess you edited the pg_hba.conf inside /usr/share/pgsql ? or the one
located in /usr/local/pgsq If you did edit pg_hba.conf file from one of
those location then you need to execute

pg_ctl reload

to have pgsql copy hba file in data directory. or you can simply edit
/var/lib/pgsql/data/pg_hba.conf . pgsql reads the file that is inside the
data directory. Also you shouldn't just copy install.php and index.php from
newer version. You should copy all files and folder from newer version. I
tested this on my server. When you just replace newer version of index.phpand
install.php, you get blank page. One more thing i mentioned this in earlier
post to enable error display inside php.ini so you can debug your problem.

On 8/26/06, Rajendra Jagad <rjagad at gmail.com> wrote:
>
> Hi V Patel.
>
> Thanks for the new information. checkout feature is pretty cools stuff.
> the way it downloads.
>
> I edited my pg_hba.conf file located outside the apache server on the same
> box in different dir.
> # "local" is for Unix domain socket connections only
> local   all         all                               trust
> # IPv4 local connections:
> host    wifidog    all        192.168.1.203/32    md5
>
> host    all          all         127.0.0.1/32          trust
> # IPv6 local connections:
> #host    all         all         ::1/128               trust
> The wifidog install.php and index.php cannot connect to database. located
> in /usr/local/pgsql  and the owner of pgsql directory is wifidog and group
> is wifidog
> drwxr-xr-x  9 wifidog wifidog 4096 Aug 25 17:38 pgsql I am not sure what
> the 9 means >>:-)
>
> I have made significant amount of progress and I get to database
> configuraiton page when I run
> http://localhost/wifidog-path/install.php. then next step is connect where
> the string does not display success or failure because in the install.phpthe script is commented out.
> when I lauch index.php it does let me know the unable to connect to
> database,  Then I was trying to debug the script to see where this message
> is comming from. and I found
> 41:                     echo sprintf(_("Unable to connect to database on
> %s"),CONF_DATABASE_HOST);
> 42:                     throw new Exception(sprintf(_("Unable to connect
> to database on %s"),CONF_DATABASE_HOST));
> ./classes/AbstractDbPostgres.php
> 40:     echo "<p class=warning>Unable to connect to database on
> ".CONF_DATABASE_HOST."</p>";
> ./classes/AbstractDbMySql.php
> 810:#          print "Unable to connect to database on
> $CONF_DATABASE_HOST<BR>The database must be online to continue.<BR>Please go
> back and retry with correct values";
> 849:          print "Unable to connect to database on
> <B>$CONF_DATABASE_HOST</B><BR>The database must be online to
> continue.<P>Please go back and retry with correct values";
> ./install.php
>
> Off course since I am using postgres I can ignoar the ./classes/AbstractDbMySql.php
> file
> and when I open the first one it is commented out. Hence I never get the
> message cannot connect to database on install.php The second line 849 my
> guess is that when index.php is run. One of the subroutines calls the
> check function from install.php and able go to line 849 to display the
> message unable to connect to database on localhost. But I am not sure is
> there a way to check if the message is comming from script or system
> generated messages which happens to be exactly same too.
>
> I copied the index.php and install.php from the new download. to by
> current install.php location when I run the
> http://localhost/wididog-path/install.php nothing displays :: same problem
> i run into when I remove the comments from my old index.php  it will not
> display on the browser either. so commiting out those lines does get the
> script to display and work but then if one is having database connection
> problems.. how does one debug ?
>
> Raj
>
> On 8/26/06, V Patel < sgrlogs at gmail.com> wrote:
> >
> > Are you sure you have the latest version? I believe you have the version
> > posted on Sourceforge. That is outdated one as it is not updated since last
> > year. Remember that wifidog has not reached version 1.0 yet so you can
> > get the latest version by using svn command. create a directory (lets say
> > wifidog-auth) change to that directory and type
> >
> > svn checkout https://dev.wifidog.org/svn/trunk/wifidog-auth
> >
> > This will download all the neccessory files. There have been significant
> > changes made to the project since the last upload on sourceforge. I
> > downloaded the sourceforge version and as you said it has line commented out
> > but the newer version has extra else statement. so download the newer one
> > with svn.
> >
> > - V Patel
> >
> >
> > On 8/26/06, Rajendra Jagad < rjagad at gmail.com> wrote:
> > >
> > > Hello Patel and Benoit, You guys were right on the the dot. I removed
> > > Postgresql and re-install it and now the service starts like It should.
> > > I ran a find command to grep any 'unable to connect to database' that
> > > shows when I pull up the index.php however that comment is only in the
> > > install.php file. So I am not sure if index.php does check on
> > > install.php before it starts.
> > > Line 810 and 849 are the two places where the unable to connect to
> > > database shows in the install.php script. the problem is 810 is
> > > commented out. and If I remove those comments '#" the script will not
> > > display in firefox. what is the reason of commting out the following script
> > > lines in install.php does anybody remember ?
> > >
> > >          print "Success<BR>";
> > >          #}
> > > #        } else {
> > > #          print "Unable to connect to database on
> > > $CONF_DATABASE_HOST<BR>The database must be online to continue.<BR>Please go
> > > back and retry with correct values";
> > > #          navigation(array(array("title" => "Back", "page" =>
> > > "database")));
> > > #        }
> > >
> > >         $postgresql_info = pg_version();
> > > #        $postgresql_info['server'];
> > > #        if ($postgresql_info['server'] > $requiredPostgeSQLVersion) {
> > > Todo : Do something }
> > >
> > >     Apprecaite the help ---------------------------------I am making
> > > progress.....slowly...
> > >
> > > Raj
> > >
> > >
> > > On 8/25/06, V Patel <sgrlogs at gmail.com> wrote:
> > > >
> > > > yes as Benoit mentioned your installation is somehow messed up, you
> > > > should be able to start postgresqld service by typing service postgresqld
> > > > start. But since you can still start pgsql by pointing out where the conf
> > > > filess try this: try editing pg_hba.conf located at /var/lib/pgsql/data/ add
> > > > or edit following line to read
> > > >
> > > > if you want to use md5 put this
> > > >
> > > > host         all         all         127.0.0.1/32       md5
> > > >
> > > > or you can put this to enable localhost to access without any
> > > > encryption.
> > > >
> > > > host         all         all         127.0.0.1/32       trust
> > > >
> > > > the default format is this
> > > >
> > > > host      database    user    IP-address     IP-mask
> > > > Authentication-method     [authentication-option]
> > > >
> > > > then restart postgresql and apache service.
> > > > If you want more information on editing that file take a look at the
> > > > documentation at pgsql site
> > > > http://www.postgresql.org/docs/7.3/static/client-authentication.html
> > > >
> > > >
> > > >
> > > > On 8/25/06, Benoit Gregoire <bock at step.polymtl.ca> wrote:
> > > >
> > > > >  On Friday 25 August 2006 03:16, Rajendra Jagad wrote:
> > > > > When I try to start the postgres service from
> > > > > system>admin>serversetting>service It never starts
> > > > > when I open xterm and type >postgres on it says it cannot find the
> > > >
> > > > > configuraiton file If I start manually using option -D
> > > > > /usr/local/pgsql/data it drops me into the backend if I specife DB
> > > > name and
> > > > > user I am in the database I can create tables etc but install.phpis still
> > > > > unable to connect and I am still unable to start the service
> > > > postgres
> > > > > I try editing .bashrc and $PATH=/usr/local/pgsql/data but still no
> > > > luck
> > > > > So I can manually start the data base but not automatic.
> > > > >
> > > > > ANy ideas..
> > > >
> > > > You have two different problems.  First you did not install your
> > > > distributions, hence it doesn't start properly and with the right
> > > > permissions
> > > > from your distribution's init subsystem.  You should only install
> > > > and run
> > > > postgres from source if you really know what you are doing.
> > > >
> > > > Once you fix that, you need to add permission in pg_hba.conf to use
> > > > md5
> > > > password based authentication, at least for the wifidog user on
> > > > localhost.
> > > >
> > > > > Bye the way the user who logs into the Linux Box must have
> > > > ownership of
> > > > > pgsql dir and all it child otherwise it compains about the
> > > > permission.
> > > >
> > > > Off course, but the user who logs in the linux box should normally
> > > > never be
> > > > the one who runs postgres.
> > > >
> > > >
> > > > _______________________________________________
> > > >
> > > > WiFiDog mailing list
> > > > WiFiDog at listes.ilesansfil.org
> > > > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > WiFiDog mailing list
> > > > WiFiDog at listes.ilesansfil.org
> > > > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
> > > >
> > > >
> > >
> > > _______________________________________________
> > > WiFiDog mailing list
> > > WiFiDog at listes.ilesansfil.org
> > > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
> > >
> > >
> >
> > _______________________________________________
> > WiFiDog mailing list
> > WiFiDog at listes.ilesansfil.org
> > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
> >
> >
>
> _______________________________________________
> WiFiDog mailing list
> WiFiDog at listes.ilesansfil.org
> http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20060827/ed548929/attachment.html


Plus d'informations sur la liste de diffusion WiFiDog