Page 1 of 1

i cannot acess my shop in another computer

Posted: Fri Oct 01, 2010 3:04 am
by pius4real
i transfer the the script to another computer to view the my shop on xampp localhost all the images and the links appeared but if i want to buy once i click on the links i got this message :
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'opencart'@'localhost' (using password: YES) in C:\xampp\htdocs\system\database\mysql.php on line 6
Error: Could not make a database connection using opencart@localhost
Warning: mysql_close() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\system\database\mysql.php on line 66
please i need help as soon as possible.

Re: i cannot acess my shop in another computer

Posted: Fri Oct 01, 2010 3:34 am
by pius4real
i transfer the the script to another computer to view the my shop on xampp localhost all the images and the links appeared but if i want to buy once i click on the links i got this message :
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'opencart'@'localhost' (using password: YES) in C:\xampp\htdocs\system\database\mysql.php on line 6
Error: Could not make a database connection using opencart@localhost
Warning: mysql_close() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\system\database\mysql.php on line 66
please i need help as soon as possible.

Re: i cannot acess my shop in another computer

Posted: Sun Oct 03, 2010 7:39 am
by Daniel
you need to uypdate your config file if you have moved your site.

you can not type localhost if the site is not on the computer you are using.

Re: i cannot acess my shop in another computer

Posted: Sun Oct 17, 2010 11:42 am
by pius4real
i have try to update the config file its say the name (pharmacy folder cannot be found , let me paste the config file here so u can write how it surpose to look like when am moving it to another computer, becos am still new in programming.the folder name is (pharmacy ) this is the config file below :

<?php
// DIR
define('DIR_APPLICATION', 'C:\xampp\htdocs/catalog/');
define('DIR_SYSTEM', 'C:\xampp\htdocs/system/');
define('DIR_DATABASE', 'C:\xampp\htdocs/system/database/');
define('DIR_LANGUAGE', 'C:\xampp\htdocs/catalog/language/');
define('DIR_TEMPLATE', 'C:\xampp\htdocs/catalog/view/theme/');
define('DIR_CONFIG', 'C:\xampp\htdocs/system/config/');
define('DIR_IMAGE', 'C:\xampp\htdocs/image/');
define('DIR_CACHE', 'C:\xampp\htdocs/system/cache/');
define('DIR_DOWNLOAD', 'C:\xampp\htdocs/download/');
define('DIR_LOGS', 'C:\xampp\htdocs/system/logs/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'opencart');
define('DB_PASSWORD', '****');
define('DB_DATABASE', '****');
define('DB_PREFIX', '');
?>

Admin config file below :
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/admin/');
define('HTTP_CATALOG', 'http://localhost/');
define('HTTP_IMAGE', 'http://localhost/image/');

// HTTPS
define('HTTPS_SERVER', 'http://localhost/admin/');
define('HTTPS_IMAGE', 'http://localhost/image/');

// DIR
define('DIR_APPLICATION', 'C:\xampp\htdocs/admin/');
define('DIR_SYSTEM', 'C:\xampp\htdocs/system/');
define('DIR_DATABASE', 'C:\xampp\htdocs/system/database/');
define('DIR_LANGUAGE', 'C:\xampp\htdocs/admin/language/');
define('DIR_TEMPLATE', 'C:\xampp\htdocs/admin/view/template/');
define('DIR_CONFIG', 'C:\xampp\htdocs/system/config/');
define('DIR_IMAGE', 'C:\xampp\htdocs/image/');
define('DIR_CACHE', 'C:\xampp\htdocs/system/cache/');
define('DIR_DOWNLOAD', 'C:\xampp\htdocs/download/');
define('DIR_LOGS', 'C:\xampp\htdocs/system/logs/');
define('DIR_CATALOG', 'C:\xampp\htdocs/catalog/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'opencart');
define('DB_PASSWORD', '***');
define('DB_DATABASE', '***');
define('DB_PREFIX', '');
?>

Re: i cannot acess my shop in another computer

Posted: Tue Feb 08, 2011 9:29 pm
by ub13
I'm guessing this thread has been solved, but for completeness, there are 2 config.php files, one in the www-root/config.php and one under www-root/admin/config.php

Both should contain a valid username and password for the database.

Re: i cannot acess my shop in another computer

Posted: Thu Dec 31, 2015 1:12 pm
by gejenk
dear all,
in this error case "opencart access denied for user @'localhost' (using password yes)" even we have entered others users with password included but still generate error

plis try my own try ..:D

fill the username full means hosting name included as shown in phpMyadmin user name, so the syntax will be like:
1. hostname_username
2. hostname_database

hope this "try" is useful to all

tks