WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Constant Contact for WordPress] Errors on Page (20 posts)

  1. BusterRhinos
    Member
    Posted 4 years ago #

    Actually I am using WordPress 2.9.2 and am running into the following issue. I have installed your widget and am getting the following error.

    Warning: fread() [function.fread]: SSL: fatal protocol error in /homepages/45/d153186064/htdocs/bbq/wp-content/plugins/constant-contact-api/class.cc.php on line 1912

    Any ideas how to fix above problem?

  2. wilhud
    Member
    Posted 4 years ago #

    I had the same issue. After downloading the script to test whether the plugin would work on my server or not, I came up with the error stating that...

    allow_url_fopen is NOT enabled in php.ini

    I'm guessing this is what was causing the error. Checked my hosting company and they have listed on their KB that they do not allow this by default. They recommend using a different, more secure method of doing this. This plugin looks useful, so I may try to re-write that portion without the fread, if possible.

  3. jamesbenson
    Member
    Posted 4 years ago #

    @BusterRhinos This problem means your web server is not compatible, you need openssl installed to make secure communications with the server.

    @wilhud If you can find a way to communicate with a secure server without using PHP's functions please do, it has to support PHP 4 and 5 to be accepted to the plugins code.

    Thanks,
    James

  4. BusterRhinos
    Member
    Posted 4 years ago #

    I ran the script provided and it says it is compatible.. Something missing from the compatibility issues script?

  5. BusterRhinos
    Member
    Posted 4 years ago #

    I also checked with the server and it shows that openSSL is definitely running.

  6. jeremymace
    Member
    Posted 4 years ago #

    I am having the same problem as the old rhino. How do I know if openssl is intalled on the 1and1 server I use. My WordPress site I am trying to integrate is here:
    http://www.northaugustachamber.org - I want the Constant Contact in the sidebar where I am getting the errors. Please point me in a helpful direction if you can James!

    Thanks, Jeremy

  7. jamesbenson
    Member
    Posted 4 years ago #

    The script available from my website does not check the openssl extension actually works, problem is openssl can be installed but broken, suggest you send your webhost the following "Hi, I'm trying to use openssl through PHP but getting an SSL: fatal protocol error, please can you check openssl is correctly compiled into PHP".

  8. BusterRhinos
    Member
    Posted 4 years ago #

    Directly from my webhosting company (1and1).

    "As checked, this is already a scripting issue specifically in the
    class.cc.php file. Please review your scripts"

    Everything on their ends works apparently.

    Any ideas?

  9. jamesbenson
    Member
    Posted 4 years ago #

    1and1 are crap in my opinion. A fatal protocol error is generated by PHP when openssl is not compiled correctly and the error always refers to the fsockopen function to indicate an internal problem.
    This error is usually because PHP has been compiled against the wrong openssl libraries, this usually means the server has more than one openssl installation, to fix this PHP needs re-compiling with the correct flag to the full location of the correct openssl libraries.
    Chances are 1and1 cannot fix this because they use pre-compiled PHP packages that are provided by their OS vendor.

    Please run the below script and let me know what happens (this code is taken directly from the PHP manual).

    <?php
    $fp = fsockopen("ssl://www.justphp.co.uk", 443, $errno, $errstr, 30);
    if (!$fp) {
    echo "$errstr ($errno)
    \n";
    } else {
    $out = "GET / HTTP/1.1\r\n";
    $out .= "Host: http://www.justphp.co.uk\r\n";
    $out .= "Connection: Close\r\n\r\n";
    fwrite($fp, $out);
    while (!feof($fp)) {
    echo fgets($fp, 128);
    }
    fclose($fp);
    }
    ?>

    If all goes well you will see output similar to this:
    http://integrationservic.es/test.php
    If a problem occurs you will see either an error or a blank white screen.

  10. jamesbenson
    Member
    Posted 4 years ago #

    Also I find 1and1 response a little strange, if they know for sure it's a scripting error why not give us a clue, surely if they know it's a scripting error they would also know what the error was?

  11. BusterRhinos
    Member
    Posted 4 years ago #

    I don't profess to love 1and1,it's just who I currently use for my hosting purposes and they have worked fine up until this point. Alas I do receive an error:

    HTTP/1.1 400 Bad Request Date: Wed, 24 Mar 2010 13:37:44 GMT Server: Apache Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1

    Not sure if that helps you (probably doesn't)...

    Let me know either way as I have to do 1 of 2 things

    1) Find a script that works
    2) change hosting providers

  12. jeremymace
    Member
    Posted 4 years ago #

    Buster - I am in the same boat with you. 1and1 is pretty decent, except for crap like this. I am getting the same thing. If there is not a simple way is there another way to do the sign ups for the newsletter. Maybe a simpler plugin with less features. James has done a great job, but if our server can't get it together then...

    Let us know what you think James and THANKS FOR ALL OF YOUR TIME!

  13. jamesbenson
    Member
    Posted 4 years ago #

    I just noticed wp had altered the code above.
    Please see here for the working example code:
    http://integrationservic.es/cc-fread-test.txt
    If you can rename the file with a .php extension, upload to 1and1 then access it through your browser and let me know what happens.

    The only solutions I can see for you guys are:

    1.) Switch webhost providers.
    2.) Get 1and1 to fix the problem, unlikely.
    3.) Use the old plugin http://wordpress.org/extend/plugins/constant-contact-signup-form-widget/

    Note this old plugin is a hack on the CC script and as such is not supported by CC, also this method will soon be discontinued.

  14. BusterRhinos
    Member
    Posted 4 years ago #

    I received this

    HTTP/1.0 200 OK Date: Thu, 25 Mar 2010 12:52:01 GMT Server: Apache X-Powered-By: PHP/5.3.1 Content-Length: 4651 Connection: close Content-Type: text/html

    plus a webpage (your's I presume sir).

  15. jamesbenson
    Member
    Posted 4 years ago #

    hmm, seems this might be a problem with the script then, 1and1 servers obviously do not like what it does.

    Perhaps one of you guys would be kind enough to give me access to your 1and1 server to test?

    I would only need access to the plugin files so I can do some testing and hopefully implement a fix, I'm afraid without doing this it will be impossible for me to fix unless I can replicate the problem elsewhere, but since I do not know what is causing it it's simply not going to happen without.

    If your willing to do this please get in touch directly:
    https://justphp.co.uk/contact.php

  16. BusterRhinos
    Member
    Posted 4 years ago #

    I will give you access.

  17. jamesbenson
    Member
    Posted 4 years ago #

    The fatal protocol error has been fixed, you can download the development version here:
    http://downloads.wordpress.org/plugin/constant-contact-api.zip

    I'll push a release when I have more time to test this fix works ok with other servers.

  18. BusterRhinos
    Member
    Posted 4 years ago #

    Thank you,

  19. jamesbenson
    Member
    Posted 4 years ago #

    no probs.
    Please can you vote to say it works for you:
    http://wordpress.org/extend/plugins/constant-contact-api/
    This should help make the plugin more popular in the wp search results :)

  20. tracyberna
    Member
    Posted 4 years ago #

    Hi, I've downloaded and am using the fix from the reply three above this one, and I'm still having that error. I called the hosting company (GoDaddy), who said Openssl was working fine, but that they thought the problem could be that it wouldn't work on a site that hadn't purchased an SSL certificate. Could that be the actual problem (or are they grasping at straws)? And if that's not the problem...what now?

Topic Closed

This topic has been closed to new replies.

About this Topic