Posts by andybrowndesign

    Thank you Clive & hus_hmd,

    I thought I'd already set up relative links, but I was looking in the wrong place. Once I found the right code it was easy to sort:

    1. <?php define( 'SCRIPT_ROOT', '' ); ?>
    2. <link rel="stylesheet" href="<?php echo SCRIPT_ROOT; ?>css/reset.css" />
    3. <link rel="stylesheet" href="<?php echo SCRIPT_ROOT; ?>css/base.css" />

    So, I changed the SCRIPT_ROOT to and all was sorted. I just need to go through all the external links now and check those. Thanks for your help.


    Hi all,

    And thanks in advance for your help.

    I've had a client contact me saying a site I did quite a long time ago is having some issues:

    All the CSS isn't showing and there are a bunch of mixed content errors like this

    1. Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure script ''. This request has been blocked; the content must be served over HTTPS.

    I think the errors have been caused by a recent SSL certificate being added (that's a guess).

    I've tried adding code to the config file:

    1. define('PERCH_SSL', true);

    And I've added the following "force_ssl" code to the start of the contact page (just this page for the moment as a test)...

    1. <?php $page = "Contact Us"; ?>
    2. <?php include('perch/runtime.php'); ?>
    3. <?php PerchSystem::force_ssl(); ?>
    4. <?php perch_layout('global.header'); ?>
    5. <div class="text_page">
    6. <div class="left_side">
    7. <div class="page_title">
    8. <h1>Contact Us</h1>...

    But this doesn't seem to change anything. Does anyone know what's going on?

    Also, here's the .htaccess file if that's helpful...

    1. RewriteEngine on
    2. RewriteCond %{HTTPS} off
    3. RewriteCond %{HTTP:X-Forwarded-SSL} !on
    4. RewriteCond %{HTTP_HOST} ^mainesurfacefinishing\.com$ [OR]
    5. RewriteCond %{HTTP_HOST} ^www\.mainesurfacefinishing\.com$
    6. RewriteRule ^(.*)$ "https\:\/\/www\.mainesurfacefinishing\.com\/$1" [R=301,L]



    I'm trying to access the admin of a site I created quite a long time ago to give it some updates.

    However, I'm struggling to login. Either I've forgotten my username or password, or something has happened to cause an issue.

    Either way, I am struggling to reset my password. When I click reset password and enter my email nothing happens. I don't receive anything and I've check my spam. I've tried all the possible email addresses I can think of.

    My client can login with their account but they have limited access so it's not like I can even create a new admin account for myself.

    What should I do next? Any help would be much appreciated.

    These are the most recent entries to the error_log file if that helps...

    1. [22-Jul-2018 08:36:37 UTC] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
    2. [29-Dec-2018 23:02:25 Europe/London] PHP Warning: PDO::__construct(): MySQL server has gone away in /mnt/storage/home/allplay/public_html/perch/core/lib/PerchDB_MySQL.class.php on line 63
    3. [29-Dec-2018 23:02:25 Europe/London] PHP Warning: PDO::__construct(): Error while reading greeting packet. PID=4000 in /mnt/storage/home/allplay/public_html/perch/core/lib/PerchDB_MySQL.class.php on line 63