Francisco Corrales Morales Francisco Corrales Morales - 1 year ago 110
MySQL Question

Easy Contact Forms plugin does not work with PHP 5.5.9

The WordPress plugin Easy Contact Forms doesn't with WordPress 3.9 and PHP 5.5.9

It doesn't show the form fields, nor you can edit, and it won't show the form in the website.

I notice because it gives me this error:

Ajax error. Status =error Internal Server Error

I look at the log files and see the error is in the file:
easy-contact-forms/easy-contact-forms-database.php at line 152, due to the function

I tried to use another similar functions, but either doesn't work, or deletes data, or doesn't work for every query.

Answer Source

After watching the file code, you can realize that this plugin is not perfectly made, it's inconsistent. It changes it's MySQL connection !

One quick fix to make it work, (I know this is not the best way):

in the wptn function add:

mysql_connect('localhost', 'user', 'password');

Like this:

function wptn($query) {

        global $wpdb;

        mysql_connect('localhost', 'myuser', 'mypassword');
        $query = str_replace("#wp__", $wpdb->prefix, $query);
        return $query;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download