contact303 Posted January 27, 2007 Posted January 27, 2007 :blush: As the title says i kinda shoot myself in the foot today whilst upgrading I am no SQL buff and really appreciate some help :thumbsup: The upgrade i completely screwed up lets notget into this ..I have a massive lump on myhad now from banding the table .... anyway I ended up with a copy of the SQL DB and a complete copy of the Shop file structure including all files (php and all images) But now ..what i do :'( :'( I installed form the installer on my serviceprovider admin site and that installs a default oscommerce ..Now if i copy the file structure I have over the deafult one and execute the backup sql of my database via phpmyadmin (servcieprovider) then all i get in browser is : Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'rudeboyi_osc1'@'localhost' (using password: YES) in /home/DELETED/public_html/shop/includes/functions/database.php on line 19 Unable to connect to database server! :blush: :blush: :-" Now I guess , did i say i am rather rubbish at sql :blush: , anyway I guess its because the relationship of the old install can not be just copied onto a new install Any way i can fix this ...pleeeasse :) otherwise i am really screwed and i know i only have these 2 backups ...Not a real complete backup ..they are lost as well :blush: Thanks for your time
alex121 Posted January 27, 2007 Posted January 27, 2007 :blush: As the title says i kinda shoot myself in the foot today whilst upgrading I am no SQL buff and really appreciate some help :thumbsup: The upgrade i completely screwed up lets notget into this ..I have a massive lump on myhad now from banding the table .... anyway I ended up with a copy of the SQL DB and a complete copy of the Shop file structure including all files (php and all images) But now ..what i do :'( :'( I installed form the installer on my serviceprovider admin site and that installs a default oscommerce ..Now if i copy the file structure I have over the deafult one and execute the backup sql of my database via phpmyadmin (servcieprovider) then all i get in browser is : Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'rudeboyi_osc1'@'localhost' (using password: YES) in /home/DELETED/public_html/shop/includes/functions/database.php on line 19 Unable to connect to database server! :blush: :blush: :-" Now I guess , did i say i am rather rubbish at sql :blush: , anyway I guess its because the relationship of the old install can not be just copied onto a new install Any way i can fix this ...pleeeasse :) otherwise i am really screwed and i know i only have these 2 backups ...Not a real complete backup ..they are lost as well :blush: Thanks for your time
contact303 Posted January 27, 2007 Author Posted January 27, 2007 errm yes thanks really helpfull just a quoteof mt post ?
alex121 Posted January 27, 2007 Posted January 27, 2007 First sorry for the post above, pushed the wrong button. Now if you are having the same problem as i did, i found that if you setup oscommerce on your own server, ie. http://localhost, to set up the site before it was uploaded to your sever, you need to make sure that the following files are pointing to your hostserver catalog/admin/includes/configure.php catalog/includes/configure.php The following is a section of script from my own test server: catalog/admin/includes/configure.php from approximately line 14 define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers define('HTTP_CATALOG_SERVER', 'http://localhost'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', 'C:/wamp/www/your file name/catalog/'); // where the pages are located on the server define('DIR_WS_ADMIN', '/your file name/catalog/admin/'); // absolute path required define('DIR_FS_ADMIN', 'C:/wamp/www/your file name/catalog/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/bcc/shop/'); // absolute path required define('DIR_FS_CATALOG', 'C:/wamp/www/your file name/catalog/'); // absolute path required This is the file from my host company from approximately line 16 define('HTTP_SERVER', 'http://yourwebsite.com'); define('HTTP_CATALOG_SERVER', 'http://yourwebsite.com'); define('HTTPS_CATALOG_SERVER', 'http://yourwebsite.com'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/home/httpd/vhosts/yourwebsite.com/httpdocs'); define('DIR_WS_ADMIN', '/catalog/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/catalog/'); From my test server catalog/includes/configure.php from approximately line 14 define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'localhost'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/your file name/catalog/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/your file name/catalog/'); define('DIR_WS_HTTPS_CATALOG', ''); 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', 'C:/wamp/www/your file name/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); This file is from my host company from approximately line 16 define('HTTP_SERVER', 'http://yourhost.com//'); define('HTTPS_SERVER', 'http://yourhost.com//'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'yourhost.com'); define('HTTPS_COOKIE_DOMAIN', 'yourhost.com'); define('HTTP_COOKIE_PATH', 'http:// yourhost.com/catalog/'); define('HTTPS_COOKIE_PATH', 'https://yourhost.com/catalog/'); define('DIR_WS_HTTP_CATALOG', '/shop/'); define('DIR_WS_HTTPS_CATALOG', '/shop/'); 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/httpd/vhosts/yourhost.com/httpdocs/catalog'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); Please note that yourhost.com refers to your own website name and that it may or not look identical Hope this helps and that i understood your question. Dont forget to backup your data!
contact303 Posted January 27, 2007 Author Posted January 27, 2007 thanks But i think u misunderstand I have a copy of the filestructure as it was on the server before i deleted it by accident also i have a copy SL of the database .. these 2 are no a backup as such as the admin section offers it its more 2 individual backups from the same system The oscommerce i install with an installer from my host its all there alli do is click a button now the ealie isntall and the backups are from the same host So nothinGREALLY HAS CHANGED .. HOPE THIS MAKES MORE SENSE
spax Posted January 27, 2007 Posted January 27, 2007 HOPE THIS MAKES MORE SENSE No, not really! :huh: 1, If you install a new store from your host, does that work ok? 2, Do you have a complete set of files saved from the store you deleted? 3, Do you have a copy of the database backup from the store you deleted?
contact303 Posted January 27, 2007 Author Posted January 27, 2007 No, not really! :huh: 1, If you install a new store from your host, does that work ok? yes RHEN I MOVE ALL THE BACKUP FILES (SAME DIRECTORY STRUCTURE ) TO THE SERVER OVERWRITING ALL FILESTHERE AND ADDING PICS) 2, Do you have a complete set of files saved from the store you deleted? yes 3, Do you have a copy of the database backup from the store you deleted? yes AND I IMPORT IT INTO THE NEW INSTALL BUT NO LUCK) THANKS SORRY FOR THE BD ENGLISH EXPLANATION
alex121 Posted January 27, 2007 Posted January 27, 2007 ok, from the error message code that you listed: 'Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'rudeboyi_osc1'@'localhost' (using password: YES) in /home/DELETED/public_html/shop/includes/functions/database.php on line 19 Unable to connect to database server!' this is the same problem that i had when i reset my store onto my test server. The way i got round this is to follow the installation instructions which you can read here: http://www.oscommerce.com/forums/index.php?showtopic=162231 i set up a new Db in phpmyadmin, or on your host setup page where you run the installation from, you have to add the Db name, the Db user name and password. If you can not remember them, the way i got round it was to look at my backup files in the catalog/admin/includes/configure.php. About line 40 you should see the following: // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', whateever your username is); define('DB_SERVER_PASSWORD', 'your password'); define('DB_DATABASE', 'your database name'); define('USE_PCONNECT', 'true'); define('STORE_SESSIONS', 'mysql'); ?> This will give you your necessary details to setup your basic database. Follow the install instructions, please note this is for a fresh install, but check that both the admin/includes/configure.php and the includes/configure.php are setup to connct to your Db. You may still get a few errors, but if you restore your Db through the admin page it should restore all you store settings. If you are looking at uploading your original files to the new installation, make sure that you DO NOT add the two configure.php files. Believe me i tried this and caused me no end of problems and hair pulling. Hope this helps
contact303 Posted January 27, 2007 Author Posted January 27, 2007 ?> This will give you your necessary details to setup your basic database. Follow the install instructions, please note this is for a fresh install, but check that both the admin/includes/configure.php and the includes/configure.php are setup to connct to your Db. THANSK FOR THAT i BELIEVETHIS IS EXCATLY WHAT IS WRONG(SEEQUOTE) THE COPIED FILESYSTEM (CONFIGURE.PHP) CANNOT CONNECT TO THE IMPORTED dB wHAT I DO ? i TRY YOUR STEPS ABOVE
ozcsys Posted January 27, 2007 Posted January 27, 2007 THANSK FOR THAT i BELIEVETHIS IS EXCATLY WHAT IS WRONG(SEEQUOTE) THE COPIED FILESYSTEM (CONFIGURE.PHP) CANNOT CONNECT TO THE IMPORTED dB wHAT I DO ? i TRY YOUR STEPS ABOVE You need to edit the two configure.php files matching the actual database info // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', whateever your username is); define('DB_SERVER_PASSWORD', 'your password'); define('DB_DATABASE', 'your database name'); define('USE_PCONNECT', 'true'); define('STORE_SESSIONS', 'mysql'); The three lines that are in bold are what you need to edit The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
contact303 Posted January 27, 2007 Author Posted January 27, 2007 You need to edit the two configure.php files matching the actual database info // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', whateever your username is); define('DB_SERVER_PASSWORD', 'your password'); define('DB_DATABASE', 'your database name'); define('USE_PCONNECT', 'true'); define('STORE_SESSIONS', 'mysql'); The three lines that are in bold are what you need to edit Thanks Guys .. it doing it right now ..fingers crossed what i do is I leave the 2 configure files as . meaning i delete them from the folder struture i upload (dont worry I have a zip of all ) and uplod the rest .. 5 mins i know
contact303 Posted January 27, 2007 Author Posted January 27, 2007 Thanks Guys ..it doing it right now ..fingers crossed what i do is I leave the 2 configure files as . meaning i delete them from the folder struture i upload (dont worry I have a zip of all ) and uplod the rest .. 5 mins i know Right !!!! Iam back ... THANKS TO YOU ALL !!!!! :D I have one issue still ?? Whatever i do to change configure.php filepermission it doesnt change ?? I change it in file browser online(host0 or with leechftp Whatever i do It changes back to 666?/ Any idea? Warning: I am able to write to the configuration file: /home/rudeboyi/public_html/shop/includes/configure.php. This is a potential security risk - please set the right user permissions on this file
contact303 Posted January 27, 2007 Author Posted January 27, 2007 Right guys thanks for the tips and advice i think iam back up and running :o) THANKS !!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.