MYSQL ERROR

Hello,
I (re) installed fop2 on a freepbx17 debian12 server (asterisk 21)
I get an MySQL error in the Call History popup.
I had to install asterisk and dahdi with phreakscript as I needed an old dahdi driver and had to more or less manually install freepbx17 (without asterisk) on top.
All seems to be working, the only error I get is this :

Fatal error: Uncaught mysqli_sql_exception: Unknown column 'direction' in 'having clause' in /var/www/html/fop2/lib/dblib.php:96 Stack trace: #0 /var/www/html/fop2/lib/dblib.php(96): mysqli_query() #1 /var/www/html/fop2/lib/dbgrid.php(826): dbcon->consulta() #2 /var/www/html/fop2/lib/dbgrid.php(1685): dbgrid->set_pagination() #3 /var/www/html/fop2/lib/dbgrid.php(1182): dbgrid->print_grid() #4 /var/www/html/fop2/calldetailrecords.php(600): dbgrid->show_grid() #5 {main} thrown in /var/www/html/fop2/lib/dblib.php on line 96

The asteriskcdrdb database is the old one I reimported from the old centos freepbx16 server .
The call history is working for both inbound and outbound calls .
Does anybody know where the column 'direction' is supposed to be ?
I guess there has been a change in the table structure which I missed by importing the old table
Thanks

Comments

  • hi, got same error, did you find solution?

  • Well it took me some time too look at it again, but yes finally I found the problem.
    I think I have not done it properly in the first place as I have not imported the table before updating FOP2.
    But I discovered some more problems e.g. regular segfaults on debian 12 and a few php8.2 (freepbx17)
    deprecations with caused this error and others like plugins in the admin not showing up properly.
    I put a modified / adapted version of fop2 on github.
    It's split between webroot for php files and server/systemd
    It' here : https://github.com/schiffsratte/fop2-modernize

Sign In or Register to comment.