How to move osCommerce?
Posted 11 May 2012 - 18:07
if someone is still having this problem or if someone comes across this problem, all you need to do is to carefully and intelligently replace the paths in both configuration files as have been suggested.
In my case, I was moving from my local environment to a hosting environment.
In my local environment, I had something like this: http://localhost/ which was pointing to a directory on the webroot like this c:/xampp/htdocs/onlineshop/catalog/...
However, I configured my domain to point directly to catalog(!). Which means on the hosting server, I had to replace paths like:
define('HTTP_COOKIE_PATH', '/onlineshop/catalog/'); to define('HTTP_COOKIE_PATH', '/');
define('DIR_FS_CATALOG', 'C:/xampp/htdocs/onlineshop/catalog/'); to define('DIR_FS_CATALOG', '/var/www/xyz/html/onlineshop/');
So it's just a matter of intelligently replacing the paths.
Posted 29 May 2012 - 18:18
I've spent the last 2 days trying to transfer my osCommerce site to a new server. I done the following:
1) Downloaded the files from the old server
2) Exported the database in phpMyAdmin on the old server
3) Changed the nameservers of my current domain to my new hosting
4) Assigned the domain to my hosting using cPanel
5) Setup FTP account for new server
6) Uploaded the files to my new server
7) Imported the database in phpMyadmin on my new server
8) Opened the file /includes/configure.php and amended all the paths and database details (as the database name had changed)
9) Then opened the file /admin/includes/configure.php amended the details in the required lines
BUT now when I attempt to login to the admin cPanel of osCommerce, the server prompt shows as normal to enter the password (protected by .htaccess & .htpasswd) but the password is not being accepted the prompt keeps reloading. I am definitely using the correct password.
I've checked on this forum and many others but I still cannot seem to find the resolution.
I have tried deleting the .htpasswd & .htaccess files as mentioned is a few threads I've come across, I managed to also delete the users in the administration table in phpMyAdmin, I then navigated back to the the admin cPanel to setup new admin, this works perfect.
BUT when I randomly click on options within the cPanel the server suddenly drops down the login form again and prompts me to login, I try the username and password I used to get it and it does nothing, the drop-down reloads again.
Support at my new host (Heart Internet) have been very helpful, trying to assist me all day but I am beginning to think that it has something to do with osCommerce. I recall when originally installing osCommerce on my old hosting, when setting the first admin, it advises you to protect with .htpasswd & .htaccess which I did. When you select this option I believe it may must run a script to generate the .htpasswd & .htaccess files and generate some new code to only allow this access. I'm just guessing now though, as you can probably tell I'm no php developer.
I could really do with some guidance, I seem to have tried everything any forum says but nothing seems to be work.
To cut that short, the login prompt which .htpasswd and .htaccess show at login does not accept my username and password and I'm unable to access my osCommerce admin, I have tried generating encrypted passwords and amending the files via FTP but it does not seem to work either.
Has anyone had this problem or that can help me?
Posted 29 May 2012 - 19:15
Yes I updated that path. It's very strange, I've tried almost everything but there must be something I'm missing
Happy to hear anymore suggestions
Posted 19 July 2012 - 17:03
I exported my database and moved it to a new one
I ftp'd out the site from the old server
I set up the hosting and dns to the new server
I ftp'd the site into the new space
I updated the admin/includes/configure.php file with the new info
I updated the catalog/includes/configure.php file with the new info
However, when I go to connect to my admin site, it cannot login to the database and says that access is denied as if I have the wrong password or user info. I know it's correct as I can copy/paste the password from my code into the login page and get in. Does osCommerce have issue with case and/or special characters in passwords?
At the main page I get:
"Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory." (I looked at/for both files. I can't find the first one and the second seems not to have any edits or places for me to enter such details)
At the Admin page I get:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'safetysignsdata@'@'220.127.116.11' (using password: YES) in/**full path edited**/admin/includes/functions/database.php on line 19
Unable to connect to database server
What am I missing? Obviously, I'm not too sharp when it comes with this, the guy who set this up for us flaked out on us and I've had to learn as I go.
Posted 14 August 2012 - 10:27
My site has moved to another server, fine (the old one is still live too for now) it seems to pretty much all be working. I do have some strange
? icons showing before prices?
THE PROBLEM is my admin page - it is just blank?
The config paths are correct; the database has been changed and updated...
I can still log into the admin from the old live version
but not from my new server version
Please help someone?
Posted 22 August 2012 - 02:30
OK, there are ways to do it, if you configure your adresses correctly in the config etc etc... I've followed those instructions and it's always been hit or miss with me if it works or not.
If you want a sure fire way that NEVER FAILS for me.. here it is:
TRANSFERING OSCOMMERCE TO A NEW SERVER / DOMAIN NAME IN 10 EASY STEPS
** Keep a backup of your old website to be transfered before making any changes **
ON YOUR NEW SERVER
1) Upload a FRESH oscommerce installation to your new server.
2) Install a fresh copy of oscommerce (I'll assume everyone here knows how to do that lol)
ON YOUR OLD SERVER
3) IF your admins are htaccess/htpassword protected.. go into your admin of the old site on the old server and turn them all off (admin -> configuration -> administrators)
4) download everything with an FTP client.
5) download your mysql database (export).. either take a backup from your admin area, or via phpmyadmin.
6) go through your oscommerce (the one you want to keep thats being transfered) and delete the .htaccess and .htpassword files in the catalog, includes and admin folders
7) go through your oscommerce (the one you want to keep thats being transfered) and delete the config files in catalog/includes and catalog/admin/includes folders
right.. now, when you upload you oscommerce, you will overwrite everything EXCEPT the config files etc (which have been perfectly setup for you and specific for your new server when you did the fresh install earlier... so, go ahead and upload that now.
EDIT YOUR SQL FILE
8) Open up your exported MYSQL database file with a text editor and look for something that will roughly look LIKE:
-- Table structure for table `administrators`
CREATE TABLE IF NOT EXISTS `administrators` (
`id` int(11) NOT NULL auto_increment,
`user_name` varchar(255) character set latin1 collate latin1_bin NOT NULL,
`user_password` varchar(60) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
-- Dumping data for table `administrators`
INSERT INTO `administrators` (`id`, `user_name`, `user_password`) VALUES
(1, 'your admins will be here', 'load of gobledigook for the password');
DELETE this section from the MYSQL file and SAVE ** But be warned, you're esentially removing any admins & passwords your clients have created so make sure you take note of all of them before deleting.. then recreate them afterwards through your admin panel) **
9) Go to your database via phpmyadmin and go to the import area... For those that have been seeing � after a transfer... is it where your £ sign should be by chance? or other unit of currency? This is usually caused by installation of tables under UTF 8 character set, where certain symbols will not register properly during imports... so when you're importing, change this from UTF-8 to a character set that will be compatable with your currency symbol (whatever that may be for you, google it lol)
10) Once you have it all setup the way you need it, Import your new SQL database file that has the administrators table code removed.. it will overwrite everything EXCEPT the administrators table, preserving the admin login and password details that were created when you did the fresh install earlier... if it moans at you saying table already exists, just delete all your tables EXCEPT the administrators table, then try the import again.. I dont know why preserving the installed administrators table is important, but whenever I didnt do this, the admin logins wouldnt work after transfer.. but doing it this way works perfectly every time, so I'll keep doing it
AND THAT'S IT! It may seem like a really rediculous way of doing something that should be extremely simple, editing only 2 files, but the time I can spend doing this way when most of the time is spent watching the FTP client upload and download anyway, and compare that against the time I spend messing around when it doesnt work properly when I just change the two config files... it's this way every time now for me.
Oh, also, I noticed some people complaining about images not showing etc... This is often the case when your directories to your images are whole links directing to the file perhaps on your old server instead of using more reletive links... so I suggest finding where these links are, perhaps on the page in question or in your stylesheet.css, and update the new directories for your images... shouldnt be too difficult to find if you're using firebug or something similar.
Hope that helps a lot of people regarding this topic.
Edited by Sumisu, 22 August 2012 - 02:44.