Author Topic: MiniForm Undefined constant "MYSQL_ASSOC"  (Read 981 times)

Offline Topiax

  • Posts: 28
MiniForm Undefined constant "MYSQL_ASSOC"
« on: December 26, 2021, 02:44:38 PM »
Hi,
I installed the MiniForm WebsiteBaker Module v 0.15.1 but it will not work in my site. Trying to add it on the page will result this error message:

Quote
There was an uncatched exception
Undefined constant "MYSQL_ASSOC"
in line (239) of (/modules/miniform/functions.php):

About my Website Baker and web server

Quote
Webserver

    Webserver Software: Linux cpanel08.whcweb.fi 3.10.0-962.3.2.lve1.5.61.el7.x86_64 #1 SMP Wed Aug 18 07:50:15 UTC 2021 x86_64
    PHP-Erweiterung: mysqli Dokumentation curl Dokumentation mbstring Dokumentation
    PHP-Version: 8.1.1
    WebsiteBaker-Version: 2.13.0 -r63


I have been using the same module in an other site of mine, and it works the quite ok.

Here it works ok:
https://sironta.fi/pages/govfi-fi.php
Quote
Webserver Software: Linux panel02.planeettawe b.fi 3.10.0-962.3.2.lve1.5.61.el7.x86_64 #1 SMP Wed Aug 18 07:50:15 UTC 2021 x86_64
PHP-Erweiterung: mysqli curl mbstring
PHP-Version: 7.4.27
WebsiteBaker-Version: 2.13.0 RC1-r1

Any ideas where the fault might be? And how to fix it, please?


Offline dbs

  • Betatester
  • **
  • Posts: 8722
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: MiniForm Undefined constant "MYSQL_ASSOC"
« Reply #1 on: December 26, 2021, 03:16:36 PM »
Hi, you can fix it for yourself with the attached file functions.txt (rename it to functions.php) and upload it to the miniform module folder.
I think the author of the module will provide a newer version in next time.

Changes: 2 places with MYSQLI_ASSOC and the commenting of the get_magic_quotes_gp c part.

Offline Topiax

  • Posts: 28
Re: MiniForm Undefined constant "MYSQL_ASSOC"
« Reply #2 on: December 26, 2021, 03:33:56 PM »
Hi, you can fix it for yourself with the attached file functions.txt (rename it to functions.php) and upload it to the miniform module folder.
I think the author of the module will provide a newer version in next time.

Changes: 2 places with MYSQLI_ASSOC and the commenting of the get_magic_quotes_gp c part.

Thanks dbs, this really helped, partly.

Now an other error message appears:

Quote
There was an uncatched exception
Call to undefined function get_magic_quotes_gp c()
in line (46) of (/modules/miniform/modify_template.php):

How to solve this, please!


Offline dbs

  • Betatester
  • **
  • Posts: 8722
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: MiniForm Undefined constant "MYSQL_ASSOC"
« Reply #3 on: December 26, 2021, 03:51:27 PM »
Go to the file /modules/miniform/modify_template.php
Replace line 46 and follows
Code: [Select]
    if (get_magic_quotes_gpc()) {
        $data = stripslashes($_POST['template_data']);
    }
    else {
        $data = $_POST['template_data'];
    }

with this one
Code: [Select]
    $data = $_POST['template_data'];

Offline Topiax

  • Posts: 28
Re: MiniForm Undefined constant "MYSQL_ASSOC"
« Reply #4 on: December 27, 2021, 01:02:34 PM »
Thanks dbs! I will try this!  :)
« Last Edit: December 27, 2021, 02:06:03 PM by dbs »

 

postern-length