Forum
Paypal redirect
Hi!
I've currently set up a shop and it's all worrking great until I get to the paypal redirect and it just gets stuck on the site without going off to paypal. Can you anyone help? I've used the same code as previous shops made but this one doesn't seem to work! Diagnostics below
Perch: 3.1.1
Production mode: Production (100)
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_events (1.9.5), perch_shop_orders (1.2.6), perch_shop_products (1.2.6), perch_shop (1.2.6), perch_members (1.6.4)
DB driver: PDO
DB tables: perch3_blog_authors (1), perch3_blog_comments (0), perch3_blog_index (276), perch3_blog_posts (10), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blog_webmention_queue (0), perch3_blogs (1), perch3_categories (24), perch3_category_counts (5), perch3_category_sets (4), perch3_content_index (26889), perch3_content_items (2236), perch3_content_regions (55), perch3_events (3), perch3_events_categories (0), perch3_events_to_categories (0), perch3_menu_items (14), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (1), perch3_pages (25), perch3_resource_log (2631), perch3_resource_tags (2), perch3_resources (295), perch3_resources_to_tags (2), perch3_settings (40), perch3_shop_addresses (0), perch3_shop_admin_index (30), perch3_shop_brands (1), perch3_shop_cart (6109), perch3_shop_cart_data (18), perch3_shop_cart_items (4), perch3_shop_countries (250), perch3_shop_currencies (152), perch3_shop_customers (0), perch3_shop_emails (2), perch3_shop_index (4186), perch3_shop_option_values (21), perch3_shop_options (7), perch3_shop_order_items (0), perch3_shop_order_promotions (0), perch3_shop_order_statuses (9), perch3_shop_orders (0), perch3_shop_orders_meta (1), perch3_shop_product_files (0), perch3_shop_product_option_values (21), perch3_shop_product_options (7), perch3_shop_product_tags (0), perch3_shop_products (112), perch3_shop_promotions (0), perch3_shop_sales (0), perch3_shop_search (4), perch3_shop_shipping_zone_countries (1), perch3_shop_shipping_zones (1), perch3_shop_shippings (1), perch3_shop_tax_exhibits (0), perch3_shop_tax_group_rates (1), perch3_shop_tax_groups (1), perch3_shop_tax_locations (1), perch3_shop_tax_rates (1), perch3_shop_variants (405), perch3_user_passwords (0), perch3_user_privileges (76), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
Users: 1
App runtimes:
<?php
$apps_list = [
'perch_events',
'perch_blog',
'perch_members',
'perch_shop'
];
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins)
Editor plug-ins: ckeditor
H1: 2ef5edb8902f7199e8a7ac7f2b097fde
L1: fbabefe4d51e845bbde5b88b0655106c
F1: 3b606135b33e6a102526838f4152a807
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
installedAt: 3.1.1
update_3.1.1: done
latest_version:
on_sale_version: 3.1.2
headerScheme: light
perch_blog_site_name:
perch_blog_post_url: /post.php?s={postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_events_detail_url: /event.php?s={eventSlug}
dashboard: 0
sidebar_back_link: 0
hide_pwd_reset: 0
keyboardShortcuts: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
content_skip_region_list: 0
assets_restrict_buckets: 0
perch_blog_comment_notify: 0
perch_blog_webmention_tx: 0
perch_blog_webmention_rx: 0
logoPath: /images/logo-col-1.png
perch_events_update: 1.8
perch_blog_update: 5.6
perch_shop_update: 1.2.6
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: inc
perch_shop_site_url: https://
perch_shop_product_url: product.php?s={slug}
perch_shop_default_currency: 47
perch_shop_reporting_currency: 47
perch_shop_invoice_number_format: Invoice%d
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: bfladmin
PERCH_DB_SERVER: 213.171.200.80
PERCH_DB_DATABASE: BFL2018
PERCH_DB_PREFIX: perch3_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: jade@picseli.co.uk
PERCH_EMAIL_FROM_NAME: Jade Marling
PERCH_EMAIL_METHOD: mail
PERCH_LOGINPATH: /admin
PERCH_PATH: /home/linweb37/b/britonferryllansawelafc.com/user/htdocs/admin
PERCH_CORE: /home/linweb37/b/britonferryllansawelafc.com/user/htdocs/admin/core
PERCH_RESFILEPATH: /home/linweb37/b/britonferryllansawelafc.com/user/htdocs/images
PERCH_RESPATH: /images
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_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: 8255e4c4a367cfa3e2bd
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/linweb37/b/britonferryllansawelafc.com/user/htdocs/admin/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_ENABLE_EXIF: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SHOP_VERSION: 1.2.6
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings
PHP: 5.6.37
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.56-MariaDB
MySQL server: 5.6.41-log
Free disk space: 53.29 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, fileinfo, filter, ftp, gettext, gmp, SPL, iconv, intl, pcntl, session, standard, posix, readline, Reflection, Phar, shmop, SimpleXML, sockets, mbstring, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, cgi-fcgi, bcmath, dba, dom, gd, imap, json, ldap, exif, mcrypt, mssql, mysql, mysqli, odbc, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, pspell, snmp, soap, tidy, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 20M
PHP max form post size: 20M
PHP memory limit: 64M
Total max uploadable file size: 20M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
PWD: /var/www/fcgi
PHP_FCGI_MAX_REQUESTS: 100
ORIG_SCRIPT_NAME: /fcgi-bin/php56-cgi
ORIG_PATH_TRANSLATED: /home/linweb37/b/britonferryllansawelafc.com/user/htdocs/admin/core/settings/diagnostics/index.php
ORIG_PATH_INFO: /admin/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /var/www/fcgi/php56-cgi
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
REQUEST_URI: /admin/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.0
GATEWAY_INTERFACE: CGI/1.1
REDIRECT_URL: /admin/core/settings/diagnostics/index.php
REDIRECT_QUERY_STRING: extended
REMOTE_PORT: 53316
SCRIPT_FILENAME: /home/linweb37/b/britonferryllansawelafc.com/user/htdocs/admin/core/settings/diagnostics/index.php
SERVER_ADMIN: support@fasthosts.com
CONTEXT_DOCUMENT_ROOT: /var/www/fcgi/
CONTEXT_PREFIX: /fcgi-bin/
REQUEST_SCHEME: http
DOCUMENT_ROOT: /home/linweb37/b/britonferryllansawelafc.com/user/htdocs
REMOTE_ADDR: 91.103.188.194
SERVER_PORT: 80
SERVER_ADDR: 127.0.0.1
SERVER_NAME: www.britonferryllansawelafc.com
SERVER_SOFTWARE: Apache
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_COOKIE: _ga=GA1.2.631448787.1532359473; PHPSESSID=euonqijhcf86m78v5vckrr8nj0; _gid=GA1.2.1388267384.1534174186; cmsa=1
HTTP_REFERER: https://www.britonferryllansawelafc.com/admin/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
HTTP_CONNECTION: close
HTTP_X_FORWARDED_FOR: 91.103.188.194
HTTP_X_REAL_IP: 91.103.188.194
HTTP_HOST: www.britonferryllansawelafc.com
UNIQUE_ID: W3KxUMVCuufGE7QgxvWZLwAAACo
on: 127.0.0.1
REDIRECT_STATUS: 200
REDIRECT_HANDLER: application/x-httpd-php56
REDIRECT_UNIQUE_ID: W3KxUMVCuufGE7QgxvWZLwAAACo
REDIRECT_on: 127.0.0.1
FCGI_ROLE: RESPONDER
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1534243152.5156
REQUEST_TIME: 1534243152
So I've found another issue that when the you enter the details that it doesn't create a customer and logs in. So the user is stuck on the same form constantly. Form below
Any help is much appreciated!
Can you show us the code for your checkout page?
perch_shop_checkout()
issues an HTTPLocation
header to redirect the user to PayPal. It can't do that if you've already started sending the body of the response. This needs to happen before you output anything to the body of the HTTP response.I'm not sure if I follow. What needs to change in order for it to work?
You need to call
perch_shop_checkout()
before you output anything.Okay, so I've moved it so it's under
<?php include('admin/runtime.php');?>
and now it brings a blank page.See here: https://docs.grabaperch.com/perch/building/troubleshooting/why-am-i-getting-a-blank-page/
[Tue Aug 14 17:04:01.908356 2018] [fcgid:warn] [pid 13274] [client 91.103.188.194:44034] mod_fcgid: stderr: PHP Fatal error: Call to a member function id() on null in /home/linweb37/b/britonferryllansawelafc.com/user/htdocs/admin/addons/apps/perch_shop/lib/PerchShop_Runtime.class.php on line 921, referer: https://www.britonferryllansawelafc.com/checkout.php
Are you still logged in as a customer?
When the registration form is filled in it doesn't keep the customer log in and I can't figure out why so no
You need to address that first.
I'm not sure how to fix it as the template I've used is the default template. Plus it's not saving customers in the database who have filled the form out
It's probably not the template in that case. If you turn on debug and register as a customer, what does it output?
It looks like you don't have Members fully installed. If you go to Members in the control panel, what do you see?
It looks normal, but with no members in it. Debug below
Do you see any
perch3_members
tables in your database? There should be 5 of them.