Forum
PDF files will not download from members only area
Perch: 2.8.10 Production mode: Production (100) Installed apps: content (2.8.10), assets (2.8.10), categories (2.8.10), perch_members (1.3) DB driver: PDO DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_members, perch2_members_forms, perch2_members_member_tags, perch2_members_sessions, perch2_members_tags, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users Users: 5 App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_members', ); ?> Editor plug-ins: markitup H1: 5243cfaaefff5a6cc23dac51945fa16b L1: beb1471d8f4a64e5aba36f0026f6615e headerColour: #ffffff content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 1 content_collapseList: 1 lang: en-gb update_2.8.6: done on_sale_version: headerScheme: light dashboard: 0 hide_pwd_reset: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 logoPath: /pggs2.8.6_update/resources/palamlogonew.png update_2.8.7: done latest_version: 2.8.15 update_2.8.10: done perch_members_login_page: /members/login.php?r={returnURL} PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: palamger_joel201 PERCH_DB_SERVER: localhost PERCH_DB_DATABASE: palamger_2015perch PERCH_DB_PREFIX: perch2_ PERCH_TZ: UTC PERCH_EMAIL_FROM: webmaster@palamgermangenealogysociety.org PERCH_EMAIL_FROM_NAME: PALAM German Genealogy Society PERCH_EMAIL_METHOD: pop PERCH_EMAIL_HOST: smtpout.secureserver.net PERCH_EMAIL_AUTH: 1 PERCH_EMAIL_SECURE: ssl PERCH_EMAIL_PORT: 465 PERCH_EMAIL_USERNAME: webmaster@palamgermangenealogysociety.org 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 PERCH_RESPATH: /pggs2.8.6_update/resources PERCH_HTML5: 1 PERCH_RUNWAY: PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /home/palamger/public_html/pggs2.8.6_update/templates PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_RWD: PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: HOSTING SETTINGS
PHP: 5.4.45 Zend: 2.4.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ MySQL server: 5.6.35 Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, intl, json, mbstring, mcrypt, standard, mysqlnd, mysqli, mysql, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, SQLite, exif, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, htscanner, mhash, ionCube Loader, Zend Guard Loader GD: Yes ImageMagick: No PHP max upload size: 3000000M PHP max form post size: 128M PHP memory limit: 512M Total max uploadable file size: 128M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes CONTEXT_DOCUMENT_ROOT: /home/palamger/public_html DOCUMENT_ROOT: /home/palamger/public_html GATEWAY_INTERFACE: CGI/1.1 HTTPS: on HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 HTTP_ACCEPT_ENCODING: gzip, deflate, sdch, br HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8 HTTP_CONNECTION: keep-alive HTTP_COOKIE: PHPSESSID=dc14643c4132143438c01dee3e25b0b3; cmsa=1 HTTP_HOST: www.palamgermangenealogysociety.org HTTP_REFERER: https://www.palamgermangenealogysociety.org/pggs2.8.6_update/core/settings/diagnostics/ HTTP_UPGRADE_INSECURE_REQUESTS: 1 HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 HTTP_X_HTTPS: 1 PATH: /bin:/usr/bin PHPRC: /home/palamger/public_html QUERY_STRING: extended REDIRECT_STATUS: 200 REMOTE_ADDR: 108.66.40.61 REMOTE_PORT: 50553 REQUEST_METHOD: GET REQUEST_SCHEME: https REQUEST_URI: /pggs2.8.6_update/core/settings/diagnostics/?extended SCRIPT_FILENAME: /home/palamger/public_html/pggs2.8.6_update/core/settings/diagnostics/index.php SCRIPT_NAME: /pggs2.8.6_update/core/settings/diagnostics/index.php SCRIPT_URI: https://www.palamgermangenealogysociety.org/pggs2.8.6_update/core/settings/diagnostics/ SCRIPT_URL: /pggs2.8.6_update/core/settings/diagnostics/ SERVER_ADDR: 198.46.85.137 SERVER_ADMIN: webmaster@palamgermangenealogysociety.org SERVER_NAME: www.palamgermangenealogysociety.org SERVER_PORT: 443 SERVER_PROTOCOL: HTTP/1.1 SERVER_SOFTWARE: Apache SSL_TLS_SNI: www.palamgermangenealogysociety.org UNIQUE_ID: WP9YNcYuVYkAAATD7swAAABS PHP_SELF: /pggs2.8.6_update/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1493129269.66 REQUEST_TIME: 1493129269 argc: 1 You are running version 2.8.10 - a newer version is available. Links are written like this to a secure bucket https://www.palamgermangenealogysociety.org/members/download.php?file=/voss-herman-heinrich.pdf This code worked until the last windows 10 update. Now I can only download files from the palam.org section of the site which does not have a secure bucket. ~~~ <?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;
~~~ How can I get this to work again on all browsers?
What result do you get, and what's leading you to believe it's something to do with Perch?
A totally blank page. It doesn't download to the computer or show on the screen. I believe it may something to do with the fact that it is in a secure bucket because outside in a non-secure area the pdf files work fine.
Have you checked your server error log?