Jump to content

Archived

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

Gil_e_n

A guide to the configure.php files

Recommended Posts

For others who read this the only way I could sort my problem was to use new Config files.

A lot of my dramas were complicated through use of a shared ssl - and cleared up when I used fresh config files for the dedicated ssl.

Also the file permission settings (read / write etc when you upload the files with filezilla or similar) are vital.

 

Cheers

Share this post


Link to post
Share on other sites

I keep getting this error

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Mystoresname'@'host194.hostmonster.com' (using password: YES) in /home/mystoresname/public_html/store/includes/functions/database.php on line 19
Unable to connect to database server!

 

I am having trouble with this part : define('DIR_FS_CATALOG', '/home10/sub001/sc15761-LGKR/www/store/');

 

Please help..

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
I keep getting this error
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Mystoresname'@'host194.hostmonster.com' (using password: YES) in /home/mystoresname/public_html/store/includes/functions/database.php on line 19
Unable to connect to database server!

 

I am having trouble with this part : define('DIR_FS_CATALOG', '/home10/sub001/sc15761-LGKR/www/store/');

 

Please help..

That message usually means the database cannot be connected to so i would make sure the username, password and database name match those of the database.

 

Jack

Share this post


Link to post
Share on other sites

Everything works great by following the help found in this thread EXCEPT...

 

When I log into the admin page and use the file manager, I can only access the files found in the admin directory. I must have a wrong path in my admin/includes/configure.php. Can anyone find it?

 

<?php
 define('HTTP_SERVER', 'http://www.smokin-n-style.com');
 define('HTTP_CATALOG_SERVER', 'http://www.smokin-n-style.com/catalog/');
 define('HTTPS_CATALOG_SERVER', 'https://tilton4.startlogic.com');
 define('ENABLE_SSL_CATALOG', 'true');
 define('DIR_FS_DOCUMENT_ROOT', '/home/users/web/b2995/sl.tilton4/public_html/smokin/catalog/admin/');
 define('DIR_WS_ADMIN', '/catalog/admin/');
 define('DIR_FS_ADMIN', '/home/users/web/b2995/sl.tilton4/public_html/smokin/catalog/admin/');
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', '/home/users/web/b2995/sl.tilton4/public_html/smokin/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/');

Share this post


Link to post
Share on other sites

hei stephie....i have same problem with you...

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'goocek'@'localhost' (using password: YES) in /home/gooce05/public_html/includes/functions/database.php on line 19

Unable to connect to database server!

 

 

any body can solve my problem...help...help...help...SOS..SOS

Share this post


Link to post
Share on other sites
I keep getting this error
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Mystoresname'@'host194.hostmonster.com' (using password: YES) in /home/mystoresname/public_html/store/includes/functions/database.php on line 19
Unable to connect to database server!

 

I am having trouble with this part : define('DIR_FS_CATALOG', '/home10/sub001/sc15761-LGKR/www/store/');

 

Please help..

 

 

hei stephie...i have problem like u....

 

with all my energy i'll try to break...

 

here's the answer.... :thumbsup: :thumbsup:

 

go to ur cpanel->mysql->klik add user to database...than, in below of the current databases yu'll find this code.

 

-------------------------------------------------

users in xxxx

yyyyyy (Privileges: ALL PRIVILEGES)

 

Connection Strings

Perl $dbh = DBI->connect("DBI:mysql:xxxx:localhost","yyyy","<PASSWORD HERE>");

PHP $dbh=mysql_connect ("localhost", "yyyy", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());

mysql_select_db ("xxxxx");

 

 

xxxxx mean yourdatabse

yyyyy mean user

 

that's what i do...okey warmest regard :thumbsup: :thumbsup: :blush: :blush:

-----------------------------------

Share this post


Link to post
Share on other sites

Hello everyone,

 

I am new here and I have been using these forum topics successfully to help me debug the configuration files. The shop seems to be working fine. However, i still have a couple issues.

 

1. I am still unable to log into my admin section

 

2a. When i click on the "online catalog" link from the admin login page, i am being sent to a parent directory page - http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/

2b. When i click on the "top" link on the catalog page, i am being sent to a parent directory page - http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/

 

I have copied my admin configuration file below. Any help would be appreciated.

 

/*

$Id: configure.php 1739 2007-12-20 00:52:16Z hpdl $

 

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', 'http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/');

define('HTTPS_CATALOG_SERVER', 'http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/');

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

define('DIR_FS_DOCUMENT_ROOT', 'osCommerce/oscommerce-2.2rc2a/'); // 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', 'osCommerce/oscommerce-2.2rc2a/catalog/admin/');

define('DIR_WS_CATALOG', 'osCommerce/oscommerce-2.2rc2a/');

define('DIR_FS_CATALOG', 'osCommerce/oscommerce-2.2rc2a/');

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

define('DB_SERVER_USERNAME', 'xxxxxxxxx');

define('DB_SERVER_PASSWORD', 'xxxxxxxxxxx');

define('DB_DATABASE', 'xxxx');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'yes');

?>

Share this post


Link to post
Share on other sites

I've been having issues with my SSL for a while now. GoDaddy is my host and they have been no help. They tell me I need to contact OSC. Can anyone help?

 

Here's my config file:

 

<?php
 define('HTTP_SERVER', 'http://www.games4gamersonline.com');
 define('HTTPS_SERVER', 'https://www.games4gamersonline.com');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'http://www.games4gamersonline.com');
 define('HTTPS_COOKIE_DOMAIN', 'https://www.games4gamersonline.com');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '/catalog/');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/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', '/home/content/g/a/m/games4gamers/html/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
 define('DIR_WS_BACKUP','/home/content/g/a/m/games4gamers/html/catalog/admin/backups/');

 define('DB_SERVER', 'p41mysql103.secureserver.net');
 define('DB_SERVER_USERNAME', '************');
 define('DB_SERVER_PASSWORD', '*******');
 define('DB_DATABASE', '************');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

The main problem I'm having is when I try to use the customer login (to test) it just hangs/times out.

Share this post


Link to post
Share on other sites

It may not fix your problem but these lines

  define('HTTP_COOKIE_DOMAIN', 'http://www.games4gamersonline.com');  define('HTTPS_COOKIE_DOMAIN', 'https://www.games4gamersonline.com');

should be

  define('HTTP_COOKIE_DOMAIN', '.www.games4gamersonline.com');  define('HTTPS_COOKIE_DOMAIN', '.www.games4gamersonline.com');

 

Jack

Share this post


Link to post
Share on other sites

Thanks Jack...still no dice though. I was trying various configurations. The cert is issued to: www.games4gamersonline.com and it should work. I called my host and they said it works on their end and even on their external line too.

Share this post


Link to post
Share on other sites

do what jack said, and also this:

 

define('DIR_FS_CATALOG', '/home/content/g/a/m/games4gamers/html/catalog/');

 

to

 

define('DIR_FS_CATALOG', '/home/content/g/a/m/games4gamers/html/catalog');


John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

I'm having trouble getting my site to work, but I can't even figure out if this is where I put the message. The problem is in the configuration file, but I've tried everything there is to try, every possible combination imaginable.

 

For now, just let me know if I am even posting in the right way.

 

Thanks

Share this post


Link to post
Share on other sites

Can anybody graze over the differences between moving from something like

 

domainone.com/catalog

 

to

 

domaintwo.com/~test/catalog

 

???

 

This is driving me nuts. I can never figure out where the /~test/ should and shouldn't be...

Share this post


Link to post
Share on other sites

Regarding details of the Configure.php files:

 

My situation is:

When I upload Product/Category images they go to: 'domain.com/admin/images' folder.(not to 'domain.com/images')

 

Because of this, images don't display(in Admin), only a box outline, when you right click on & view properties of the box they indicate the path: 'domain.com/images/image.gif'. They don't display on shop pages either, no place-holder.

 

So, I have been uploading images via my webserver file manager to get them in the correct folder.

 

I'm hoping you know, which line of which configure.php file controls the image upload destination(and possibly which line of which configure.php file controls the image Admin and Shop display image path).

 

Thanks for any assistance anyone can offer.

Share this post


Link to post
Share on other sites

I am attempting to move an existing OsCommerce site to another domain to use as a template. The new domain is Using Miva Merchant. I have copied the tables and imported them to the new database created on the new domain. Have made changes to the includes/configure.php and admin/includes/configure.php. I am able to bring the new site up by tying in the new domain by typing www.mysite.com/index.php. Admin side seems to be functioning fine. On the client side though I am thrown out when I click on a category. Any link that goes to an actual php file works well. Below is an example of a url that is executed when a category is clicked on. I would like some guidance in tracking down the problem. Thanks!

 

http://www.mysite.com/cooking-gear-c-8.html

Share this post


Link to post
Share on other sites
  define('HTTPS_SERVER', 'https://secure.widgetsofdoom.com'); // eg, https://localhost - should not be empty for productive servers

This is for the part of your site that is secured. If you don't have an SSL certificate, it's the same as the url above. If you do, it must be the exact same address that is on the certificate. I repeat, the. Exact. Same.

 

 

Where do I look to determine the exact address that was assigned to my ssl? installed on my hosting server I have ssl.conf, and inside that folder are 3 files called ca.crt, server.crt, and server. key. Where do I look to see the SSL address?

Share this post


Link to post
Share on other sites

It's not in there in "man readable" form.

 

If you have it already installed on your site, just try what you think it is.

 

If you use IE7, and you have it wrong, first you'll see the:

 

There is a problem with this website's security certificate.

 

 

The security certificate presented by this website was issued for a different website's address.

 

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.

We recommend that you close this webpage and do not continue to this website.

Click here to close this webpage.

Continue to this website (not recommended).

More information

 

 

If you arrived at this page by clicking a link, check the website address in the address bar to be sure that it is the address you were expecting.

When going to a website with an address such as https://example.com, try adding the 'www' to the address, https://www.example.com.

If you choose to ignore this error and continue, do not enter private information into the website.

 

For more information, see "Certificate Errors" in Internet Explorer Help.

Click the "Continue to this website (not recommended)." link.

 

Then you'll see a "Certificate Error" box to the right of the address box.

 

Click it, then click "View certificates" and it will tell you who it was issued to.

 

Or you could contact whomever you purchased it from and ask them.


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites

I moved my store out of its default folder into the root directory. Still I kept the former store in the folder until I work out the buts. So Here is the bug:

 

First, I updated the 2 config problems and encountered a sudden new problem when I press the add to cart button. When you click on the button, it is supposed to redirect you to the shopping_cart.php page, but instead is just displays a blank page. The redirect seems to be unsucessful. My other store doesn't have this issue. Not sure what would cause it. Interestingly on the Newly Moved store, the shopping cart does update, it just doesn't redirect you to it when you add an item to it.

 

Any help would be much appreciated, I am so close to finishing my store and want to wrap up and sell stuff!!!!

Share this post


Link to post
Share on other sites

I read your post about this.

 

Then I looked at all your other posts to find your URL so I might take a peek.

 

I didn't see it.

 

I don't know how you expect anyone to help if they can't experience first hand what's happening?

:huh:


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites
I read your post about this.

 

Then I looked at all your other posts to find your URL so I might take a peek.

 

I didn't see it.

 

I don't know how you expect anyone to help if they can't experience first hand what's happening?

:huh:

 

 

Understandable. I re-uploaded all my files throughout last night and that seemed to remedy the problem. Thank you.

Share this post


Link to post
Share on other sites

I have a little bit of a unique issue..

 

The root of the site currently contains a working index.htm file

 

The site currently contains a working /catalog oscommerce installation

 

I have installed a second instance of osc (actually oscMax) fully configured it and tonight I have copied all the old customers, orders and set the whole thing up.. I have a little more work to do to the new install, then next week I want to move the new install to the root directory.

 

For testing purposes, I was thinking I would find all instances of index.php in the NEW install, change the references to index2.php, upload. I coud then test the new install in it's new home without munging up what is currently working.

 

Will this work the way I think it will???


Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

So, Im doing a full migration of a server from one machine to another (full replacement, IP address and everything), and Ive gotten everything working, except for one little weird OS Commerce problem...

 

For the sake of simplicity, Ive put all website directories in the same place as the old server, along with all the mysql databases. Initially everything looked great, but when I went to try to use the main OS Commerce site, clicking on the different categories wont change to them.

 

I figure its not a configuration problem, as the files are located where they were originally, and Ive verified the rights are correct on the various files, and even verified all the mysql database files were moved over (at least by size and number, using du). So, Im guessing its something in one of the mysql database files? But I have no idea what...

Share this post


Link to post
Share on other sites

×