Forums / General Questions / Cannot get the site to connect to database

Cannot get the site to connect to database

Locked

Views: 2,691

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
8 Aug 2007, 2:42 AM
#2
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

Anyone? Anyone? Bueller?

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

8 Aug 2007, 3:01 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Cannot get the site to connect to database

Check and make sure that you have the database name, username and password correct in your files:
/includes/configure.php

Compare this to the file:
/admin/includes/configure.php

It appears that the Admin may work and the installer but not your Catalog ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Aug 2007, 3:47 AM
#4
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

Yeah they match up, my problem is that I need this database, I word if their is a work around.

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

8 Aug 2007, 3:52 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Cannot get the site to connect to database

Can you get into your Admin?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Aug 2007, 3:57 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot get the site to connect to database

ctcentralinfo:

Yeah they match upPlease post the contents of both files, removing ONLY the passwords.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Aug 2007, 3:59 AM
#7
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

admin_includes_configure.php

// Define the webserver and path parameters
// Main webserver: eg, http://localhost - should not be empty for productive servers
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
// HTTP_CATALOG_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_CATALOG_SERVER is your Secure webserver: eg, https://www.yourdomain.com
/*

  • URLs for your site will be built via:
  • HTTP_SERVER plus DIR_WS_ADMIN or
    
  • HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or 
    
  • HTTP_SERVER plus DIR_WS_CATALOG or 
    
  • HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
    
  • ...depending on your system configuration settings
    */
    define('HTTP_SERVER', 'http://www.books-japan-online.com');
    define('HTTPS_SERVER', 'https://www.books-japan-online.com');
    define('HTTP_CATALOG_SERVER', 'http://www.books-japan-online.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.books-japan-online.com');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/admin/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
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', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_ADMIN', '/home/wwwcool/public_html/books/admin/');
define('DIR_FS_CATALOG', '/home/wwwcool/public_html/books/');

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_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'wwwcool_flonase');
define('DB_SERVER_PASSWORD', '');
define('DB_DATABASE', 'wwwcool_zencart');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/wwwcool/public_html/books/cache');

?>

includes_configure.php

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
define('HTTP_SERVER', 'http://www.books-japan-online.com');
define('HTTPS_SERVER', 'https://www.books-japan-online.com');

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
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', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

define('DIR_WS_PHPBB', '/home/wwwcool/public_html/books/forum/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/wwwcool/public_html/books/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'wwwcool_flonase');
define('DB_SERVER_PASSWORD', '');
define('DB_DATABASE', 'wwwcool_zencart');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/wwwcool/public_html/books/cache');

?>

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

9 Aug 2007, 7:28 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot get the site to connect to database

Looks like you also have a problem with your phpBB setup:
http://www.books-japan-online.com/forum/

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Aug 2007, 7:31 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot get the site to connect to database

Please make your /public_html/books/includes/configure.php file "writable" (777).
Then re-upload the file
Then test.

Is your "books-japan-online.com" domain somehow pointed specifically as a subdomain to the /books folder?
Is there another URL by which one can access the "books" folder on your site?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Aug 2007, 10:32 AM
#10
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

DrByte:

Please make your /public_html/books/includes/configure.php file "writable" (777).
Then re-upload the file
Then test.

Is your "books-japan-online.com" domain somehow pointed specifically as a subdomain to the /books folder?
Is there another URL by which one can access the "books" folder on your site?

You can only access books japan online through /books.

When I created a new database all together the shopping cart worked without a hitch.

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

9 Aug 2007, 2:27 PM
#11
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

I think it might be an issue with the database.

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

9 Aug 2007, 2:41 PM
#12
baltzar avatar

baltzar

New Zenner

Join Date:
Jul 2007
Posts:
25
Plugin Contributions:
0

Re: Cannot get the site to connect to database

ctcentralinfo:

I think it might be an issue with the database.

I had something similar after moving from local server to a remote one.

Check out your phpbb install, and all configuration regarding it on zen configure and in SQL.

12 Aug 2007, 8:52 PM
#13
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

So is their anyway I can fix the database for the catalog section of my website without losing my data?

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

12 Aug 2007, 9:20 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot get the site to connect to database

Somehow I suspect your catalog section is not using the configure.php information that you posted.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Aug 2007, 2:52 AM
#15
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

DrByte:

Somehow I suspect your catalog section is not using the configure.php information that you posted.

Yeah because if I install it by scratch it works perfectly. Is their something I can remove or add to get the database working?

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

14 Aug 2007, 3:03 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot get the site to connect to database

ctcentralinfo:

Yeah because if I install it by scratch it works perfectly. Is their something I can remove or add to get the database working?

Perhaps a line-by-line comparison between the working and non-working versions of your configure.php files.

Also remember: If your configure.php file on your server is read-only, then any updates you attempt to upload will fail, making things stop working.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Aug 2007, 4:57 PM
#17
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

DrByte:

Perhaps a line-by-line comparison between the working and non-working versions of your configure.php files.

Also remember: If your configure.php file on your server is read-only, then any updates you attempt to upload will fail, making things stop working.

It's a problem with the database. I realized this when I created a new database using a fresh install. I am really pissed, but at this point unless someone has a solution, their is nothing I can do about it.

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com

15 Aug 2007, 10:36 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot get the site to connect to database

Perhaps doing a table-by-table merge will help you ?

I still think it's bad configure.php information, perhaps pointing to invalid table prefixes or something.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Aug 2007, 5:48 PM
#19
ctcentralinfo avatar

ctcentralinfo

Totally Zenned

Join Date:
Apr 2005
Posts:
853
Plugin Contributions:
0

Re: Cannot get the site to connect to database

I have everything working sort of, I remember having issues with the database when I uploaded a mod from way back so what I did was removed the configure table and replaced with a new one to test it out. and it seemed to do the trick. I still
have a gap in the banner and the category for some reason showing up twice in the header. I will have to upload the rest of the configure files and just be careful not to upload the mod again.

Rich People scream, Wealthy people whisper

https://www.cooltechcentral.com