Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. MYSQL ERROR

MYSQL ERROR

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 369 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    S
    schiffsratte
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • J
      J
      johnx102
      wrote on last edited by
      #2

      hi, got same error, did you find solution?

      1 Reply Last reply
      0
      • S
        S
        schiffsratte
        wrote last edited by
        #3

        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

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups