Zen Cart Logo
Forums / General Questions / CHeckout Page Special Characters cause HTTP 500 Server error

CHeckout Page Special Characters cause HTTP 500 Server error

Views: 4,390

Results 1 to 14 of 14
24 Feb 2012, 3:42 PM
#1
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

CHeckout Page Special Characters cause HTTP 500 Server error

Our international customers are seeing
"HTTP 500 Server Error" when they try to get past the checkout page
index.php?main_page=checkout_shipping

We have found that the issue is because they are using special characters which are common for their country or language.

For example, Germans use the umlaut (double dots over the u ).

When they bring it to our attention, we ask them to avoid using special characters and the problem is resolved. And not all special characters cause the issue, as we get some crazy characters from countries north of Europe. Often there are so many odd characters that the address is not recognizable and we must contact the customer for clarification.

I don't understand why the Zen-cart text validation is not flagging this or why a server error occurs.

24 Feb 2012, 4:04 PM
#2
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

A customer sent the actual error that they see:

Server error
The website encountered an error while retrieving .../index.php?main_page=checkout_shipping. It may be down for maintenance or configured incorrectly.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

.

24 Feb 2012, 8:45 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: CHeckout Page Special Characters cause HTTP 500 Server error

500 errors are triggered by your SERVER, before Zen Cart even has a chance to do anything.

Thus, you need to investigate the problem with your hosting company.

https://www.zen-cart.com/tutorials/index.php?article=63

24 Feb 2012, 8:54 PM
#4
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

The link points out that bad PHP and bad configure.php contents can cause this.

Enter bad symbols into PHP code ---> crash
Enter good symbols in php code --> does not crash.

That ain't a server problem

24 Feb 2012, 9:00 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: CHeckout Page Special Characters cause HTTP 500 Server error

Apparently you're the expert. Let us know the solution to your unique problem when you're ready to share.

10 Apr 2012, 12:46 PM
#6
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

This bug, though rare, keeps showing up.

Here is a checkout page that when submitted resulted in
HTTP Error 500 (Internal Server Error)

I had the customer then use his South African address only and check the box "Same address for Shipping/Billing".
This worked. He then went into his account and changed the shipping address to the Texas address. No errors occurred.

When the error happens, it is always with a international billing and US shipping address. We thought it was related to special characters, but perhaps not based on this screen capture

V1.3.9e

10 Apr 2012, 2:30 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: CHeckout Page Special Characters cause HTTP 500 Server error

Do you have any log files in your /cache folder? If so, those might provide a clue as to what's going on ...

10 Apr 2012, 3:31 PM
#8
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

lat9:

Do you have any log files in your /cache folder? If so, those might provide a clue as to what's going on ...
I don't know if its related, but the log file only had this:

[09-Apr-2012 01:15:02] PHP Fatal error: Call to a member function RecordCount() on a non-object in /home/content/44/4963044/html/ZC/includes/modules/mistik/create_account.php on line 391

10 Apr 2012, 3:48 PM
#9
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

Line 391 has the following:

   } else if ( preg_match('/POBOX/si', $street_address) ) {

      $error = true;

      $messageStack->add('create_account', PO_BOX_ERROR);

The last line is line 391

and is part of a section called
// BEGIN PO Box Ban 1/1

12 Jun 2012, 8:20 AM
#10
s_p_kannan avatar

s_p_kannan

New Zenner

Join Date:
Jul 2010
Posts:
1
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

Got the same issue at one of our website.
The issue was with the special characters in the product title... there are brackets, double quotes etc ( ) ' '' in the title...
Removed those... the issue was fixed... :)

Thanks

12 Jun 2012, 2:39 PM
#11
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

All of our product titles are just simple text. We still get this error from time to time with no idea what the issue is.

12 Jun 2012, 2:49 PM
#12
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

DrByte:

Apparently you're the expert. Let us know the solution to your unique problem when you're ready to share.

From this very site....

PHP errors Sometimes when a PHP script encounters an error, either due to a timeout or a syntax problem, or something worse like a logic problem, it might trigger a 500 Internal Server Error. It may not always do so, but it may.
In such cases, if you use the Zen Cart debug logs to review PHP errors, you might discover the cause of the problem there.

12 Jun 2012, 3:22 PM
#13
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

Unfortunately, the log files do not appear to have any information on this error.

24 Aug 2012, 9:03 PM
#14
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: CHeckout Page Special Characters cause HTTP 500 Server error

Looking in our logs, we found errors affecting our FedEx Web Services plug in. The errors were related to UTF-8
For example, "Encoding: string 'S\xfc...' is not a valid utf-8 string in...."

Though there are no specific log entries, I'm told that this UTF-8 issue is the source of the occasional Server 500 error as well.
Zen V1.5 now uses UTF-8, but only for new installs.
So how would I go about supporting UTF-8? Are there any issues with changing to UTF-8? For example, will I just then receive errors that strings are not valid for....?

Thanks,