Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2011
    Posts
    23
    Plugin Contributions
    0

    email error Blank checkout page

    Alright, I haven't changed anything on my site since this problem has come up, so I don't know what I can do to fix it. Customers are able to do everything normally except check out. As soon as they click on the check out button from their shopping cart page, it goes to a blank page.

    I've checked the debug files and found the following...


    Code:
    [08-Nov-2013 17:10:51 America/Phoenix] PHP Warning:  addslashes() expects parameter 1 to be string, array given in /home/content/32/9303332/html/includes/functions/functions_general.php on line 888
    
    [09-Nov-2013 09:53:38 America/Phoenix] PHP Fatal error:  Call to a member function getName() on a non-object in /home/content/32/9303332/html/includes/modules/shipping/usps.php on line 915
    
    **[11-Nov-2013 10:01:30 America/Phoenix] PHP Warning:  simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ^ in /home/content/32/9303332/html/includes/modules/shipping/usps.php on line 909
    [11-Nov-2013 10:01:30 America/Phoenix] PHP Fatal error:  Call to a member function getName() on a non-object in /home/content/32/9303332/html/includes/modules/shipping/usps.php on line 915
    
    
    **Is now the only error occurring on my debug files since that date.
    I compared all files mentioned to one before the 8th and they are exactly the same, nothing changed on my end. What could have happened to make these errors occur and more importantly, what can I do to fix the problem.

    The only edit I've made in the last month was to the css for the background to change from Halloween to Christmas. Other than that, there have been absolutely no changes... and put the site down for maintenance earlier today.



    AND just in case it helps...
    includes/modules/shipping/usps.php
    Code:
     // strip reg and trade out 01-02-2011
        $body = str_replace('&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;', '', $body);
        $body = str_replace('&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;', '', $body);
        
        $response=simplexml_load_string($body); [[line 909]]
    
        $rates = array();
    
        // translate for US Territories
        if ($order->delivery['country']['id'] == SHIPPING_ORIGIN_COUNTRY  || (SHIPPING_ORIGIN_COUNTRY == '223' && $this->usps_countries == 'US')) {
          if ($response->getName() == 'Error') {  [[line 915]]
    
            $number = (string)$response->Number;
            $description = (string)$response->Description;
            return array('error' => $number . ' - ' . $description);
          }
    includes/functions/functions_general.php
    Code:
    function zen_db_input($string) {
        return addslashes($string);    [[line 888]]
      }

  2. #2
    Join Date
    Apr 2010
    Posts
    282
    Plugin Contributions
    1

    Default Re: Blank checkout page

    What version of php are you running?
    Is it possible that your hosting company just changed it on you?
    My hosting company is forcing me into php 5.4 on dec 1st, which is not compatible with zen-cart without modifying several files.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Blank checkout page

    Quote Originally Posted by Angelica View Post
    Alright, I haven't changed anything on my site since this problem has come up, so I don't know what I can do to fix it. Customers are able to do everything normally except check out. As soon as they click on the check out button from their shopping cart page, it goes to a blank page.

    I've checked the debug files and found the following...


    Code:
    [08-Nov-2013 17:10:51 America/Phoenix] PHP Warning:  addslashes() expects parameter 1 to be string, array given in /home/content/32/9303332/html/includes/functions/functions_general.php on line 888
    
    [09-Nov-2013 09:53:38 America/Phoenix] PHP Fatal error:  Call to a member function getName() on a non-object in /home/content/32/9303332/html/includes/modules/shipping/usps.php on line 915
    
    **[11-Nov-2013 10:01:30 America/Phoenix] PHP Warning:  simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ^ in /home/content/32/9303332/html/includes/modules/shipping/usps.php on line 909
    [11-Nov-2013 10:01:30 America/Phoenix] PHP Fatal error:  Call to a member function getName() on a non-object in /home/content/32/9303332/html/includes/modules/shipping/usps.php on line 915
    
    
    **Is now the only error occurring on my debug files since that date.
    I compared all files mentioned to one before the 8th and they are exactly the same, nothing changed on my end. What could have happened to make these errors occur and more importantly, what can I do to fix the problem.

    The only edit I've made in the last month was to the css for the background to change from Halloween to Christmas. Other than that, there have been absolutely no changes... and put the site down for maintenance earlier today.



    AND just in case it helps...
    includes/modules/shipping/usps.php
    Code:
     // strip reg and trade out 01-02-2011
        $body = str_replace('&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;', '', $body);
        $body = str_replace('&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;', '', $body);
        
        $response=simplexml_load_string($body); [[line 909]]
    
        $rates = array();
    
        // translate for US Territories
        if ($order->delivery['country']['id'] == SHIPPING_ORIGIN_COUNTRY  || (SHIPPING_ORIGIN_COUNTRY == '223' && $this->usps_countries == 'US')) {
          if ($response->getName() == 'Error') {  [[line 915]]
    
            $number = (string)$response->Number;
            $description = (string)$response->Description;
            return array('error' => $number . ' - ' . $description);
          }
    includes/functions/functions_general.php
    Code:
    function zen_db_input($string) {
        return addslashes($string);    [[line 888]]
      }
    So, can't say that this is the cause: but did the php version change/upgrade? Or anything change with the php.ini? The other thing I was wondering about was if there was something about the user's "input" that could lead to the problems experienced?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: Blank checkout page

    Hasn't changed... PHP version 5.3.24, so it's still comparable. Any other ideas? I hadn't even thought to check that.

  5. #5
    Join Date
    Feb 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: Blank checkout page

    I'm not sure what the php.ini file is and I haven't changed anything with the user input or how to check if it has been changed. I've only dealt with minor problems for this site, so I really don't know much.

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Blank checkout page

    Quote Originally Posted by Angelica View Post
    Hasn't changed... PHP version 5.3.24, so it's still comparable. Any other ideas? I hadn't even thought to check that.
    Say still comparable, but is this an upgrade compared to what you were expecting?

    Are these errors apparently only related to usps? Using the most recent version of the usps plugin?

    When was the last successful use of this method of checkout? Any known changes/differences between then and now?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Blank checkout page

    Quote Originally Posted by Angelica View Post
    I'm not sure what the php.ini file is and I haven't changed anything with the user input or how to check if it has been changed. I've only dealt with minor problems for this site, so I really don't know much.
    Typically the php.ini file is accessed through the host's control panel or directly through ftp to an area of the ro of your site. It controls things that are loaded as a part of php. I don't have an exact list, but as changes are rolled out for each php version, something changes and sometimes it's the difference between an action working and one that doesn't.

    Btw, the logged error message relates to the content of $body content and further that when the content of $body is processed through simplexml_load_string it is not returning an object that has a GetName function or the GetName function just isn't reachable (needs to be copied somewhere to be accessible).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Feb 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: Blank checkout page

    Quote Originally Posted by mc12345678 View Post
    Say still comparable, but is this an upgrade compared to what you were expecting?

    Are these errors apparently only related to usps? Using the most recent version of the usps plugin?

    When was the last successful use of this method of checkout? Any known changes/differences between then and now?
    I'm honestly not sure if it's an upgrade or not. I haven't received any notices about them upgrading or changing the php version.

    I believe they are only related to usps... when users attempt to estimate their shipping not being logged in, once they press update the estimator disappears. I'm not sure if it's the most recent plugin or not. We haven't changed anything with usps since we set up the site, so it may be outdated. I'll try installing a new version.

    It was last successful on the 8th and there haven't been any changes on our end since well before that.


    On a side note.. I turned off usps and it allowed me to go through to the checkout page. So it's definitely something to do with it. I'm going to install http://www.zen-cart.com/downloads.php?do=file&id=1292 and see if it changes anything.


    Quote Originally Posted by mc12345678 View Post
    Typically the php.ini file is accessed through the host's control panel or directly through ftp to an area of the ro of your site. It controls things that are loaded as a part of php. I don't have an exact list, but as changes are rolled out for each php version, something changes and sometimes it's the difference between an action working and one that doesn't.

    Btw, the logged error message relates to the content of $body content and further that when the content of $body is processed through simplexml_load_string it is not returning an object that has a GetName function or the GetName function just isn't reachable (needs to be copied somewhere to be accessible).

    This is what is currently in my php.ini file
    Code:
    register_globals = off
    allow_url_fopen = off
    
    expose_php = Off
    max_input_time = 60
    variables_order = "EGPCS"
    extension_dir = ./
    upload_tmp_dir = /tmp
    precision = 12
    SMTP = relay-hosting.secureserver.net
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

    Do you know where the GetName function is located or a way to find it through the admin controls?

  9. #9
    Join Date
    Feb 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: Blank checkout page

    Good news :) Updating to a newer version of usps http://www.zen-cart.com/downloads.php?do=file&id=1292 fixed our problem. I'm not sure what exactly happened over the weekend to make the old one stop working, but things are back up and running. Thanks for the advice!

  10. #10
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Blank checkout page

    Quote Originally Posted by Angelica View Post
    Good news :) Updating to a newer version of usps http://www.zen-cart.com/downloads.php?do=file&id=1292 fixed our problem. I'm not sure what exactly happened over the weekend to make the old one stop working, but things are back up and running. Thanks for the advice!
    Good to know, I believe the usps module on the site I maintain is slightly outdated, but I recalled seeing a newer version of usps released earlier this summer, but I haven't gotten around to updating it. As far as what changed, I would say nothing on your side, but something on usps' side. A weekend date would make sense, as many places would pick a weekend to do an update.

    As far as your earlier question about finding a getName function, I'm a little curious, two years of having a login id with this site, a running cart (although an older version) and not familiar with some of the powerful tools of the ZC admin system? More pow to you if you have had sales success. It may be a little different under your version, but at some point a developer's tool kit was created under the tools menu. From there it is possible to search for just about anything that is in your ZC directories (the standard directories/templates) although there is some exception, it will not search your images directory for php files (I can't remember if it looks at image names or not), if you have gone and created a file/path that is outside of the override system then it won't catch that either, but is a great tool/set of tools.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Checkout blank page during checkout - authorize.net
    By gandalfsmith in forum General Questions
    Replies: 0
    Last Post: 6 Jan 2012, 09:05 PM
  2. blank checkout page: index.php?main_page=checkout&fecaction=null
    By gibow in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 13 Jul 2011, 01:30 PM
  3. Replies: 1
    Last Post: 22 Jan 2009, 11:24 AM
  4. Replies: 2
    Last Post: 3 Aug 2008, 03:51 PM
  5. Blank Page At Checkout
    By accpro in forum General Questions
    Replies: 1
    Last Post: 28 Jul 2008, 11:24 AM

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