Support » Plugin: Contact Form DB » [Plugin: Contact Form 7 to Database Extension] Errors – Division by zero

  • Resolved stimsonm

    (@stimsonm)


    Hello, I installed the latest version of the fast and secure contact form and the contact form 7 to database extension and when i go to the admin to see a form submitted i see these errors only:

    Division by zero in /var/www/vhosts/mydomainname.org/httpdocs/wp-content/plugins/contact-form-7-to-database-extension/CF7DBPlugin.php on line 980

    and

    Fatal error: Call to undefined function mysql_set_charset() in /var/www/vhosts/mydomainname.org/httpdocs/wp-content/plugins/contact-form-7-to-database-extension/CFDBQueryResultIterator.php on line 105

    Can anyone help me out?

    Thanks

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    This is because you are running a version of PHP5 that less than 5.2.3. Can you configure to run version 5.2.3 or later?

    Thanks Michael, I’ll block a day off and upgrade that, things never go smoothly 🙂 Great plugin, can’t wait to use it.

    Take care

    Plugin Author Michael Simpson

    (@msimpson)

    In the mean time, it may work OK if you change that line of code:

    mysql_set_charset('utf8', $con);

    to:

    if (function_exists('mysql_set_charset')) { // PHP 5 >= 5.2.3
                mysql_set_charset('utf8', $con);
            }

    great thanks Michael, that killed one of the errors and I see the table now but I still have this error: Warning: Division by zero in /var/www/vhosts/mydomainname.org/httpdocs/wp-content/plugins/contact-form-7-to-database-extension/CF7DBPlugin.php on line 980

    Any ideas on that one?

    Plugin Author Michael Simpson

    (@msimpson)

    Go to the Database Options page. Is there anything in “Maximum number of rows to retrieve from the DB for the Admin display” ?

    If not, put something there like 100. That should have been put there during the upgrade…

    That worked, thank a ton, this is a great plugin, exactly what I needed.

    Take care

    Plugin Author Michael Simpson

    (@msimpson)

    Test submitting a form and see if it captures the data. I’m concerned that your update to 1.8 stuff did not run which includes a change to the DB table that may cause inserts to fail.

    worked perfectly, thanks, one more question, I’m trying to display the table on a page using the shortcode: [cfdb-table form=”1″] and i even tried this: [cfdb-datatable form=”1″] but the page is blank?

    Any ideas?

    Thanks again

    Plugin Author Michael Simpson

    (@msimpson)

    To verify:
    Your form name is “1” and there is data in it when you view in the admin Database page and select “1” from the drop-down?

    yes, Form: 1 and there is data in there

    Plugin Author Michael Simpson

    (@msimpson)

    It is called “1” or “Form: 1”, i.e. [cfdb-table form="Form: 1"]

    that was it, nice. is there anyway to add a download to csv on the web page with that table?

    Plugin Author Michael Simpson

    (@msimpson)

    Plugin Author Michael Simpson

    (@msimpson)

    If you set “Can See Submission data” to “Anyone” it should work

    beautiful, works perfectly. Thanks for all your help today.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: Contact Form 7 to Database Extension] Errors – Division by zero’ is closed to new replies.