[isf-wifidog] Unable to get global $db
Goran Lowkrantz
goran.lowkrantz at ismobile.com
Lun 5 Nov 02:53:52 EST 2007
Hi,
I am trying to install the auth server on a FreeBSD 6-STABLE box but it
seems that any PHP code depending on the line
global $db
doesn't work.
Going through the install.php, all tests and setups that connect directly
to the database from that page works but as soon as a submodule of class is
called, no connection. The only error message I get is
Warning: Module 'radius' already loaded in Unknown on line 0
as the page try to load the radius dll explicitly and thus the other Radius
dependent tests fail. Changing this to try and call a radius function, the
error message goes away and everything works up until database
initialisation where we find that we need to update from version 29 to 31.
After converting the php-stuff to SQL and manually updating to version 31,
we can continue to Administration account which once again fail with
database access error.
Going through the code, $db is not initialised in either of these cases but
I as the modules where this should happen are included I can't see whats
wrong here.
Any ideas?
System setup:
viglaf# uname -a
FreeBSD viglaf 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #22: Sat Nov 3
11:41:27 CET 2007 root at viglaf:/usr/obj/usr/src/sys/VIGLAF i386
viglaf# pkg_info -Ix php5
php5-5.2.4_1 PHP Scripting Language
php5-dom-5.2.4_1 The dom shared extension for php
php5-gettext-5.2.4_1 The gettext shared extension for php
php5-ldap-5.2.4_1 The ldap shared extension for php
php5-mbstring-5.2.4_1 The mbstring shared extension for php
php5-mcrypt-5.2.4_1 The mcrypt shared extension for php
php5-mhash-5.2.4_1 The mhash shared extension for php
php5-openssl-5.2.4_1 The openssl shared extension for php
php5-pcre-5.2.4_1 The pcre shared extension for php
php5-pgsql-5.2.4_1 The pgsql shared extension for php
php5-posix-5.2.4_4 The posix shared extension for php
php5-session-5.2.4_1 The session shared extension for php
php5-simplexml-5.2.4_1 The simplexml shared extension for php
php5-spl-5.2.4_1 The spl shared extension for php
php5-xml-5.2.4_1 The xml shared extension for php
php5-xmlrpc-5.2.4_1 The xmlrpc shared extension for php
viglaf# pkg_info -Ix apache-2
apache-2.2.6_2 Version 2.2 of Apache web server with prefork MPM.
viglaf# pkg_info -Ix radius
pecl-radius-1.2.5 Radius client library for PHP
pear-1.6.2_1 PEAR framework for PHP
pear-Auth_RADIUS-1.0.5 PEAR wrapper classes for the RADIUS PECL
pear-Crypt_CHAP-1.0.1 PEAR class for generating CHAP packets
viglaf# pkg_info -Ix postgres
postgresql-client-8.2.5_1 PostgreSQL database (client)
postgresql-jdbc-8.2.505 The Java JDBC implementation for PostgreSQL
postgresql-libpqxx-2.6.9 A new C++ interface for PostgreSQL
postgresql-server-8.2.5_2 The most advanced open-source database available
anywhere
wifidog-auth-1.0.0_m2
/glz
................................................... the future isMobile
Goran Lowkrantz <goran.lowkrantz at ismobile.com>
System Architect, iaMobile AB
Sandviksgatan 81, PO Box 58, S-971 03 Luleĺ, Sweden
Mobile: +46(0)70-587 87 82
http://www.ismobile.com ...............................................
Plus d'informations sur la liste de diffusion WiFiDog