WordPress.org

Support

Support » Plugins and Hacks » WordPress HTTPS (SSL) » [Resolved] [Plugin: WordPress HTTPS (SSL)] Shared SSL and Preview URL

[Resolved] [Plugin: WordPress HTTPS (SSL)] Shared SSL and Preview URL

  • johnnnnny

    @johnnnnny

    Hello, this is a great plugin, but having a trouble for previewing my posts.

    I use shared SSL for my admin panel : “https://user.example.com/wp-admin/”

    Almost everything works fine,
    but the problem is the preview button for any secured or non-secured posts returns bad URL like “http://example2.com//user.example.com/?p=xxx&preview=true”

    If I type the URL “https://user.example.com/?p=xxx&preview=true” directly,
    I can see the it correctly.

    My settings are below.
    – Site URL: http://example2.com
    – WordPress URL: https://user.example.com
    – Permalink Setting: Default
    [version of wordpress: 3.2.1]
    [version of WordPress HTTPS plug-in: 2.0]

    Any help?

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mike Ems

    @mvied

    Hey johnnnnny,

    I’m working on a fix for this. I’ll update this topic when I’ve pushed out an update.

    Thanks,
    Mike

    johnnnnny

    @johnnnnny

    Hey Mvied,
    I really appreciate your efforts, thank you!

    Plugin Author Mike Ems

    @mvied

    Hey johnnnnny,

    I just pushed out a new version. Update and let me know if your issue persists.

    Thanks,
    Mike

    johnnnnny

    @johnnnnny

    Hi Mvied,

    I really appreciate your updating, my problem has beed solved.
    Thanks very much.

    P.S.
    I faced another problem at first.
    My login page of wordpress says:
    ———————————-
    Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /******/wp-content/plugins/wordpress-https/wordpress-https.php on line 533
    ———————————-
    and I couldn’t login to admin panel with right usename&password.

    I can’t use php.ini on my shared server, so I tried to set “safe_mode off” and “open_basedir none” with .htaccess file, but it doesn’t work because of my server’s restrictions (it returns 500 error).

    So I modified your plugin (wordpress-https.php, line 528-535) to
    —————————————————————-
    if (!ini_get(‘open_basedir’) && !ini_get(‘safe_mode’)) {
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[“HTTP_USER_AGENT”]);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FAILONERROR, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_ENCODING, ‘gzip,deflate’);

    }
    —————————————————————-
    Then finally it works fine.

    I will appreciate your advice if there could be any problem for doing this modification.

    Plugin Author Mike Ems

    @mvied

    Hey johnnnnny,

    That will probably break something since you’re telling it to ignore all of the cURL options unless you’re not in safe mode. You only need to put that if statement around the line that’s generating the warning. Really, all you need to do is add ‘@’ in front of curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); like this @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); and that will stop the warning.

    Thanks,
    Mike

    johnnnnny

    @johnnnnny

    Hey Mvied,

    That works fine! thank you very much 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: WordPress HTTPS (SSL)] Shared SSL and Preview URL’ is closed to new replies.
Skip to toolbar