Menu

Undefined variable: db in ...addressbook/include/login.inc.php on line 433

Help
torbeli
2019-05-12
2020-01-23
  • torbeli

    torbeli - 2019-05-12

    Hi,
    I followed the quick installation for Version 9.0.0.1 and actually just replaced the data definition with an already existing database used for an earlier version and i get this error after given in user and password.
    I used the default to start with.
    The line refers to a mysqli_query in AutLoginDb where then the $db is reference.
    Do have an issue that the database login did not work and therefor not filled the $db?
    I was searching for logfiles, but found nothing.
    Anybody have an idea?
    Best Regards
    Torbeli

     

    Last edit: torbeli 2019-05-12
  • typhubinhduong

    typhubinhduong - 2019-08-04

    You should use manual install, user is admin, pass is secret!

     
  • Petr Krahulec

    Petr Krahulec - 2020-01-20

    To get rid of the error message which is very annoying (even though the addressbook works) I had to manually specify the $db variable, so add line
    $db=“dbname“
    into login.inc.php, which is in include folder

    I haven't found any other way to fix it and I know it is more like a workaround.

     
  • Goran Todorov

    Goran Todorov - 2020-01-20

    Hello Petr. Thanks for posting suggest, I've tried it but it only solves my problem with login into addressbook, but when I try to add new record (contact or group) I get edit page, then I fill necessary fields, submit, then I get that record has been added, but few secons later I see that there is nothing added, not in frontend or in database... same with contact and groups. Since i'm not programmer, I only know basics, I've googled for solution, somebody mentioned that setting "php_flag register_globals on" via htaccess will do the job, but after adding that I get Internal server error message.

     
  • Petr Krahulec

    Petr Krahulec - 2020-01-22

    Fixed it. Just had to add new column into database - "middlename".
    To add it with mysql command:
    ALTER TABLE addressbook ADD middlename varchar(255) default NULL AFTER firstname;

    WIthout it, adding new and editing existing items didn't work.
    Now it all works, the only problem is when adding new item/person into addressbook, if you assign it to a group, it doesn't get assigned, so have to assign it to a group later. But I believe we will be able to live with this.

    I found this solution here in this discussion forum, for any case here is link:
    https://sourceforge.net/p/php-addressbook/discussion/531751/thread/aec91d8c/?limit=25#2ce3

     
  • Goran Todorov

    Goran Todorov - 2020-01-23

    Hello Petr. Thanks for your time.
    Unfortunatley that didn't work for me.
    I see that solution was suggested in post from almost 8 years ago, I'm currently using latest version of script, it may be fixed from then, since when I execute SQL command I get message for duplicate column name.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.