Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2009
    Posts
    35
    Plugin Contributions
    0

    Default V150 - PHP 5.4 issue - Edit Order Button Not Working

    My client is running V150 on PHP 5.4. We just moved to a server that's using PHP 5.4, i'm assuming the last server was using a different PHP version and that's why this error didn't come up.

    If you click on the Edit button to edit a customers order we're gettting:

    PHP Warning: Creating default object from empty value in C:\Inetpub\vhosts\xxxx.com\xxxx.com\store\includes\modules\payment\authorizenet_ aim.php on line 439

    The lines of code in that area are:
    PHP Code:
     function admin_notification($zf_order_id) {
        global 
    $db;
        
    $output '';
        
    $aimdata->fields = array();
        require(
    DIR_FS_CATALOG DIR_WS_MODULES 'payment/authorizenet/authorizenet_admin_notification.php');
        return 
    $output;
      } 
    Again, we're on PHP 5.4 and a Windows Server.

    Is there a workaround that I can imply for a temp fix in the time being until I get them to upgrade?

    Thanks in advance,

    Chad

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

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    Quote Originally Posted by inklingsolutions View Post
    My client is running V150 on PHP 5.4. We just moved to a server that's using PHP 5.4, i'm assuming the last server was using a different PHP version and that's why this error didn't come up.

    If you click on the Edit button to edit a customers order we're gettting:

    PHP Warning: Creating default object from empty value in C:\Inetpub\vhosts\xxxx.com\xxxx.com\store\includes\modules\payment\authorizenet_ aim.php on line 439

    The lines of code in that area are:
    PHP Code:
     function admin_notification($zf_order_id) {
        global 
    $db;
        
    $output '';
        
    $aimdata->fields = array();
        require(
    DIR_FS_CATALOG DIR_WS_MODULES 'payment/authorizenet/authorizenet_admin_notification.php');
        return 
    $output;
      } 
    Again, we're on PHP 5.4 and a Windows Server.

    Is there a workaround that I can imply for a temp fix in the time being until I get them to upgrade?

    Thanks in advance,

    Chad

    Looking at the equivalent code for ZC 1.5.4, revise the code to:

    Code:
       function admin_notification($zf_order_id) { 
         global $db; 
         $output = ''; 
         $aimdata = new stdClass; 
         $aimdata->fields = array(); 
         require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/authorizenet/authorizenet_admin_notification.php'); 
         return $output; 
       }
    But there may also be other changes necessary, ie. might just need to incorporate all of the authorizenet associated files from ZC 1.5.4 or at least at some point after ZC 1.5.1...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Apr 2009
    Posts
    35
    Plugin Contributions
    0

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    MC,

    A few things. One the cache folder didn't have the correct permissions to let it be able to log the error on the new server, so that's why it wasn't allowing the Edit button to work in the admin and it was displaying the error in the admin instead. I changed the permissions on the folder and now your able to get into the users order via Edit button. That didn't solve the actual issue though.

    So, I applied your fix, which got me past that error on line 439 but then I got and error on /includes/modules/payment/authorizenet/authorizenet_admin_notification.php file on line 21. This file for V150, is the same as V154 file when I compared the two.

    PHP Code:
    // strip slashes in case they were added to handle apostrophes:
      
    foreach ($aimdata->fields as $key=>$value){
        
    $aimdata->fields[$key] = stripslashes($value);
      } 
    I tried using the V154 and V153 /includes/modules/payment/authorizenet_aim.php file to see if they would work by some chance. It solved the issue in admin, i wasn't getting any errors but I would get a communication error when the credit card was processed.

    Now with using the V150 file set for authorize.net, the credit cards will process fine but we obviously get the error.
    PHP Warning: Creating default object from empty value in C:\Inetpub\vhosts\xxxx.com\xxxxx.com\store\includes\modules\payment\authorizenet _aim.php on line 439

    Any other other suggestions to try?

    Thanks for advice,

    Chad
    Last edited by inklingsolutions; 6 Feb 2016 at 03:24 PM.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    In one of your last paragraphs, you refer to using the authorize.net "fileset", but above only reference two files, authorizenet_aim and the one file in the authorizenet subdirectory. Yes the file in the subdirectory is from back in 2011 even in ZC 1.5.4 which is in line with early ZC 1.5.x. The authorizenet_aim.php file has been changed since ZC 1.5.0, but so as also the authorizenet.php file. So as I mentioned above that may need to incorporate all of the authorizenet fles. There are also some in the languages directory that I don't know if might be applicable as well. Would hope that they wouldn't affect operation, but...

    As to the error in /includes/modules/payment/authorizenet/authorizenet_admin_notification.php

    What was the error?

    Also, I have seen some posts related to a similar issue that have identified that possibly ZC 1.5.2 files might be an acceptable middle ground. Those files can be found at: https://github.com/zencart/zencart/t...odules/payment

    I'm a smidge limited on what I can do at the moment, not having a lot of (almost none) tools to "easily" identify differences.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    You should be planning on upgrading
    Zen Cart v1.5.0 is compatible with PHP 5.2.14 thru PHP 5.3.x. Requires patches to work with PHP 5.4, and upgrading is a better idea.
    https://www.zen-cart.com/content.php...o-run-zen-cart
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Apr 2009
    Posts
    35
    Plugin Contributions
    0

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    MC,

    Sorry on forgetting to include that error, here it is:

    [06-Feb-2016 15:34:02 UTC] PHP Warning: Invalid argument supplied for foreach() in C:\Inetpub\vhosts\xxxxx.com\xxxxx.com\store\includes\modules\payment\authorizene t\authorizenet_admin_notification.php on line 21

    which that line was:

    PHP Code:
    // strip slashes in case they were added to handle apostrophes:
      
    foreach ($aimdata->fields as $key=>$value){
        
    $aimdata->fields[$key] = stripslashes($value);
      } 
    As for the file set, yea I was just referring to those two authorize.net files. So, I take it there are a few other files that I need to change also if I wanted to see if the V154 authorize.net files actually work. Maybe that's why I got the communications error when I just updated those two files from the V154 version and the rest.

    Again, sorry for taking this back to V150, it's the oldest version i'm dealing with, with this client. Everyone of my other clients are on V154.

    Thanks again for the time and patience,

    Chad

  7. #7
    Join Date
    Apr 2009
    Posts
    35
    Plugin Contributions
    0

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    Kobra,

    I agree 100% on upgrading. All my other clients have upgraded and I plan on having this client upgrade soon but some times it takes a minute to get them to move with a modified store and the time to up grade money wise for them.

    But I 100% agree...Just looking for the band aid until they give me the ok to move on the upgrade.

    Chad

  8. #8
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    Well, I looked at the history for the. Includes/modules/payment directory targeting authorize.net related files. There was some change recently and applicable to 1.5.4 that changed the communication information and added some things to what is/was sent to authorize.net... It could be that data that was causing the comm error. But, the above foreach issue, is likely something else. I'll see if I can spot anything and try to get back on it if resolution isn't had otherwise. It is something related to the assignment of the variable at an earlier stage when a query was made/assigned.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: V150 - PHP 5.4 issue - Edit Order Button Not Working

    I'm pretty sure you should be able to use the v154 version of the authorizenet_aim.php module on v150.
    .

    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.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 23 Jun 2013, 02:03 AM
  2. v150 Final GV check edit button not working?
    By andriks in forum Bug Reports
    Replies: 0
    Last Post: 12 Jul 2012, 12:03 PM
  3. Trying to edit moneyorder.php using override. Not working
    By dinki in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Oct 2006, 01:25 AM
  4. Edit Order Module not working with 1.3.6
    By covone in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Oct 2006, 03:41 AM

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