Support » Plugin: Contact Form DB » [Plugin: Contact Form 7 to Database Extension] Fatal Error, cannot run

  • Resolved andao


    Have the latest version of Contact Form 7 (2.3.1) but cannot install this plugin. Any suggestions? Here’s the error message I get:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/2/8/5/27492/27492/public_html/wp-content/plugins/contact-form-7-to-database-extension/CF7DBPlugin.php on line 19

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


    From looking at that line of code, my guess is that your site is using PHP4 where this requires PHP5. Can you check that?

    I just had the same problem, and the solution was, in fact, upgrading to PHP5.

    BTW…I absolutely love this plugin. It has been a huge time saver for me while running giveaways where people entered through Contact Form 7.


    I had a similar issue – the edited my .htaccess file to cover php5. However, once I’d done that I now get this error :

    Fatal error: Cannot instantiate non-existent class: cf7dbplugin in /homepages/35/d71138859/htdocs/index.html/newsite/wp-content/plugins/contact-form-7-to-database-extension/contact-form-7-db.php on line 14

    Any ideas? I’d rather now edit any source code if it’s just some sort of server / apache problem I can speak to the host about.


    Plugin Author Michael Simpson


    schabe23: It looks like a file is missing. Try uninstall/reinstall the plugin.

    Nope – tried that already – the plugin refuses to autoinstall thru standard wp installation and freezes when unpacking the packagain – through the zip install it will but then on activation produces the above problem.

    Previously I had had the non php5 support error but after an update of my .htaccess file I have now come across this – it’s bizarre.

    Plugin Author Michael Simpson


    I have tested this on PHP 5.2.13. Perhaps your version is an older PHP 5?

    Shouldnt be – spoke with tech support with regards my server – they haven’t a clue either. I’ve had no issues with it with my other host but when migrating it to my clients server it’s been throwing up some right curveballs. Any other ideas? The help is really appreciated by the way 🙂

    No ideas anyone? I think I’m going mad.

    Plugin Author Michael Simpson


    The only thing that looks odd to me in the error output is the case of the object type:

    Fatal error: Cannot instantiate non-existent class: cf7dbplugin

    But the object is of class CF7DBPlugin (note the case) and the line of code is:
    $aPlugin = new CF7DBPlugin();

    Is this somehow a case issue?

    After some more research I stumbled across some people that had memory issues with certain plug ins. After a new php.ini file and setting up my .htaccess file like so:

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress
    AddType x-mapp-php5 .php

    I managed to get it working – oh it needed reinstalling again though – manually.

    Bizarre really but it;s such a useful plug in I couldn’t let this one die! Cheers for the help Michael – appreciate it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Contact Form 7 to Database Extension] Fatal Error, cannot run’ is closed to new replies.