WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
[resolved] [Plugin: Contact Form 7 to Database Extension] Fatal Error, cannot run (11 posts)

  1. andao
    Member
    Posted 3 years ago #

    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

  2. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

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

  3. jabrieske
    Member
    Posted 3 years ago #

    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.

    Thanks!

  4. schabe23
    Member
    Posted 3 years ago #

    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.

    Cheers

  5. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

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

  6. schabe23
    Member
    Posted 3 years ago #

    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.

  7. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

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

  8. schabe23
    Member
    Posted 3 years ago #

    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 :)

  9. schabe23
    Member
    Posted 3 years ago #

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

  10. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    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?

  11. schabe23
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic