Pointed A Different Domain To Cs-Cart (Same Server, Same Files). Now I'm Getting A 'unable To Read Resource' Error!

I'm not sure why I'm having trouble with this since it appears to be a simple change.



Here are the things I've changed:

[list]

[]Removed oldwebsite.com from pointing to CS-Cart (host records)

[
]Changed IP on server

[]Added newwebsite.com to point to CS-Cart with the new IP (host records)

[
]Added replaced oldwebsite.com with newwebsite.com in config.local.php

[/list]



Yet I'm getting an error that suggests that the website files cannot be found. The error message is:


[quote]Warning: Smarty error: unable to read resource: “exception.tpl” in /home/[my-username]/public_html/lib/smarty/Smarty.class.php on line 1095[/quote]



What did I do wrong?

I've contacted CS-Cart to change the domain on my license key but I read somewhere that this doesn't affect the change I've made as it's more of a legal imperative than a technical one.

Try check CS-Cart files permissions (CS-Cart Documentation — CS-Cart 4.15.x documentation) and clear cache.

If the http host in the config.local.php file is www.newwebsite.com try to change it to newwebsite.com

Thanks for your help guys, but no changes have been made at all to the files since no files were moved. I only changed the host records.



The URL's in the config file don't have the 'www' in the front.



Cache has already been cleared.



So all of the proposed solutions have already been applied and it's still not working. I've changed IP back to what it was before and now I'm getting the “Apache is working on your cPanel and WHM Server” message instead of the error message from before.



Do I need to change something in the database somewhere? Please propose other solutions.

Any help? I can't figure this out but I'm sure there's something simple I'm missing!

How long ago did you point the new domain to the hosting? DNS propagation is not instant and can take up to 72 hours I believe.

It's fully propagated. I'm getting the same error message as before:


Have you contacted your host's support to see if they have any input?

Given that you are getting a smarty error, your DNS is resolving properly and you are getting to the index.php (or admin) of the site. Apache will not use smarty so you are “in the cart” and are getting some kind of error where the internals of the cart are trying to throw an exception.



Easy check is to place:


die("Got here: ".__FILE__);


as the first code line of index.php



My bet is your cache is not really cleared. Remove the whole var/cache directory manually by just changing the name of var/cache to var/cache.backup.

Hi Tony,



Thanks for your input.



I added that line and got this:

[quote][color=#000000]Got here: /home/[myusername]/public_html/index.php[/color][/quote]



I’ve manually cleared both cache folders before, and have done it again this time by renaming. Issue still remains.



Any other ideas guys? :(

Are you using a CDN?

[quote name='kingsleypress' timestamp='1408801020' post='190395']

Are you using a CDN?

[/quote]



Nope. It's a simple install.

Connect to your database.

Look at the record you have for table “companies”.

Look at the values in the fields for 'URL', 'storefront', 'secure_storefront'.

Your problem may just be a CS-Cart Ultimate problem with an improperly defined storefront, and if you can't do this via the admin backend, you can do this directly in the db.

@magpie's suggestion is a good 2nd step.

Look through init.php at the order of initialization. Insert the same die statement between the calls to the initialization routines until you no longer see the 'die' statement but instead see the smarty error. The init routine above your die is most likely the area where you are failing. It can be a slow, manual process if you don't have real PHP debugging tools at your disposal.

[quote name='Magpie Don' timestamp='1408805961' post='190404']

Connect to your database.

Look at the record you have for table “companies”.

Look at the values in the fields for 'URL', 'storefront', 'secure_storefront'.

Your problem may just be a CS-Cart Ultimate problem with an improperly defined storefront, and if you can't do this via the admin backend, you can do this directly in the db.

[/quote]



This solved it! These entries definitely need to be changed when moving to a different domain.



Thank you everyone. Have a jawsome day.