Posts by ckfs

    Here is the diagnostics for the site where the secure folder outside of the public html is not working

    • Perch: 3.1.4, PHP: 5.6.40, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
    • Server OS: Linux, fpm-fcgi
    • Installed apps: content (3.1.4), assets (3.1.4), categories (3.1.4), perch_members (1.3), perch_members (1.6.4)
    • App runtimes: <?php $apps_list = [ 'perch_members', ]; ?>
    • PERCH_LOGINPATH: /pggs2.8.6_update
    • PERCH_PATH: /home/palamger/public_html/pggs2.8.6_update
    • PERCH_CORE: /home/palamger/public_html/pggs2.8.6_update/core
    • PERCH_RESFILEPATH: /home/palamger/public_html/pggs2.8.6_update/secure
    • Image manipulation: GD
    • PHP limits: Max upload 128M, Max POST 128M, Memory: 1024M, Total max file upload: 128M
    • F1: 3b606135b33e6a102526838f4152a807
    • Resource folder writeable: Yes
    • HTTP_HOST: http://www.HOST.ORG

    ~~~

    <perch:before>

    <table class="responsive" style="border:1px solid #000;width="75%"><tr style="background-color:#fff;font-color:#232376;font-weight:bold;">

    <th style="border-right:1px solid #232376;font-color:#232376;">LAST NAME</th><th style="border-right:1px solid #232376;font-color:#232376;">FIRST NAME</th><th style="border-right:1px solid #23237;font-color:#232376;">COMMENTS</th></tr>

    </perch:before>

    <tr>

    <td style="border:1px solid #000;">

    <a href="<perch:content id="file" type="file" label="File" order="2" accept="pdf doc" bucket="secure" />">

    <perch:content type="text" id="desc" label="lastname" order="1" required="true" title="true" />

    </a>

    </td>

    <td style="border:1px solid #000;"><perch:content id="firstname" type="text" label="First Name"/></td>

    <td style="border:1px solid #000;"><perch:content id="comments" type="textblock" label="Comments"/></td>

    </tr>

    <perch:after>

    </table>

    <perch:if exists="paging">

    <div class="paging">

    Page <perch:content id="current_page" type="hidden" /> of <perch:content id="number_of_pages" type="hidden" />

    <perch:if exists="not_first_page">

    <a href="<perch:content id="prev_url" type="hidden" encode="false" />">Previous</a>

    </perch:if>

    <perch:content id="page_links" encode="false" />

    <perch:if exists="not_last_page">

    <a href="<perch:content id="next_url" type="hidden" encode="false" />">Next</a>

    </perch:if>

    </div>

    </perch:if>

    </perch:after>

    ~~~

    buckets.php

    ~~~~

    <?php

    return array(

    'secure' => array(

    'web_path' => '/members/download.php?file=',

    'file_path' => '/home/palamger/secure',

    ),

    );

    ?>

    ~~~

    config file redacted

    ~~~


    <?php

    define('PERCH_LICENSE_KEY', '#here');


    define("PERCH_DB_USERNAME", 'u1');

    define("PERCH_DB_PASSWORD", 'pass');

    define("PERCH_DB_SERVER", "localhost");

    define("PERCH_DB_DATABASE", "dbname");

    define("PERCH_DB_PREFIX", "perch2_");


    define('PERCH_TZ', 'UTC');


    define('PERCH_EMAIL_FROM', 'webmaster@s.org');

    define('PERCH_EMAIL_FROM_NAME', 'Name of Organization');

    define('PERCH_EMAIL_METHOD', 'pop');

    define('PERCH_EMAIL_HOST', 'smtpout.secureserver.net');

    define('PERCH_EMAIL_AUTH', true);

    define('PERCH_EMAIL_SECURE', 'ssl');

    define('PERCH_EMAIL_PORT', 465);

    define('PERCH_EMAIL_USERNAME', 'username');

    define('PERCH_EMAIL_PASSWORD', 'pa

    ~~~~

    config


    define('PERCH_LOGINPATH', '/pggs2.8.6_update');

    define('PERCH_PATH', str_replace(DIRECTORY_SEPARATOR.'config', '', __DIR__));

    define('PERCH_CORE', PERCH_PATH.DIRECTORY_SEPARATOR.'core');

    // define('PERCH_RESFILEPATH', '/home/palamger/public_html/members/resources2015');

    //define('PERCH_RESPATH', '/members/resources2015');


    define('PERCH_RESFILEPATH', PERCH_PATH . DIRECTORY_SEPARATOR . 'secure');

    define('PERCH_RESPATH', PERCH_LOGINPATH . '/secure');


    define('PERCH_HTML5', true);

    ~~~

    finally the download.php file

    ~~~

    <?php

    include('../pggs2.8.6_update/runtime.php');


    // config

    $bucket_name = 'secure';

    $url_param = 'file';



    // By default, deny downloads unless we've proved the member is allowed this file.

    $allow_download = false;



    // Check a member is logged in

    if (perch_member_logged_in()) {

    $allow_download = false;

    }


    /*

    Alternatively, you could check for a specific tag, e.g.

    */

    if (perch_member_has_tag('member')) {

    $allow_download = true;

    }





    // Deliver the file.

    if ($allow_download) {

    perch_members_secure_download(perch_get($url_param), $bucket_name, false);

    }


    exit;

    _____


    These ARE THE FILES WHERE IS THE PROBLEM?

    • Perch: 3.1.4, PHP: 5.6.40, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
    • Server OS: Linux, fpm-fcgi
    • Installed apps: content (3.1.4), assets (3.1.4), categories (3.1.4), perch_members (1.3), perch_members (1.6.4)
    • App runtimes: <?php $apps_list = [ 'perch_members', ]; ?>
    • PERCH_LOGINPATH: /pggs2.8.6_update
    • PERCH_PATH: /home/palamger/public_html/pggs2.8.6_update
    • PERCH_CORE: /home/palamger/public_html/pggs2.8.6_update/core
    • PERCH_RESFILEPATH: /home/palamger/public_html/pggs2.8.6_update/resources
    • Image manipulation: GD
    • PHP limits: Max upload 128M, Max POST 128M, Memory: 1024M, Total max file upload: 128M
    • F1: 3b606135b33e6a102526838f4152a807
    • Resource folder writeable: Yes
    • HTTP_HOST: palamgermangenealogysociety.org
    • DOCUMENT_ROOT: /home/palamger/public_html
    • REQUEST_URI: /pggs2.8.6_update/core/settings/diagnostics/
    • SCRIPT_NAME: /pggs2.8.6_update/core/settings/diagnostics/index.php

    If I can just get one version of perch_members to show in diagnostics maybe that will fix the problem.

    Several Perch versions ago in 2.8 something it was suggested that the resources be put outside the public directory in members only section. So we did that but now they will not load and we do not want to have to load all those files in again. Is there a way to move the files to the public html directory and have them work by changing a line of code. There are thousands of these files. https://www.websitename.org/me…=/dachstaedter-george.pdf is one of the links. Is there a way to manually edit the link to point to a resource file in the public directory without loading all the files in again.

    After you follow all the directions for updating to Perch 3. When you add the new core file does that change the database to perch3_ or in the config file do you still keep the perch2_ before the table names. In other words does it change automatically or stay the same?

    Something is not working because the database is not showing up. I setup the new database information in the config file and then imported the old database into the new database. Info is there but not showing up on the page. Or does it have to have the SSL first.