Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot Connect to Database Please Help me!!


Guest

Recommended Posts

Posted

Hi,

 

Still having this message...

 

I?m trying to connect to the catalog or the administration panel but the following message shows up:

 

"Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in \\nas-001\winspace003\10-zimmerman.com.mx\www\tienda\includes\functions\database.php on line 19

Unable to connect to database server!"

 

I have renamed the database, changed usernames and passwords and nothing seems to work.

 

In the installation process the installer can connect to the database.

 

Thanks for your help

Posted
Hi,

 

Still having this message...

 

I?m trying to connect to the catalog or the administration panel but the following message shows up:

 

"Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in \\nas-001\winspace003\10-zimmerman.com.mx\www\tienda\includes\functions\database.php on line 19

Unable to connect to database server!"

 

I have renamed the database, changed usernames and passwords and nothing seems to work.

 

In the installation process the installer can connect to the database.

 

Thanks for your help

 

 

You need to open up your two configure.php files and check the database info, something is incorrect.

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??

Posted

Thank you, ozcsys

 

What should I look for in those configure files??

Posted

You should look to see if the install wrote any data into those files. I suspect it didn't - otherwise you'd see a message more like "Can't connect to MySQL server on 'localhost' @ 'yourdomain.com' (using password = Yes)"

 

Vger

Posted
Any other suggestions please?

 

Thankx

 

 

????

 

Did you learn anything when you looked at your configure.php files?

 

Was the database info written to them at all or is it just incorrect?

 

If you want more help you need to give feedback on what you have found out from the earlier suggestions.

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??

Posted

Would you please take a look at the files?

 

This is what I have in admin/includes/configure.php:

 

 

 

<?php

/*

$Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

// define our webserver variables

// FS = Filesystem (physical)

// WS = Webserver (virtual)

define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', '');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

define('DIR_WS_CATALOG', '/catalog/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

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 our database connection

define('DB_SERVER', '');

define('DB_SERVER_USERNAME', 'mysql');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', '');

?>

 

 

 

And this is includes/configure.php:

 

 

 

<?php

/*

$Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 

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', ''); // 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', '');

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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

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

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

 

// define our database connection

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

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

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

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

?>

Posted

It appears that none of the info from your install was written to your configure.php files. I would make sure that you have added write permissions to the two files and then try the install again.

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??

Posted

Ok, gave write permissions an re-install

This is what the last page of the installer throws:

 

osCommerce Configuration

 

 

Warning: fopen(/nas-001/winspace003/10-zimmerman.com.mx/www/cat/includes/configure.php) [function.fopen]: failed to open stream: Permission denied in \\nas-001\winspace003\10-zimmerman.com.mx\www\cat\install\templates\pages\install_7.php on line 209

 

Warning: fputs(): supplied argument is not a valid stream resource in \\nas-001\winspace003\10-zimmerman.com.mx\www\cat\install\templates\pages\install_7.php on line 210

 

Warning: fclose(): supplied argument is not a valid stream resource in \\nas-001\winspace003\10-zimmerman.com.mx\www\cat\install\templates\pages\install_7.php on line 211

 

Warning: fopen(/nas-001/winspace003/10-zimmerman.com.mx/www/cat/admin/includes/configure.php) [function.fopen]: failed to open stream: Permission denied in \\nas-001\winspace003\10-zimmerman.com.mx\www\cat\install\templates\pages\install_7.php on line 259

 

Warning: fputs(): supplied argument is not a valid stream resource in \\nas-001\winspace003\10-zimmerman.com.mx\www\cat\install\templates\pages\install_7.php on line 260

 

Warning: fclose(): supplied argument is not a valid stream resource in \\nas-001\winspace003\10-zimmerman.com.mx\www\cat\install\templates\pages\install_7.php on line 261

The configuration was successful!

 

Thanks for your patience

Archived

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

×
×
  • Create New...