Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / 500 error in checkout

500 error in checkout

Locked

Views: 1,308

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
14 Oct 2007, 7:54 PM
#1
darkgamer avatar

darkgamer

New Zenner

Join Date:
May 2007
Posts:
14
Plugin Contributions:
0

500 error in checkout

swortis:

Wondering if anyone can suggest a way of troubleshoot an authorize.net AIM setup. I'm getting a 500 (internal error) on the final step of checkout (Testing Mode). Server logs don't shed any light at all on the problem.

How can I troubleshoot this issue?

Thanks!

I am having the exact same issue... Similarly, the server logs tell me nothing. Very frustrating. This site is hosted on goDaddy and the error occurs when trying to load the last step of the checkout process...

/store/index.php?main_page=checkout_process

The order goes through on the zen backend but it does not reach Authorize.net for payment. I tried running the script that the good doctor uploaded. Without SSL it works. With SSL I either get a timeout or a cURL error code 7 (Failed to connect() to host or proxy.) Here's what it outputs:

28 connect() timed out!
Array
(
    [url] => "https://www.zen-cart.com/testcurl.php"
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0
    [namelookup_time] => 0.016
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
)
```Here's the funny thing... I have another site with goDaddy that runs authorize.net AIM with the same version of zen (slightly different modules, but nothing dealing with payment), same phpinfo() settings too, but on a different server. There I get the same error code from cURL when I run  DrByte's script... Here's the odd thing: authorize.net AIM works there just fine with no 500 error... 

:blink:

The configure.php files are identical for both sites; ENABLE_SSL is set to false on each. openssl is enabled on both servers. Yet it works on one and not the other! Argh! What's going on?


Thanks in advance for your assistance; you guys are awesome to help support the zen community like you have.
14 Oct 2007, 10:01 PM
#3
darkgamer avatar

darkgamer

New Zenner

Join Date:
May 2007
Posts:
14
Plugin Contributions:
0

Re: 500 error in checkout

Thanks for the reply, but new evidence shows it's probably not a cURL/SSL error at all. I called goDaddy and they told me they were getting a sql error to go with my 500 error... It wasn't showing up in the logs but they e-mailed me this:

064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customers_id = '7'' at line 3
in:
[update customers set customers_default_address_id = '7', where customers_id = '7']
```I'm not sure why it doesn't like that syntax (tried removing the commas to no avail). I checked phpMyAdmin and all the fields are there that the query is looking for... 

When I looked for what php might be generating that SQL query, I found this:

```php
        $sql_update = "UPDATE " . TABLE_CUSTOMERS . " SET " . zen_db_output($additional_sql) . " WHERE customers_id = " . (int)$customers_id;
        $db->Execute($sql_update);
```I found this offending code in customers.php; this leads me to believe it may be related to that damn additional customer fields MOD that the author stopped supporting... and I thought I had it working... Argh!

So, the 500 error was php not knowing how to handle a mySQL error...

Any thoughts on how to proceed?