Thread: Syntax error?

Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2011
    Posts
    47
    Plugin Contributions
    0

    Default Syntax error?

    Code:
    [21-Mar-2019 13:06:04 Europe/London] Request URI: /shop/ipn_main_handler.php, IP address: 173.0.81.1
    #1  require(/home/heresy/public_html/shop/includes/init_includes/init_database.php) called at [/home/heresy/public_html/shop/includes/autoload_func.php:48]
    #2  require(/home/heresy/public_html/shop/includes/autoload_func.php) called at [/home/heresy/public_html/shop/includes/application_top.php:170]
    #3  require(/home/heresy/public_html/shop/includes/application_top.php) called at [/home/heresy/public_html/shop/ipn_main_handler.php:114]
    --> PHP Warning: Use of undefined constant USE_PCONNECT - assumed 'USE_PCONNECT' (this will throw an Error in a future version of PHP) in /home/heresy/public_html/shop/includes/init_includes/init_database.php on line 23.
    
    [21-Mar-2019 13:06:04 Europe/London] Request URI: /shop/ipn_main_handler.php, IP address: 173.0.81.1
    #1  ipn_postback() called at [/home/heresy/public_html/shop/ipn_main_handler.php:136]
    --> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPAL_HANDLER - assumed 'MODULE_PAYMENT_PAYPAL_HANDLER' (this will throw an Error in a future version of PHP) in /home/heresy/public_html/shop/includes/modules/payment/paypal/paypal_functions.php on line 442.
    
    [21-Mar-2019 13:06:06 Europe/London] Request URI: /shop/ipn_main_handler.php, IP address: 173.0.81.1
    #1  ipn_determine_txn_type() called at [/home/heresy/public_html/shop/ipn_main_handler.php:211]
    --> PHP Warning: Use of undefined constant txn_type - assumed 'txn_type' (this will throw an Error in a future version of PHP) in /home/heresy/public_html/shop/includes/modules/payment/paypal/paypal_functions.php on line 220.
    Getting these errors coming up with Paypal payment, do I need to go into the php and put ' ' around the bits going wrong in the code above? I did just upgrade from 1.5.4 and as far as I know i am using the latest Paypal module, the server php version was switched to 7.1, too.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Syntax error?

    Appears that perhaps not all of the update has been applied or some other issue is at cause.

    The first debug log entry seems to be occurring; however, is expected to be addressed in the load sequence several lines before reaching the point of attempting to initiate the database connection. There should be a line to define USE_PCONNECT if it is not defined.

    The second debug log entry is related to a database constant that is expected to be present upon installation of the paypal module. (can be made available by removing and reinstalling the paypal module. Be sure to have your credentials before doing this). Though may not be an issue if the first is addressed.

    The third, I haven't been able to easily locate where txn_type was used as a variable but without the dollar sign in front of it as the possible reason for that third entry, though resolution of the previous two may also correct this "issue".
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Syntax error?

    The third one's a bug in /shop/includes/modules/payments/paypal/paypal_functions.php (the first line shown is #220):

    Code:
        if ($postArray['payment_status']=='Completed' && txn_type=='express_checkout' && $postArray['payment_type']=='echeck') {
          $txn_type = 'express-checkout-cleared';
          return $txn_type;
        }
    Changing txn_type to $txn_type will correct that issue.
    Last edited by lat9; 21 Mar 2019 at 05:53 PM. Reason: Corrected directory name

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Syntax error?

    Zen Cart "pull request" generated with the corrections: https://github.com/zencart/zencart/pull/2222

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Syntax error?

    thanks Cindy.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Replies: 7
    Last Post: 16 Dec 2018, 10:02 PM
  2. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  3. Login error and Parse error: Syntax error...
    By TzuLady in forum Basic Configuration
    Replies: 1
    Last Post: 15 Apr 2010, 07:32 AM
  4. Replies: 4
    Last Post: 30 Aug 2009, 09:26 PM
  5. SQL Syntax error: check for right syntax to use near '000000
    By gabyone in forum General Questions
    Replies: 2
    Last Post: 9 Feb 2008, 08:23 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR