bighof Posted August 7, 2005 Posted August 7, 2005 Hi I want to change hosting companies, but have some transfer questions. what files do I transfer? I have these outside the www folder; htsdata folder, osCommerce folder, .acart, .addon-install, .addonscgi-osCommerce, .contactemail Inside the www folder I have: OsCommerce folder, cgi-bin, suspended.page .htaccess Next where do I find the my sql database and what is it named? Will there be any transfer problems with it that I need to know of? Are there any other files or folders I left off the above list that need to be trasfered? Thank you John
ozEworks Posted August 7, 2005 Posted August 7, 2005 This is a windows server? I suspect you need the inside the www oscommerce folder. But take everything and then just load that one and see if it works. Your database is accessible via phpAdmin. You know how to get to that. You have to do an export with structure and data.
♥Vger Posted August 7, 2005 Posted August 7, 2005 You can also do a database backup from inside your osCommerce admin panel - just select Download as the option and do not enable compression. Vger
bighof Posted August 7, 2005 Author Posted August 7, 2005 This is a windows server? I suspect you need the inside the www oscommerce folder. But take everything and then just load that one and see if it works. Your database is accessible via phpAdmin. You know how to get to that. You have to do an export with structure and data. <{POST_SNAPBACK}> Current host OS is Ret hat Linux going to a Linux OS. How do I do a export with structure and data transfer?
bighof Posted August 7, 2005 Author Posted August 7, 2005 You can also do a database backup from inside your osCommerce admin panel - just select Download as the option and do not enable compression. Vger <{POST_SNAPBACK}> Hi Vger If I do a backup and save it to my desktop then do I ftp that to my new site and where on my new site do I put it? Current host OS is Ret hat Linux going to a Linux OS. Do you know if the only folder or file that needs to be transfered is the osCommerce file inside the www folder? Thanks John
GraphicsGuy Posted August 7, 2005 Posted August 7, 2005 Hi VgerIf I do a backup and save it to my desktop then do I ftp that to my new site and where on my new site do I put it? Current host OS is Ret hat Linux going to a Linux OS. Do you know if the only folder or file that needs to be transfered is the osCommerce file inside the www folder? Thanks John <{POST_SNAPBACK}> First you will need to upload the oscommerce folder. Then upload the data base backup file to the /admin/backup/folder within the oscommerce folder. Unless there have been some unusual customizations, the other folders/files in the web folder should not be required. You may need to use your FTP program to set the permissions on the backup folder (oscommerce/admin/backup/) and both configure.php files to match those on the first server. Then make any necessary path adjustments in the configure.php files. You will also need to go into the server control panel (not the oscommerce admin) and password protect the admin folder. Finally, log into your oscommerce admin and restore the database backup (which will now appear in the backup list). Then tour your store (including a purchase transaction all the way through the payment and confirmation) and admin section to make sure everything works. Rule #1: Without exception, backup your database and files before making any changes to your files or database. Rule #2: Make sure there are no exceptions to Rule #1.
bighof Posted August 7, 2005 Author Posted August 7, 2005 First you will need to upload the oscommerce folder. Then upload the data base backup file to the /admin/backup/folder within the oscommerce folder. Unless there have been some unusual customizations, the other folders/files in the web folder should not be required. You may need to use your FTP program to set the permissions on the backup folder (oscommerce/admin/backup/) and both configure.php files to match those on the first server. Then make any necessary path adjustments in the configure.php files. You will also need to go into the server control panel (not the oscommerce admin) and password protect the admin folder. Finally, log into your oscommerce admin and restore the database backup (which will now appear in the backup list). Then tour your store (including a purchase transaction all the way through the payment and confirmation) and admin section to make sure everything works. <{POST_SNAPBACK}> Thank you for the help
bighof Posted August 14, 2005 Author Posted August 14, 2005 Hi I did the transfer of the osCommerce folder, then did the backup of the DB and transfered. Now when I try to go to my new site (with a new www.name) I get the following message. Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /mounted-storage/home6/sub001/sc12855-XAJI/www/osCommerce/includes/functions/database.php on line 19 Unable to connect to database server! Without being able to open the site I can not get to osCommerce admin to restore the db. Here is line 19 of the database.php function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { THIS IS LINE 19 $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } What am I doing wrong? I also checked the configure files and the only paths I found point to the correct db (the backup I am transfering) so no need to change. I found them on line 42 and 44 0f the admin/includes/configure.php Is this the path adjustments and do they need to be changed? // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'bighof_osc1'); define('DB_SERVER_PASSWORD', 'I am not showing this, but it is here'); define('DB_DATABASE', 'bighof_osc1'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> and also found in the osCommerce/includes/configure.php // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'bighof_osc1'); define('DB_SERVER_PASSWORD', ' I am not showing this, but it is here'); define('DB_DATABASE', 'bighof_osc1'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); ?> Is this the path you refered to? If not please explain?? What needs to be fixed? Also can I transfer my htpasswd and htaccess to the new site or should I start from scratch with this. I am trying to transfer my working site to a new host, but first to a new www.name to be sure it is working before I transfer the bighof name to the new host. Thanks John :( First you will need to upload the oscommerce folder. Then upload the data base backup file to the /admin/backup/folder within the oscommerce folder. Unless there have been some unusual customizations, the other folders/files in the web folder should not be required. You may need to use your FTP program to set the permissions on the backup folder (oscommerce/admin/backup/) and both configure.php files to match those on the first server. Then make any necessary path adjustments in the configure.php files. You will also need to go into the server control panel (not the oscommerce admin) and password protect the admin folder. Finally, log into your oscommerce admin and restore the database backup (which will now appear in the backup list). Then tour your store (including a purchase transaction all the way through the payment and confirmation) and admin section to make sure everything works. <{POST_SNAPBACK}>
bighof Posted August 15, 2005 Author Posted August 15, 2005 Anyone have any ideas? HiI did the transfer of the osCommerce folder, then did the backup of the DB and transfered. Now when I try to go to my new site (with a new www.name) I get the following message. Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /mounted-storage/home6/sub001/sc12855-XAJI/www/osCommerce/includes/functions/database.php on line 19 Unable to connect to database server! Without being able to open the site I can not get to osCommerce admin to restore the db. Here is line 19 of the database.php function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { THIS IS LINE 19 $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } What am I doing wrong? I also checked the configure files and the only paths I found point to the correct db (the backup I am transfering) so no need to change. I found them on line 42 and 44 0f the admin/includes/configure.php Is this the path adjustments and do they need to be changed? // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'bighof_osc1'); define('DB_SERVER_PASSWORD', 'I am not showing this, but it is here'); define('DB_DATABASE', 'bighof_osc1'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> and also found in the osCommerce/includes/configure.php // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'bighof_osc1'); define('DB_SERVER_PASSWORD', ' I am not showing this, but it is here'); define('DB_DATABASE', 'bighof_osc1'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); ?> Is this the path you refered to? If not please explain?? What needs to be fixed? Also can I transfer my htpasswd and htaccess to the new site or should I start from scratch with this. I am trying to transfer my working site to a new host, but first to a new www.name to be sure it is working before I transfer the bighof name to the new host. Thanks John :( <{POST_SNAPBACK}>
GraphicsGuy Posted August 18, 2005 Posted August 18, 2005 Sorry, I have been offline for a while due to moving. If you haven't already solved this, my first thought would be something I didn't think to include in my directions before. :-" The database itself does need to exist. You can do this most easily in the hosting control panel (not osc). Alternatively it can be done with a little more learning curve using the mySQL command line via SSH. Using either of these methods you can create the database without adding structure or content. Once the database is created you should be able to reload the database via osc or at least using phpMyAdmin. Myself, I prefer to my hosting control panel and then upload the database using phpMyAdmin (I am just very comfortable in it). Sorry about the omission. Rule #1: Without exception, backup your database and files before making any changes to your files or database. Rule #2: Make sure there are no exceptions to Rule #1.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.