darp Posted January 14, 2016 Posted January 14, 2016 I'm setting up my store in my userdir public_html on my computer, so I can safely make some changes before I upload to the active server. I have never done this before, but I think I have it right because the front of the store loads nicely with no errors. However, I can not get the back end ( admin ) to load. I always get a "can not connect" or "err_connection_refused" message, depending on the browser. Why would the Apache2 localhost server refuse to connect the back end? The URL looks good. http://localhost/~myusername/htdocs/catalog/admin/login.php?osCAdminID=xxxxxxxxxxxxxxxxxxxxxx And the logon script in catalog/admin/includes/configure.php is the exact same as the front end. In fact it is a cut and paste, just in case I was being blind to something. You can see it at the bottom of the following admin configuration file. I'm a little uncertain about the overall configuration. Does anybody see anything that should be changed? define('HTTP_SERVER', 'http://localhost/~myusername/htdocs'); define('HTTPS_SERVER', 'https://localhost/~myusername/htdocs'); define('ENABLE_SSL', 'false'); define('HTTP_COOKIE_DOMAIN', 'http://localhost/~myusername/htdocs'); define('HTTPS_COOKIE_DOMAIN', 'https://localhost/~myusername/htdocs'); define('HTTP_COOKIE_PATH', '/catalog/admin/'); define('HTTPS_COOKIE_PATH', '/catalog/admin/'); define('HTTP_CATALOG_SERVER', 'http://localhost/~myusername/htdocs'); define('HTTPS_CATALOG_SERVER', 'https://localhost/~myusername/htdocs'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/home/myusername/public_html/'); define('DIR_WS_ADMIN', '/catalog/admin/'); define('DIR_WS_HTTPS_ADMIN', '/catalog/admin/'); define('DIR_FS_ADMIN', '/home/myusername/public_html/htdocs/catalog/admin'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/home/myusername/public_html/htdocs/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('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'foo'); define('DB_SERVER_PASSWORD', 'bar'); define('DB_DATABASE', 'oscommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'America/Toronto'); Or is this something going on that requires some server reconfiguration?
Jack_mcs Posted January 14, 2016 Posted January 14, 2016 And the logon script in catalog/admin/includes/configure.php is the exact same as the front end. In fact it is a cut and paste, That's the problem. The two files have the same name but not the same content. You need to get a blank one from the package you used and set it up. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
darp Posted January 14, 2016 Author Posted January 14, 2016 I did't cut and paste the whole file. I was just referring to the logon portion as being a cut and paste. define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'foo'); define('DB_SERVER_PASSWORD', 'bar'); define('DB_DATABASE', 'oscommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'America/Toronto');
MrPhil Posted January 14, 2016 Posted January 14, 2016 If you already have a real commercial webserver and domain, I would recommend installing the test version of osC into a private directory, and configure it there. It will be a relatively minor reconfiguration when you move to a public-facing directory. I see people struggling to get it running on a PC (*AMPP stack), and then they have just as much work to reconfigure it after they've uploaded it to the real server. I don't think it's worth it. Of course, if you do not yet have a real server to work with, it's a moot point -- you have to use a *AMPP PC installation. By the way, I also recommend always installing into a subdirectory (e.g., /shop) rather than the site root (/). If the shop is the only thing on the site, do a URL rewrite from / to /shop until such time that you have multiple applications and a root landing page with links to the applications. This allows you to install other applications into their own subdirectories and nobody will step on anybody else.
darp Posted January 14, 2016 Author Posted January 14, 2016 Thanks MrPhil. I do have a real commercial webserver and domain. I didn't know you could do that. I will look into it. I do have a lot to update, not only in oscommerce, but I have a gallery and forum on the website, all of which have been badly neglected over the last year, due to the fact I could rarely get near a computer. If it is not too much trouble, could you point me to instructions on how to go about this?
MrPhil Posted January 15, 2016 Posted January 15, 2016 If it is not too much trouble, could you point me to instructions on how to go about this? Could you be more specific about which thing(s) you need some guidance on? Is it how to install into a test (private) directory, how to set up multiple applications on one site (multiple subdirectories), or something else?
darp Posted January 15, 2016 Author Posted January 15, 2016 Sorry. I meant set up a private directory. As I said, I already have multiple applications running on my site. As they all need work, and have all been interrogated and heavily modified, it would be nice if I could set them all up, as is and in tact, in a private directory. My guess is that I would create a password protected alternative home directory and database on the commercial server, clone it all and work from there. I am still curious why the admin side of the store does not work in my userdir public_html directory. The front of the store works fine there. It is a LAMP system. It is usually a breeze to get the site running in the root server directory, but I thought I would try something new, so I don't have to fool around with the files as root.
MrPhil Posted January 15, 2016 Posted January 15, 2016 My guess is that I would create a password protected alternative home directory and database on the commercial server, clone it all and work from there. That should work. If you don't have any links to this private directory, so that search engines won't stumble across it and index it, you might even get away with not password protecting the whole thing (just the admin side).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.