Shipping Broken

I've been struggling with this for a while now and I'm getting pretty desperate. Hopefully someone can give me some ideas for a solution.



I built a store, spent months painfully uploading products, designing the front-end, adding bells and whistles, only to find that the real-time shipping rates are broken.



UPS, FedEx, USPS, etc… all return a 401 error instead of a shipping cost.



Well, after checking every possible combination of settings in the admin panel (trust me, I've ticked and un-ticked every box) I went to CS Cart support.



Support says it's a server error. So I checked all the server settings (hostGator) and everything checks out. There are no firewalls or filters that are blocking the transmission of data to any of the shipping service providers, and especially nothing blocking ALL of them.



Support still insists that it's a problem with the server, so I got a new server, WiredTree, upgraded to v2.2.2, transferred the site and the same issue. Shipping's broke.



Support maintains that it cannot be a problem with my Cs Cart. So I installed a fresh copy of CS Cart, tested the shipping and Hey Presto! It works!



I overwrote the fresh CS Cart files with my own and the shipping still worked!



Then I uploaded my database… and it broke again. I'm back to getting the super-helpful “error n/a” message when I test the shipping method from the admin panel and the


[quote]“Sorry, it seems that we have no shipping options available for your location. Please check your shipping address and contact us if everything is okay. We'll see what we can do about it.”[/quote]



error on the front-end.



Next, I tried overwriting the database with blank tables, backing up each table individually and restoring them one at a time, checking each time to see when the shipping would break. I got about half-way when the entire site crashed; obviously some tables are dependent upon one another and if I can't access the admin panel, I can't check to see which one is breaking my shipping.



Other things I've already tried:



[list]



[]uninstalling all third-party addons

[
]checking for javascript conflicts

[]compared all the PHP and TPL files on my server with the fresh ones

[
]playing with locations, localizations (They're correct)

[]getting first-hand confirmation that the usernames and passwords are correct from the shipping providers

[
]cursing

[]swearing

[
]eating right and staying healthy

[*]not eating right and drinking too much



[/list]

nothing seems to work.



The way I understand it, a CS Cart script sends an XML file to UPS (or whoever) with my AccessLicenceNumber, UserId, Password, RateRequest etc… and UPS sends back a number, which CS Cart plugs into a template to display. Somewhere in my database is an evil gremlin that is preventing this exchange.



How do I find and kill it?



Why does a fresh install work but when I upload my database everything turns to crap?



I love CS Cart and I have used it for several other projects with awesome support and very little problems. Why is CS Cart support replying to every ticket message with “it's the server” or “have you tried changing mysql to mysqli?” Basically blowing me off.



too long, didn't read: something in my database is breaking the real-time shipping… how fix?

Oh, and before anyone asks, yes… I tried clearing the cache

I suppose it is safe to assume that you have Curl enabled on your server config.



We have no problems obtaining realtime rates(on Hostgator VPS) from Fedex, UPS or USPS concurrently so they do work without problem.



Have you done file diffs against the vanilla CS-Cart download on the shipping related files?



If so, then you may also need to perform a DB diff against a non-modified version to find the problem.



CS-Cart support should be able to do this from a support ticket request.



It may also help to narrow things down by enabling http Requests within your Admin Panel Log settings



You may also want to provide some screen shots of your shipping related settings.



And then while you are mucking around in there it would be a very good idea to double check all of your directory & file permissions again to be absolutely certain they are all correct for your particular server config.

(Most likely 0755 for Directories, 0644 for Files)

[quote] …the problem occurred because of the following error:

HTTPS: libcurl error(56): Received HTTP code 401 from proxy after CONNECT



Proxy server settings were saved in your database. I made a backup of your “cscart_settings” table (dump_10202011_settings.sql) and cleared input fields of the “Proxy server for outgoing connections” section. After that shipping rates were calculated properly for me on your site.



Please check it.



You should contact your server administrator regarding this problem.



Thank you.





Sincerely yours,

Anastasiya Kozlova

Technical support engineer[/quote]



Well, Holy s***! Anastasiya finally came through for me!



You always feel stupid after the problem is fixed. But how in the world did a proxy server for outgoing connections get into my database in the first place?



I'm so happy to have a simple fix… I'm willing to overlook a minor mystery and get on with my life.



Thanks, Anastasiya! I'll send you a case of vodka.