Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#16 PHP Notice: Undefined index: location in dologin.php on line 45

v1.0_(example)
open
Liran Tal
None
1
2014-08-17
2014-04-18
Anonymous
No

Hi,
I just sit a new install of the latest package on a Centos 6.5 x64 server and i keep getting the following error below in my http_error log:
PHP Notice: Undefined index: location in /var/www/html/daloradius/dologin.php on line 45

On the client side i get after a successful login:
Database connection error
Error Message: DB Error: connect failed

i check the file with location and it seems the default location won't get loaded, i tried to add the additional locations @ the bottom of the config file but no luck.
What is wrong missing here ?
thanx
Niek van derven

Discussion

  • Liran Tal
    Liran Tal
    2014-04-19

    can you post here the config file so we can take a look?

     

  • Anonymous
    2014-04-22

    hi, here it is:
    <?php
    /*


    • daloRADIUS - RADIUS Web Platform
    • Copyright (C) 2007 - Liran Tal liran@enginx.com All Rights Reserved.
      *
    • This program is free software; you can redistribute it and/or
    • modify it under the terms of the GNU General Public License
    • as published by the Free Software Foundation; either version 2
    • of the License, or (at your option) any later version.
      *
    • You should have received a copy of the GNU General Public License
    • along with this program; if not, write to the Free Software
    • Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
      *

    • Description:
    • daloRADIUS Configuration File
      *
    • Modification Date:
    • Mon Mar 28 22:55:00 EDT 2011

    */

    $configValues['DALORADIUS_VERSION'] = '0.9-9';
    $configValues['FREERADIUS_VERSION'] = '2';
    $configValues['CONFIG_DB_ENGINE'] = 'mysql';
    $configValues['CONFIG_DB_HOST'] = 'localhost';
    $configValues['CONFIG_DB_PORT'] = '3306';
    $configValues['CONFIG_DB_USER'] = 'radius';
    $configValues['CONFIG_DB_PASS'] = ‘removed’;
    $configValues['CONFIG_DB_NAME'] = 'radius';
    $configValues['CONFIG_DB_TBL_RADCHECK'] = 'radcheck';
    $configValues['CONFIG_DB_TBL_RADREPLY'] = 'radreply';
    $configValues['CONFIG_DB_TBL_RADGROUPREPLY'] = 'radgroupreply';
    $configValues['CONFIG_DB_TBL_RADGROUPCHECK'] = 'radgroupcheck';
    $configValues['CONFIG_DB_TBL_RADUSERGROUP'] = 'radusergroup';
    $configValues['CONFIG_DB_TBL_RADNAS'] = 'nas';
    $configValues['CONFIG_DB_TBL_RADHG'] = 'radhuntgroup';
    $configValues['CONFIG_DB_TBL_RADPOSTAUTH'] = 'radpostauth';
    $configValues['CONFIG_DB_TBL_RADACCT'] = 'radacct';
    $configValues['CONFIG_DB_TBL_RADIPPOOL'] = 'radippool';
    $configValues['CONFIG_DB_TBL_DALOOPERATORS'] = 'operators';
    $configValues['CONFIG_DB_TBL_DALOOPERATORS_ACL'] = 'operators_acl';
    $configValues['CONFIG_DB_TBL_DALOOPERATORS_ACL_FILES'] = 'operators_acl_files';
    $configValues['CONFIG_DB_TBL_DALORATES'] = 'rates';
    $configValues['CONFIG_DB_TBL_DALOHOTSPOTS'] = 'hotspots';
    $configValues['CONFIG_DB_TBL_DALOUSERINFO'] = 'userinfo';
    $configValues['CONFIG_DB_TBL_DALOUSERBILLINFO'] = 'userbillinfo';
    $configValues['CONFIG_DB_TBL_DALODICTIONARY'] = 'dictionary';
    $configValues['CONFIG_DB_TBL_DALOREALMS'] = 'realms';
    $configValues['CONFIG_DB_TBL_DALOPROXYS'] = 'proxys';
    $configValues['CONFIG_DB_TBL_DALOBILLINGPAYPAL'] = 'billing_paypal';
    $configValues['CONFIG_DB_TBL_DALOBILLINGMERCHANT'] = 'billing_merchant';
    $configValues['CONFIG_DB_TBL_DALOBILLINGPLANS'] = 'billing_plans';
    $configValues['CONFIG_DB_TBL_DALOBILLINGRATES'] = 'billing_rates';
    $configValues['CONFIG_DB_TBL_DALOBILLINGHISTORY'] = 'billing_history';
    $configValues['CONFIG_DB_TBL_DALOBATCHHISTORY'] = 'batch_history';
    $configValues['CONFIG_DB_TBL_DALOBILLINGPLANSPROFILES'] = 'billing_plans_profiles';
    $configValues['CONFIG_DB_TBL_DALOBILLINGINVOICE'] = 'invoice';
    $configValues['CONFIG_DB_TBL_DALOBILLINGINVOICEITEMS'] = 'invoice_items';
    $configValues['CONFIG_DB_TBL_DALOBILLINGINVOICESTATUS'] = 'invoice_status';
    $configValues['CONFIG_DB_TBL_DALOBILLINGINVOICETYPE'] = 'invoice_type';
    $configValues['CONFIG_DB_TBL_DALOPAYMENTS'] = 'payment';
    $configValues['CONFIG_DB_TBL_DALOPAYMENTTYPES'] = 'payment_type';
    $configValues['CONFIG_DB_TBL_DALONODE'] = 'node';
    $configValues['CONFIG_FILE_RADIUS_PROXY'] = '/etc/freeradius/proxy.conf';
    $configValues['CONFIG_PATH_RADIUS_DICT'] = '';
    $configValues['CONFIG_PATH_DALO_VARIABLE_DATA'] = '/var/www/daloradius/var';
    $configValues['CONFIG_DB_PASSWORD_ENCRYPTION'] = 'cleartext';
    $configValues['CONFIG_LANG'] = 'en';
    $configValues['CONFIG_LOG_PAGES'] = 'no';
    $configValues['CONFIG_LOG_ACTIONS'] = 'no';
    $configValues['CONFIG_LOG_QUERIES'] = 'no';
    $configValues['CONFIG_DEBUG_SQL'] = 'no';
    $configValues['CONFIG_DEBUG_SQL_ONPAGE'] = 'no';
    $configValues['CONFIG_LOG_FILE'] = '/tmp/daloradius.log';
    $configValues['CONFIG_IFACE_PASSWORD_HIDDEN'] = 'no';
    $configValues['CONFIG_IFACE_TABLES_LISTING'] = '25';
    $configValues['CONFIG_IFACE_TABLES_LISTING_NUM'] = 'yes';
    $configValues['CONFIG_IFACE_AUTO_COMPLETE'] = 'yes';
    $configValues['CONFIG_MAINT_TEST_USER_RADIUSSERVER'] = '127.0.0.1';
    $configValues['CONFIG_MAINT_TEST_USER_RADIUSPORT'] = '1812';
    $configValues['CONFIG_MAINT_TEST_USER_NASPORT'] = '0';
    $configValues['CONFIG_MAINT_TEST_USER_RADIUSSECRET'] = ‘removed;
    $configValues['CONFIG_USER_ALLOWEDRANDOMCHARS'] = 'abcdefghijkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789';
    $configValues['CONFIG_MAIL_SMTPADDR'] = '127.0.0.1';
    $configValues['CONFIG_MAIL_SMTPPORT'] = '25';
    $configValues['CONFIG_MAIL_SMTPAUTH'] = '';
    $configValues['CONFIG_MAIL_SMTPFROM'] = ‘removed’;
    $configValues['CONFIG_DASHBOARD_DALO_SECRETKEY'] = ‘removed’;
    $configValues['CONFIG_DASHBOARD_DALO_DEBUG'] = '1';
    $configValues['CONFIG_DASHBOARD_DALO_DELAYSOFT'] = '5';
    $configValues['CONFIG_DASHBOARD_DALO_DELAYHARD'] = '15';

    /*
    // Locations Configuration directives
    // Locations directives are support for accessing different databases from the daloRADIUS Login console
    // adjust the locations below for databases you are running (if you are running more than one.
    $configValues['CONFIG_LOCATIONS'] = array(

        "Location Example 1" =>                 array(
                "Engine"   => "mysql",
                "Username" => "root",
                "Password" => "",
                "Database" => "radius",
                "Hostname" => "127.0.0.1"
        ),
    
        "Location Example 2" =>                 array(
                "Engine"   => "mysql",
                "Username" => "removed",
                "Password" => removed,
                "Database" => "test_db1",
                "Hostname" => "localhost"
        )
    

    );
    */

     

  • Anonymous
    2014-04-22

    Hi, its solved, due to the fact that the pear-db will be obsolete/or @ least parts we had to run the following commands:

    pear channel-update pear.php.net
    pear install MDB2#mysql
    pear upgrade
    pear install MDB2#mysqli
    chown apache:apache /usr/share/pear/DB -R

    The last one is really important as else it gives vague errors about not able to connect to a db.
    Thanx Niek van der Ven

     


Anonymous


Cancel   Add attachments