Zen Cart Logo
Forums / General Questions / HTTP 500 at end of checkout ?

HTTP 500 at end of checkout ?

Locked

Views: 3,245

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
28 Jul 2007, 6:30 AM
#1
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

HTTP 500 at end of checkout ?

I get the HTTP 500 error message only when I click the Confirm Order button at the very end of the transaction. The order does get confirmed but the customer will see that error instead of a nice page to tell them the order was confirmed. Anybody know what to look for to fix this? I use an SSL site with Network Solutions.

28 Jul 2007, 6:41 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

What payment module are you using when this happens?
What version of Zen Cart is installed?
What addons/contributions are installed?

28 Jul 2007, 5:19 PM
#3
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

I tested it in 3 payment modules, Credit Card which for me is not integrated but I use a manual entry for credit cards, money orders, and Paypal. All three give the same error. I only use the add-on for Google Analytics (which I think is possibly the problem as I just installed the new simple one). I have zencart 1.3.7 installed. How can I trace the code to find out why this is happening? As I metioned before the order does go through and the email is sent out but the customer will get the HTTP 500 error. Not a nice way to greet a customer who made an order.

Also I use Network Solutions SSL certificate which is not the best as it doesn't recognize when I am in SSL mode and not.

29 Jul 2007, 6:53 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

iang000:

I only use the add-on for Google Analytics (which I think is possibly the problem as I just installed the new simple one). I have zencart 1.3.7 installed. How can I trace the code to find out why this is happening?What happens if you remove the google analytics code to test ?
Did it work without these errors before you installed that code?

One way to find out exactly what's different between your site and a working "base" install is to compare all your code vs the master code. Here's one documented approach to such comparison:
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

iang000:

Also I use Network Solutions SSL certificate which is not the best as it doesn't recognize when I am in SSL mode and not.

Clarification: It's not your certificate. It's the Networks Solutions webserver configuration ... their hosting services typically have this problem. There is no solution from a coding perspective. Switching hosts has been the only option for truly engaging SSL support and getting the padlock to show, etc.

29 Jul 2007, 5:43 PM
#6
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

Thanks for the information. The wiki info is great but it will be very time consuming. There are so many files to compare. I just did a sample of a few and found there are differences with CR and CRLF probably due to the server being Unix and my computer is Windows. I was wondering if there is some sort of a debug available in php which allows the user to execute one statement at a time so the exact statement that is killing my script can be found. I know the order is actually completed, so I could start debugging right after that line of code. BTW where might I find the php code that is being executed as the customer presses the Confirm the order button? That would point me to a good place to start looking.

29 Jul 2007, 11:44 PM
#7
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

Here is another difference: the version I am using is: 5137 2006-12-09 22:02:24Z wilt (in application_top.php), the newest one I downloaded is: 6526 2007-06-25 22:59:38Z drbyte. Should I upgrade to this newer version?

30 Jul 2007, 7:15 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

You didn't answer these questions:> DrByte:

iang000:

I only use the add-on for Google Analytics (which I think is possibly the problem as I just installed the new simple one). I have zencart 1.3.7 installed. How can I trace the code to find out why this is happening?What happens if you remove the google analytics code to test ?
Did it work without these errors before you installed that code?

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_54&products_id=378

30 Jul 2007, 1:58 PM
#9
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

Forgot to post the answer. I removed the Google analytics code and it didn't help. I don't remember it ever working correctly, I used to think it was just my browser but now I know it is always happening even with Firefox.

30 Jul 2007, 4:11 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

I still strongly recommend the file-by-file comparison.
You'll need to be familiar with it in order to do site upgrades anyway.
Fixing your CR vs CRLF problems sooner than later is also a good idea. Usually making some settings changes in FTP can help with this. If you installed via fantastico, they likely left all the files in a bad state with mixed up line-endings. In that case a reinstall w/o fantastico is most often the easiest overall fix.

Your problems are most likely related to some sort of customization or addon happening in the template. Otherwise the error would be expected to prevent the order from being saved properly.

Which template files have you customized? or been affected by addons?
Are you using any affiliate-tracking systems?

Zen Cart Program Execution Flow:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_54&products_id=378

30 Jul 2007, 6:53 PM
#11
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

In order to get the golden lock with Network Solutions I needed to modify the file in includes/templates/classic/common called html_header.php. All I did was make the code select the HTTPS version ($request_type = 'SSL' or 'NONSSL'). That fixed my lock problem. I use the classic template with this minor modification. I updated the Paypal files with the latest patch as Paypal was not working, now it does. The only other non-standard change is the Google Analytics. I also modified the check for SSL in the Google Analytics file to always use the SSL version. This also allows me to have the lock working. Could the HTTP 500 error be due to that? (the SSL being forced).

The only other modifications are the 'usual' stuff like putting my business name where it should go, removed the banners, removed a few of the side boxes, etc. I did look at nearly all of the file by file comparisons and nothing stands out. Most of the differences are the changes that you guys made between 1.3.7 and 1.3.7.1. I do not know what fantastico is. I use filezilla, probably I need to change a setting w.r.t. the CRLF's - there were only a few files that had that.

30 Jul 2007, 8:30 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

iang000:

In order to get the golden lock with Network Solutions I needed to modify the file in includes/templates/classic/common called html_header.php. All I did was make the code select the HTTPS version ($request_type = 'SSL' or 'NONSSL'). That fixed my lock problem.What line(s) did you change, and what did you change them to?

As to the 500 error, do you have access to your server's errorlog? It should tell you what HTTP errors are occurring, and when , and why.

30 Jul 2007, 9:38 PM
#13
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

This line: <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTPS_SERVER . DIR_WS_HTTPS_CATALOG ); ?>" />
Originally it was selecting between the nonssl and the ssl versions, now they both are ssl.

I already posted the error from the log above - here it is again:
[Sun Jul 29 19:13:59 2007][error] [client 205.178.182.168] Premature end of script headers: index.php, referer: https://www.batteriesforipod.com/zencart/catalog/index.php?main_page=checkout_confirmation

30 Jul 2007, 10:13 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

iang000:

I already posted the error from the log above - here it is again:
[Sun Jul 29 19:13:59 2007][error] [client 205.178.182.168] Premature end of script headers: index.php, referer: https://www.batteriesforipod.com/zencart/catalog/index.php?main_page=checkout_confirmation

I was hoping there might be more than just that one line, such as a trend of additional errors.

30 Jul 2007, 10:14 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

Let's try this: Disable SSL.

  • edit your /includes/configure.php file, and set ENABLE_SSL to 'false'
  • test a checkout
  • does the error continue to happen ?
30 Jul 2007, 11:03 PM
#16
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

Yes, I just tried what you requested and it worked! I didn't get the HTTP error. I still get the golden lock though. This is because of the modification I showed you earlier, even if I set ENABLE_SSL to false the code still selects the SSL version of my site. Should I just leave everything as it is? Do you suggest I do something else?

30 Jul 2007, 11:20 PM
#17
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

I get the popup that says this page contains both secure and unsecure items on my home page when I did this. Is there a way I can set the ENABLE_SSL back to 'true' and still not have the HTTP 500 error?

31 Jul 2007, 2:22 AM
#18
drbyte avatar

drbyte

Sensei

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

Re: HTTP 500 at end of checkout ?

All I can tell you concretely is ...

  1. If you undo the SSL change you made to html_header.php so that the default Zen Cart code is in charge, it works fine on most hosts.

and

  1. Network Solutions hosting ... runs a rogue and non-standard hosting configuration ... and most Zen Cart sites cannot use it in conjunction with SSL support.

It's too bad they charge so much and lock their customers in so tightly. They usually are happier when they go to different hosting companies.

At least, that's been my experience.
And based on experience, I wouldn't host with Network Solutions even if I was paid to do so.
They have a lot of improvement to make to convince me otherwise.

Perhaps my answer is a bit biased ... I'd be happy to change my tune if they were to fix their servers and make things work. But, even employees of the company have the same problem and can't get anyone to fix it (yes, you can find that here on the forum from another poster whom I tried to help).

31 Jul 2007, 3:48 AM
#19
iang000 avatar

iang000

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: HTTP 500 at end of checkout ?

Thanks, I was afraid it was a Network Solutions issue. I am prepaid up until March 2008 unfortunately. I will try to figure something out.