Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,246
    Plugin Contributions
    58

    Default PHP Warning: Illegal string offset in linkpoint_api module

    Code:
    [11-Aug-2014 20:14:44 UTC] PHP Warning: Illegal string offset 'r_approved' in /home/xxx/public_html/153/includes/modules/payment/linkpoint_api.php on line 818
    [11-Aug-2014 20:14:44 UTC] PHP Warning: Illegal string offset 'r_error' in /home/xxx/public_html/153/includes/modules/payment/linkpoint_api.php on line 818
    PHP 5.4.31
    Zen Cart 1.5.3

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: PHP Warning: Illegal string offset in linkpoint_api module

    Turns out those warnings only occur if a communications error happens. So, they're symptomatic of a deeper problem.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,246
    Plugin Contributions
    58

    Default Re: PHP Warning: Illegal string offset in linkpoint_api module

    I realize that, but why are both approved and error being triggered?

    The logged Linkpoint error is
    Communication Result: 60 - SSL certificate problem, verify that the CA cert is OK. Details:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
    So if the communication is failed, then why would the log also trigger approved?

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  4. #4
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,246
    Plugin Contributions
    58

    Default Re: PHP Warning: Illegal string offset in linkpoint_api module

    v1.5.0
    Code:
    $ch = curl_init ();
    curl_setopt ($ch, CURLOPT_URL,$host);
    curl_setopt ($ch, CURLOPT_POST, 1);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $xml);
    curl_setopt ($ch, CURLOPT_SSLCERT, $key);
    curl_setopt ($ch, CURLOPT_CAINFO, $key);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt ($ch, CURLOPT_SSLVERSION, 3);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    v1.5.3
    Code:
    $ch = curl_init ();
    curl_setopt ($ch, CURLOPT_URL,$host);
    curl_setopt ($ch, CURLOPT_POST, 1);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $xml);
    curl_setopt ($ch, CURLOPT_SSLCERT, $key);
    curl_setopt ($ch, CURLOPT_CAINFO, $key);
    //    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // NOTE: Leave commented-out! or set to TRUE!  This should NEVER be set to FALSE in production!!!!
    curl_setopt ($ch, CURLOPT_SSLVERSION, 3);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    So adding the lines


    Code:
          curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, false);
          curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
    Back in make it successful transaction with NO other changes.

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  5. #5
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: PHP Warning: Illegal string offset in linkpoint_api module

    I would strong caution against disabling certificate verification. Disabling verification opens the communications (with customer payment information) to man-in-the-middle attacks (and possibly other security concerns).

    When the behavior you are reporting occurs, it usually indicates one of two things:
    1. The payment gateway does not have a valid 3rd party signed certificate properly installed. This is a very rare case.
    2. The hosting provider does not have the server properly configured to validate certificates (via cURL). Most times this means they have not installed a recent CA Certificate Bundle or cURL does is not configured to use installed CA Certificate Bundle... The hosting provider should be able to either update their bundle (and configure cURL server wide to use the bundle)... Or at least they should be able to tell you where the bundle is on their server (so you can add a CURLOPT_CAINFO or CURLOPT_CAPATH to the options for each call made by cURL).
    Last edited by lhungil; 20 Aug 2014 at 04:37 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  6. #6
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,246
    Plugin Contributions
    58

    Default Re: PHP Warning: Illegal string offset in linkpoint_api module

    Agreed... and I believe it is fixed by using the original lphp.php (http://cloud1.firstdata.com/download...06_api_php.zip)

    So it would stand to reason that there is a bug somewhere in the Zen Cart version of lphp.php

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

 

 

Similar Threads

  1. Illegal string offset 'id' in order.php
    By marcopolo in forum General Questions
    Replies: 16
    Last Post: 25 Jul 2015, 04:31 PM
  2. Replies: 4
    Last Post: 12 Nov 2014, 08:42 PM
  3. v151 PHP Warning: Illegal string offset 'r_error' in linkpoint_api.php
    By BGundlach in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 15 Sep 2014, 09:16 PM
  4. v151 PHP Warning: Illegal string offset 'id'
    By Nettric in forum Bug Reports
    Replies: 3
    Last Post: 30 May 2014, 06:53 AM
  5. Replies: 1
    Last Post: 30 Sep 2013, 07:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg