paulieGB Posted October 11, 2008 Posted October 11, 2008 Hello, I have just installed a new template and put a new catalog folder over my existing one. I know i will have to start from scratch again with products and contribs but thats fine.. Now im getting a warning on my site and cant acces it = Warning: mysql_connect(): Unknown MySQL Server Host 'mysqlfoxycardscouk' (11004) in d:\users\foxycardsuk\public_html\includes\functions\database.php on line 19 Unable to connect to database server! This is the warning i am getting now, i have typed in my DB_server and my username and my password in database.php, and i am getting this warning. I have contacted my host and they gave me my server username and password details , but i still get warning messages. I also asked them for a site restore but they cant do that untill monday and on monday they wont be able to do it because the system will have a back up for my site from 12.00 tonight. Need some help please. Paulie. This is my site = http://www.foxycards.co.uk
www.in.no Posted October 11, 2008 Posted October 11, 2008 The error tells you that you have not set the mysql parameter correctly. I dont belive "mysqlfoxycardscouk" is the hostname for your mysql db. It should be eigther "localhost", "private IP" or a normal "(sub)domain name" Check your includes/configure.php in both catalog and admin part that the mysql parameter is correct.
paulieGB Posted October 11, 2008 Author Posted October 11, 2008 Hello, i just changed the $server = DB_SERVER , to localhost now im getting these warnings = Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in d:\users\foxycardsuk\public_html\includes\functions\database.php on line 19 Unable to connect to database server! Im unsure what to you mean bt "Check your includes/configure.php in both catalog and admin part that the mysql parameter is correct." here is my configure.php / catalog = <?php define('HTTP_SERVER', 'http://78.96.162.254'); define('HTTPS_SERVER', 'http://78.96.162.254'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', '78.96.162.254'); define('HTTPS_COOKIE_DOMAIN', '78.96.162.254'); define('HTTP_COOKIE_PATH', '/newt/'); define('HTTPS_COOKIE_PATH', '/newt/'); define('DIR_WS_HTTP_CATALOG', '/newt/'); define('DIR_WS_HTTPS_CATALOG', '/newt/'); 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:/xampp/htdocs/newt/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'test1'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> And here is my configure.php , admin = <?php define('HTTP_SERVER', 'http://localhost'); define('HTTP_CATALOG_SERVER', 'http://localhost'); define('HTTPS_CATALOG_SERVER', 'http://localhost'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', 'C:/xampp/htdocs/newt/'); define('DIR_WS_ADMIN', '/newt/admin/'); define('DIR_FS_ADMIN', 'C:/xampp/htdocs/newt/admin/'); define('DIR_WS_CATALOG', '/newt/'); define('DIR_FS_CATALOG', 'C:/xampp/htdocs/newt/'); 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', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'test1'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> Paul.
♥Vger Posted October 11, 2008 Posted October 11, 2008 XAMPP is only to be used for offline (Intranet) web servers and not Online (Internet) web servers. It says that quite clearly on the XAMPP website. So your http addresses for an offline install would be: define('HTTP_SERVER', 'http://localhost'); and would not be: define('HTTP_SERVER', 'http://78.96.162.254'); You would not make any edits to the database.php file. Vger
paulieGB Posted October 11, 2008 Author Posted October 11, 2008 ok i have changed - define('HTTP_SERVER', 'http://78.96.162.254'); to - define('HTTP_SERVER', 'http://localhost'); in catalog/includes/configue.php and am now getting this warning = Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in d:\users\foxycardsuk\public_html\includes\functions\database.php on line 19 Unable to connect to database server! i also changed back the database.php file with NO edits. Paul
Recommended Posts
Archived
This topic is now archived and is closed to further replies.