WordPress.org

Ready to get started?Download WordPress

Forums

WordPress HTTPS (SSL)
[resolved] Warning: preg_match(): Unknown modifier 'c' in /DomainMapping.php on line 43 (8 posts)

  1. Marco Florian
    Member
    Posted 1 year ago #

    I receive this warning message three times when I'm in the /checkout page:

    Warning: preg_match(): Unknown modifier 'c' in /home/grievingtogether/public_html/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php on line 43

    Settings:
    --

    SSL Host: domain.com
    Port: blank
    Force SSL Admin: checked
    Force SSL Exclusively: checked
    Remove Unsecure Elements: unchecked
    Debug Mode: unchecked
    Proxy: No
    Admin Menu Location: Settings.

    Secure Filters:
    /checkout

    I'm using WordPress 3.8.1. Also, the HTTPS is working just fine, but with those warnings at the top of the page.

    Thanks.

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

  2. Marco Florian
    Member
    Posted 1 year ago #

    I went to the line and tried a few things.

    (1) preg_quote($http_domain, '/')
    - This would change "\d.gravatar.com" to "\\d\.gravatar\.com". Which is right, but we need the \d to be parsed as regexp.

    (2) preg_match('|' . $http_domain . '|', $url, $matches);
    - I changed the delimiters to another character, but again, we could be using it inside the regexp.

    (3) str_replace('/', '\/', $http_domain)
    - I just decided to use this one. It is working fine, no more warnings. Try it out and make the fix if applicable and/or give me a recommendation please.

    Thanks.

  3. Apprentice
    Member
    Posted 11 months ago #

    Hi,

    I'm having the same problem.

    The "preg_match(): Unknown modifier 'c' in /home/grievingtogether/public_html/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php on line 43"

    isn't on all the pages. Main homepage, main tabs are working fine. Except when I go to the menu and scroll down and select.

    I'm not sure what's going on.

    The website is http://www.olivias4tea.com

    You can see the error on https://olivias4tea.com/olivias-dollhouse-tea-room/

    Any help would be greatly appreciated.

    Thanks

  4. Marco Florian
    Member
    Posted 11 months ago #

    Go to the file and line below:

    /wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php on line 43

    Replace:

    preg_match('/' . $http_domain . '/', $url, $matches);

    With:

    preg_match('/' . str_replace('/', '\/', $http_domain) . '/', $url, $matches);

  5. Apprentice
    Member
    Posted 11 months ago #

    Hi Marco,

    thanks so much!

    It works.

  6. Marco Florian
    Member
    Posted 11 months ago #

    Glad to help. You're welcome :)

    Marking it as solve.

  7. Marco Florian
    Member
    Posted 11 months ago #

    Well, actually, the plugin author should apply this fix. Hope he/she does. Still a great plugin! Thanks.

  8. Drubi
    Member
    Posted 5 months ago #

    Perhaps they should but I guess they didn't 'cause I ran into the same problem (WordPress 4.0, plugin WordPress HTTPS 3.3.6) but with a 'p' instead of 'c'. But it seems like the same solution as you proposed above did the trick, again :)
    Great stuff, thanks !

    No more Warnings :)

    https://norton.alterlinks.com

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.