Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthormike
    • CommentTimeFeb 9th 2006
     
    Try this: Edit plog-load_config.php on line 16:


    $config["baseurl"] = "http://".$_SERVER["SERVER_NAME"]. substr($_SERVER["PHP_SELF"],0,strrpos($_SERVER["PHP_SELF"],"/")) . "/";


    Replace "http://" with "https://".
    Thankful People: joemolloy
    •  
      CommentAuthorxiphias
    • CommentTimeFeb 7th 2017 edited
     
    I've altered the the plog-admin/plog-options.php to support an https URL, now if you entered https://www.domain.ext the gallery_url was changed to http://https://www.domain.ext

    Alter the test around line 25 and change to:
    // Verify that the gallery URL begins with 'http://' for mod_rewrite 301 redirects
    if (strpos($_POST['gallery_url'], 'http://') === false && strpos($_POST['gallery_url'], 'https://') === false)
    {
    $_POST['gallery_url'] = 'http'.($_SERVER['HTTPS'] ? 's' : '').'://'.$_POST['gallery_url'];
    }


    Also altered plog-load-config.php with a simular code to support both http and https requests. In 3 places I altered the code mentioned by mike to:
    $config['baseurl'] = 'http'.($_SERVER['HTTPS'] ? 's' : '').'://'.$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')).'/';

    I did this on lines 66, 87 and 101 (in my version)

    -XiP
  1.  
    •  
      CommentAuthorxiphias
    • CommentTimeApr 15th 2017
     
    With no further server details it looks like your host had a seperate SSL webroot. I've had a host that dit that in the past.
    http_docs and https_docs. So in that case http and https are 2 completely different site.

    -XiP
  2.  
    Same data for both-



    ServerName photos.niamh.org.uk
    ServerAdmin niamh@holtain.net
    DocumentRoot /var/www/html/photos.niamh.org.uk
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
    ErrorLog /etc/httpd/logs/virtual-errors.log
    CustomLog /etc/httpd/logs/virtual-access.log combined

    AllowOverride Options AuthConfig

    SSLCertificateFile /etc/getssl/holtain.net/holtain.net.crt
    SSLCertificateKeyFile /etc/getssl/holtain.net/holtain.net.key
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateChainFile /etc/getssl/holtain.net/chain.crt

  3.  
    https-
    https
    http-
    http
    •  
      CommentAuthorxiphias
    • CommentTimeApr 18th 2017
     
    OK, this looks better. Before I saw nothing on HTTPS.

    The problem you have now is that all links link to http:// including your CSS and JavaScript. This is unsecure and most browsers will not load these files and that's why the styling is "gone".
    HTTP links

    When I change the JS and CSS to HTTPS in the inspector the gallery works fine.
    HTTP to HTTPS

    Also notice that in the above screenshot the site is loaded via HTTPS but it has an exclamation mark infront of the URL, this indicates an "issue".

    The fix I mentioned above should fix that.

    When it's fixed it should look like this:
    Plogger secure

    Let me know if this helped.

    -XiP
  4.  
    OK but index.php only containds the following so I guess I need to find which file the function the_plogger_head is in-

    <?php require('plogger.php'); ?>

    " lang="<?php echo $language; ?>" xmlns="http://www.w3.org/1999/xhtml">

    <?php the_plogger_head(); ?>




    <?php the_plogger_gallery(); ?>


  5.  
    OK... plogger.php contains the function-

    function the_plogger_head() {
    plogger_head();

    $use_file = 'head.php';
    if (file_exists(THEME_DIR.'/'.$use_file)) {
    include(THEME_DIR.'/'.$use_file);
    } else {
    include(PLOGGER_DIR.'plog-content/themes/default/'.$use_file);
    }
    }
  6.  
    And head.php is_

    <?php echo plogger_generate_seo_meta_tags();?>
    gallery.css" />
    dynamics.js">

    So it seems now I'm pooking for where THEME_URL indefined...
  7.  
    So, at last could it be that what needs changing is this section of plog-load-config.php?

    // if mod_rewrite is on and we're not embedded, remove the file basename
    if ($config['use_mod_rewrite'] == 1 && $config['embedded'] == 0) {
    $config['baseurl'] = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/';
    // otherwise just use our cleaned up version of $_SERVER['PHP_SELF'] from plog-globals.php
    } else {
    $config['baseurl'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
    }
    •  
      CommentAuthorxiphias
    • CommentTimeMay 22nd 2017
     
    Try editing plog-admin/plog-options.php like I mentiond above. Should work fine after that.