Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error on index.php


Guest

Recommended Posts

When I load up mydomain.co.uk I get:

 

Warning: mysql_connect(): Access denied for user 'smatpackaging'@'213.171.218.181' (using password: YES) in /home/fhlinux181/s/smartservicesuk.co.uk/user/htdocs/includes/functions/database.php on line 19

Unable to connect to database server!

 

I have a wrong user name and passowrd for the data base somewhere. Does any one know which files this info is in to change?

 

database.php on line 19

 

16. if (USE_PCONNECT == 'true') {

17. $$link = mysql_pconnect($server, $username, $password);

18. } else {

19. $$link = mysql_connect($server, $username, $password);

20. }

 

So close now to go LIVE!

 

Can anyone help so I can go LIVE this evening.

 

Cheers Richard Smart

Link to comment
Share on other sites

Thanks for the quick reply:

 

All looks ok in the includes/configure.php

 

 

If you have time can anyone see if there is an error?

 

Free Jiffy bags for anyone in the UK that can figure this one out. Promise!

 

 

includes/configure.php

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://*************.co.uk'); // 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', '************.co.uk');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_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', '/nas17ent/domains/s/************.co.uk/user/htdocs/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', '213.171.218.***'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '********');

define('DB_SERVER_PASSWORD', '***********');

define('DB_DATABASE', '****');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

Link to comment
Share on other sites

Are these the actual values?

 

// define our database connection

define('DB_SERVER', '213.171.218.***'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '********');

define('DB_SERVER_PASSWORD', '***********');

define('DB_DATABASE', '****');

Link to comment
Share on other sites

Are these the actual values?

 

// define our database connection

define('DB_SERVER', '213.171.218.***'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '********');

define('DB_SERVER_PASSWORD', '***********');

define('DB_DATABASE', '****');

 

 

I have just blanked them out osccoder for the forum.

 

Richard

Link to comment
Share on other sites

try adding a new user and password to that database then change your config files accordingly includes/configure.php & admin/includes/configure.php

 

 

Steve I did as you suggested and the error has gone but has now been replaced with:

 

1142 - DELETE command denied to user 'Smarty'@'213.171.218.181' for table 'whos_online'

 

delete from whos_online where time_last_click < '1159909040'

 

[TEP STOP]

 

1142 - INSERT command denied to user 'Smarty'@'213.171.218.181' for table 'sessions'

 

insert into sessions values ('1c7e2688ba3fbceb1876cc98288e0b2f', '1159911380', 'cart|O:12:\"shoppingcart\":4:{s:8:\"contents\";a:0:{}s:5:\"total\";i:0;s:6:\"weight\";i:0;s:12:\"content_type\";b:0;}language|s:7:\"english\";languages_id|s:1:\"1\";currency|s:3:\"GBP\";navigation|O:17:\"navigationhistory\":2:{s:4:\"path\";a:1:{i:0;a:4:{s:4:\"page\";s:9:\"index.php\";s:4:\"mode\";s:6:\"NONSSL\";s:3:\"get\";a:0:{}s:4:\"post\";a:0:{}}}s:8:\"snapshot\";a:0:{}}')

 

[TEP STOP]

Link to comment
Share on other sites

Make sure you have DBA and not just READ or WRITE priviledges on the database.

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Link to comment
Share on other sites

Ok open up includes/configure

 

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '********');

define('DB_SERVER_PASSWORD', '***********');

define('DB_DATABASE', '****');

 

Replace above with the corrasponding part in the file and put in the correct user/pass for database.

 

Then tell me if it works.

I didnt have any freakin links in my sig!!! Pm me for help any other things ;-) There!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...