danielle_1_uk Posted November 9, 2007 Posted November 9, 2007 I am trying to transfer a shop from its original domain (renamed 'http://www.originalserver.co.uk') to a test account on our dedicated server (renamed http://newserver/~accountname). Steps I took: 1. Backed up database from the ORIGINAL server and exported as .sql file to my local machine. 2. Copied all files from the ORIGINAL server to my local machine. 3. Created a DB on the NEW server with exact UN & PW settings as original db 4. Ran through a fresh install of OSCommerce on the NEW server using the settings from the db just created 5. Tested the new shop - it worked fine, product links etc all worked correctly (unfortunately I can't remember whether I tested the admin section or not) 6. Copied and saved out both config files from the fresh install on the NEW server to my local machine. 7. Deleted ALL files on the NEW server created from the fresh install. 8. Restored the NEW database by importing .sql file via php admin 9. Uploaded ALL files from the ORIGINAL server to the NEW server. 10. Overwrote the config files on the NEW server with ones from the fresh install. After this, the shop appeared on the new server looking identical to the original store. Clicking on 'view all products' navigates to: url: http://newserver/~accountname/allprods.php This page brings up what looks like a full alphabetised record of the products in the db. However, navigating to some other pages results in a 404 error. It appears that this problem is unique to pages whose URLs would be rewritten by the SEO URLs module, i.e. navigating to 'contact us', 'search', 'login' or any other 'normal' php page takes you to their respective pages, but trying to visit a page with an SEO rewritten URL results in the error, e.g: Clicking on the category 'laptop': url: http://newserver/~ibattery/laptop-c-1624.html error: "The requested URL /index.php was not found on this server." The SEO URLs module is configured via the admin area, so I thought I would turn it off to see whether that rectified the issue. The problem is I could not gain access to the admin section at all. When I entered my admin UN & PW from the original shop, it just kept bringing up the login screen again. A search of the .htaccess file within the store root/admin directory revealed that 'AuthUserFile' was looking for authorisation from the OLD server - I think this .htaccess was modified by the install of the SEO URLs module. I entered the details of the NEW server in it's place and re-uploaded the .htaccess file. Now when I go to the admin login, after entering my UN & PW it redirects me to a completely different address: http://www.originalserver.co.uk/admin --> enter login details --> www.originalserver.co.uk/admin - i see the admin section http://newserver/~accountname/admin --> enter login details --> www.completelydifferentdomain.com/~accountname/admin - i see a server not found error message for a completely new domain name I have run a search for instances of the new domain name in ALL of the OSCommerce files, with no luck. I even tried looking in an sql backup of the db. The new domain name appears nowhere. It is unlikely that the SEO URLs module is at fault for this error as it does not effect the admin area, just the front-end store section. So why is the admin area redirecting to this new domain? Below is all the info currently contained within the following config files: ORIGINAL SITE ROOT > INCLUDES > CONFIGURE.PHP ORIGINAL SITE ROOT > ADMIN > INCLUDES > CONFIGURE.PHP NEW SITE ROOT > INCLUDES > CONFIGURE.PHP NEW SITE ROOT > ADMIN > INCLUDES > CONFIGURE.PHP ------------------------------------------------------ ORIGINAL SITE ROOT > INCLUDES > CONFIGURE.PHP ------------------------------------------------------ <?php // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.originalserver.co.uk'); define('HTTPS_SERVER', 'https://www.kysecure.net'); define('ENABLE_SSL', false); // secure define('HTTP_COOKIE_DOMAIN', 'www.originalserver.co.uk'); define('HTTPS_COOKIE_DOMAIN', 'www.kysecure.net'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/originalserver.co.uk/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/originalserver.co.uk/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/secure/k/kysecure.net/originalserver.co.uk/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', ''); // eg, localhost define('DB_SERVER_USERNAME', 'originalserver'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'originalserver'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> -------------------------------------------------------------- ORIGINAL SITE ROOT > ADMIN > INCLUDES > CONFIGURE.PHP -------------------------------------------------------------- <?php /* osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.originalserver.co.uk'); define('HTTP_CATALOG_SERVER', 'http://www.originalserver.co.uk'); define('HTTPS_CATALOG_SERVER', 'http://www.kysecure.net/originalserver.co.uk'); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/secure/k/kysecure.net/originalserver.co.uk/'); define('DIR_WS_ADMIN', '/admin/'); // absolute path required define('DIR_FS_ADMIN', '/secure/k/kysecure.net/originalserver.co.uk/admin/'); define('DIR_WS_CATALOG', '/'); // absolute path required define('DIR_FS_CATALOG', '/secure/k/kysecure.net/originalserver.co.uk/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // define our database connection define('DB_SERVER', ''); define('DB_SERVER_USERNAME', 'originalserver'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'originalserver'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> ------------------------------------------------- NEW SITE ROOT > INCLUDES > CONFIGURE.PHP ------------------------------------------------- <?php // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://newserver'); define('HTTPS_SERVER', 'http://newserver'); define('ENABLE_SSL', false); // secure define('HTTP_COOKIE_DOMAIN', 'newserver'); define('HTTPS_COOKIE_DOMAIN', 'newserver'); define('HTTP_COOKIE_PATH', '/~accountname/'); define('HTTPS_COOKIE_PATH', '/~accountname/'); define('DIR_WS_HTTP_CATALOG', '/~accountname/'); define('DIR_WS_HTTPS_CATALOG', '/~accountname/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/accountname/public_html/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost define('DB_SERVER_USERNAME', 'accountname_originalserver'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'accountname_originalserver'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> --------------------------------------------------------- NEW SITE ROOT > ADMIN > INCLUDES > CONFIGURE.PHP --------------------------------------------------------- <?php define('HTTP_SERVER', 'http://newserver'); define('HTTP_CATALOG_SERVER', 'http://newserver'); define('HTTPS_CATALOG_SERVER', 'http://newserver'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/home/accountname/public_html/'); define('DIR_WS_ADMIN', '/~accountname/admin/'); define('DIR_FS_ADMIN', '/home/accountname/public_html/admin/'); define('DIR_WS_CATALOG', '/~accountname/'); define('DIR_FS_CATALOG', '/home/accountname/public_html/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'accountname_originalserver'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'accountname_originalserver'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> I'm stuck, hope someone can make sense of it all. Thanks!
danielle_1_uk Posted November 16, 2007 Author Posted November 16, 2007 UPDATE: I know this is probably quite a unique problem, but if anyone is having the same issue: I was able to gain access to the admin area by appending the URL with a forward slash: http://newserver/~accountname/admin/ as opposed to: http://newserver/~accountname/admin After turning SEO urls off, everything worked ok, except that certain urls required the forward slash. Apparently this is a 'feature' of the subdomain because of the server settings but wont occur after the actual domain is transferred. Still not sure whether I can use SEO URLs with this site.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.