WordPress.org

Forums

WordPress HTTPS (SSL)
[resolved] Activating 3.1.1 causing Fatal Error (26 posts)

  1. lesb55
    Member
    Posted 2 years ago #

    Every time I have tried to update after version 2.0.4, I get this:
    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Class 'WordPressHTTPS' not found in /home/-----/public_html/wp-content/plugins/wordpress-https/wordpress-https.php on line 49

    Line 49 of this file reads: $wordpress_https = new WordPressHTTPS;

    Why am I having this problem? (and it seems - nobody else is?)

    http://wordpress.org/extend/plugins/wordpress-https/

  2. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    Uninstall the plugin completely and re-install. Let me know if that works.

  3. lesb55
    Member
    Posted 2 years ago #

    Thanks for your response Mike.

    Completely uninstalled 2.0.4 (including all wordpress-https options in database).
    Installed 3.1.2 and same deal - trying to activate gave:

    Fatal error: Class 'WordPressHTTPS' not found in /home/-----/public_html/wp-content/plugins/wordpress-https/wordpress-https.php on line 49

    Tried deleting this line, then activating and got:

    Fatal error: Call to a member function setSlug() on a non-object in /home/-----/public_html/wp-content/plugins/wordpress-https/wordpress-https.php on line 49

    My wp-config has:
    /** Force Admin login to SSL. */
    define('FORCE_SSL_LOGIN', true);
    define('FORCE_SSL_ADMIN', true);
    Tried setting these to false - same.

    Everything works perfectly with version 2.0.4

  4. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    It's possible you have an old version of PHP or something? Is there any way you could check?

  5. lesb55
    Member
    Posted 2 years ago #

    Running PHP Version 5.3.13, MySQL Version 5.1.63
    Standard LAMP (Centos) but on an Xen VPS server.

    Recently had trouble with latest update of another plugin:
    GWA Autoresponder Pro - activating latest version5 gobbles all the memory.
    The plugin developer still hasn't sorted that one.

    I have a near identical test website set up on this same server, and activating latest WP-https plugin on this site is no problem (but of course this website doesn't have an SSL certificate installed).

  6. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    The only other thing that it could be is file permissions. Make sure that the Apache/PHP user can read all of the files.

  7. lesb55
    Member
    Posted 2 years ago #

    Thanks for your suggestions Mike,
    Setting permissions to world writable (777) for all files and folders of the plugin, including my wp-config, just returns the same error on activation.

    Looking at the error log in cpanel; every time I installed and tried to activate latest version, this error got recorded (twice):

    PHP Fatal error: Class 'WordPressHTTPS' not found in /home/-----/public_html/wp-content/plugins/wordpress-https/wordpress-https.php on line 49, referer: https://www.lusanbidets.com.au/wp-admin/plugins.php?error=true&plugin=wordpress-https%2Fwordpress-https.php&_error_nonce=d1380ee602

    The 'nonce=d1380ee602' gets changed to a different number each time.

  8. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    I'm guessing if you look in wp-content/plugins/wordpress-https/lib/ you see WordPressHTTPS.php and inside it there's code? Just to be sure, lol.

  9. lesb55
    Member
    Posted 2 years ago #

    Yep, correct code is all in there.

    Why the heck is activation of this update stalling at line 49, but V2.0.4 works without a hitch on my server?
    Using WP 3.4.1

    Once again:

    Fatal error: Class 'WordPressHTTPS' not found in /home/lusan/public_html/wp-content/plugins/wordpress-https/wordpress-https.php on line 49

    Line48:if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
    Line49: $wordpress_https = new WordPressHTTPS;

    Tried installing manually, and then activating - same deal.

  10. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    2.0 consisted of one file that all the code was in. In 3.0, I rewrote the whole thing to better organize the code base. Your issue is that PHP is not autoloading the other, required files for some reason. The issue is either a problem with the server configuration, or another plugin is conflicting, causing the plugin not to function.

    If you can, set up a duplicate test site with the same plugins and run some tests to see if the error occurs when only my plugin is active.

  11. lesb55
    Member
    Posted 2 years ago #

    Thanks for your time Mike, I have donated to this plugin in appreciation of your work.

    I do already have a duplicate test website set up on this same server.
    WordPress HTTPS 3.1.2 activates no problem on this test site (with all the same plugins active).
    I don't of course have an SSL certificate set up for this site, so redirects to SSL don't work here.

    Tried activating WordPress HTTPS 3.1.2 on my live site with all other plugins deactivated - same error.

    The error is obviously being caused by some difference in server configuration between these two websites. The ONLY difference I can see is that my live site uses a dedicated IP, whereas my test site uses the shared server IP.

  12. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    It has to be something within WordPress conflicting, then. Maybe the theme?

  13. lesb55
    Member
    Posted 2 years ago #

    Nope, not the theme - tried with Twenty-Ten - same.
    Smells like something amiss in the database, what do you think?

  14. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    Well, if I could take a look I may be able to figure it out. Otherwise, I'm not really sure. My email is mike[at]mvied[dot]com.

  15. lesb55
    Member
    Posted 2 years ago #

    Id really appreciate that Mike,
    sending access details to your email address now.

    Just to be sure, I totally re-copied my live website to my test account (including the database). Same deal; plugin update activates OK on my test website, but not my live site. These two accounts in WHM are identical - except for my live site having a dedicated ip.

    Given time I can usually figure out most problems myself, but this one has me stumped!

  16. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    I think I might have already figured this out. Give my development version a shot.

  17. lesb55
    Member
    Posted 2 years ago #

    Yippee!
    It works!
    Code geeks like you get my greatest respect.

    Couple minor things you probably already know about:

    "SSL Admin - FORCE_SSL_ADMIN and FORCE_SSL_LOGIN can not be set to true in your wp-config.php."
    This warning now appears every time you save the settings, whether 'Force SSL Administration' is checked or not.

    Some of the css in admin need to be fixed so explanations are moved further away from the checkboxes.

  18. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    The Force SSL Admin bug doesn't happen to me. The code that throws the error looks like this.

    if ( force_ssl_admin() || force_ssl_login() ) {
    	$errors[] = '<strong>SSL Admin</strong> - FORCE_SSL_ADMIN and FORCE_SSL_LOGIN can not be set to true in your wp-config.php.';
    	...

    So the only way the error would show up is if WordPress is returning true for either of those built-in functions. So, you must have one of them enabled somewhere.

  19. lesb55
    Member
    Posted 2 years ago #

    You are right.
    If my wp-config.php is set:

    /** Force Admin login to SSL. */
    define('FORCE_SSL_LOGIN', true);
    define('FORCE_SSL_ADMIN', true);

    then the 'Force SSL Administration' checkbox is greyed out, (and the error appears).
    With v2.0.4, this used to be checked & greyed out, but the error message did not appear.

    Delete these lines from wp-config, the error message doesn't show, and WordPress HTTPS can then be used to force both login & admin over SSL.

    But I like to have:
    /** Force Admin login to SSL. */
    define('FORCE_SSL_LOGIN', true);
    define('FORCE_SSL_ADMIN', false);

    This is because SSL is slower, and there are too many unsecured elements on my admin page (the plugin 'Wordfence' also locks me out because of too many 404s).
    But I do prefer my login details being sent encrypted (in Opera; you sometimes see the padlock symbol just momentarily - as you login).

    As a feature request; perhaps you could add another checkbox: 'Force SSL Log In only'

    People like me could then choose either: 'Force SSL Log In only' or 'Force SSL Administration' (without having to fiddle with their wp-config file)

    Is this feasible?

  20. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    Sure, I could add it. Nobody's asked is really the only reason it's not there.

    Upon further inspection, FORCE_SSL_ADMIN is the only option that conflicts with the plugin anyway. I'll just remove the warning for FORCE_SSL_LOGIN.

  21. lesb55
    Member
    Posted 2 years ago #

    Thanks Mike,

    looking forward to the next version release!

  22. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    Re-download the development version and let me know if that does the trick.

  23. lesb55
    Member
    Posted 2 years ago #

    Yep,
    Works perfectly - this ones a thumbs-up from me!

    Now, if I set my wp-config file as:
    define('FORCE_SSL_LOGIN', true);
    this shows as greyed out and checked in WordPress HTTPS.

    However; if I have: define('FORCE_SSL_ADMIN', false); in wp-config, this is not recognized (and will be over-ruled by) whatever you set here in WordPress HTTPS.

    Purists may disagree; but this is completely acceptable by me!

    But for sure someone is going to ask: "what should I use - SSL Login or SSL Admin?"
    Answer: http://codex.wordpress.org/Administration_Over_SSL

    Which Should I Use?
    FORCE_SSL_LOGIN is for when you want to secure logins so that passwords are not sent in the clear, but you still want to allow non-SSL admin sessions (since SSL can be slow).
    FORCE_SSL_ADMIN is for when you want to secure logins and the admin area so that both passwords and cookies are never sent in the clear. This is the most secure option.

    But then: "how do I know my login details are sent encrypted when I check: Always use HTTPS when logging in?"
    Or: "I can't see any padlock symbol when I login".

    I have to admit: it would be cool if the plugin could show the padlock symbol where you login, but then took you to the http page in admin.

    Past me bothering about, but perhaps for a future release?
    http://www.thatsgeeky.com/2012/01/wordpress-ssl-login-page-without-ssl-admin/

  24. Mike Ems
    Member
    Plugin Author

    Posted 2 years ago #

    Are you saying that your login page is showing up with insecure items? The intent of the plugin is to fix them, but you have to manually fix what it can't fix.

  25. lesb55
    Member
    Posted 2 years ago #

    Naa Mike,
    You got me wrong -
    That last was simply another hypothetical question someone is sure to ask:

    But then: "how do I know my login details are sent encrypted when I check: Always use HTTPS when logging in?"
    Or: "I can't see any padlock symbol when I login".

    This is dicussed at some length here:
    http://www.thatsgeeky.com/2012/01/wordpress-ssl-login-page-without-ssl-admin/

    For my 2 cents worth: I couldn't be bothered with this - your latest dev. version is good enough!

  26. lesb55
    Member
    Posted 2 years ago #

    Oops! spoke a bit soon.

    If I have my wp-config set: define('FORCE_SSL_LOGIN', true);
    then this option simply shows as greyed out and checked in WordPress HTTPS - this is correct.

    But if I have: define('FORCE_SSL_LOGIN', false); (or this field totally removed) in my wp-config;
    Then if in WordPress HTTPS I check the box: "Force SSL Login - Always use HTTPS when logging in", this box does not stay checked when I refresh my browser.

    A minor glitch - to be sure.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress HTTPS (SSL)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.