Guest Posted September 21, 2002 Share Posted September 21, 2002 :( Hi All! I'm a relative newbie to PHP and MySQL, but otheriwse, have 23 years of systems experience, some even on *nix (not a *whole* lot there). I'm running on Win2K, with Apache 2, PHP 4.2.2, MySQL 3.23.49-nt. I've downloaded tep_snapshot-20020920.zip and am attempting to install and configure it. Well, I'm perhaps getting ahead of myself there. I'm still trying to install it. So, a couple of questions to get things started: 1- Given my setup, why is $DOCUMENT_ROOT blank? 2- I sometimes run through scripts that set the language (for instance), but set it wrong, so they're looking for languages/.php. Then I can't go back because the value is a session global. So, how do I reset my session? 3- There are many instances of paths set with forward slashes, the Unix separator. How does PHP handle that when it's running on Windows? These are pretty general questions. I'll probably have more specific ones as I get further into it. Thanks for your help! - Alfred Link to comment Share on other sites More sharing options...
Guest Posted September 21, 2002 Share Posted September 21, 2002 :( 1- Given my setup, why is $DOCUMENT_ROOT blank? Got the answer to my first question. The infamous register_globals is off. Apparently, off is better from a security perspective, but osc requires it to be on "for now". Eventually osc will be made to work with it off. Is that right? Thanks, Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2002 Share Posted September 22, 2002 All right, so here are some observations I've made along the way, which may help others getting started... I had tried the PR 2.1 version, but that didn't fly for me, so I went with the PR 2.2, and that turned out to be brilliant. (The 2.2 I mean, not my decision...) :wink: There was one thing I learned from 2.1, though: you definitely need to set your register_globals setting to On in php.ini. I found my php.ini file in my Windows directory. If you're not sure where your's is, run phpinfo(); it's in the top block. According to includes/application_top.php, the requirement for register_globals to be on will go away by the time 2.2 is finalized. Good thing, too, because apparently, leaving register_globals on is a security risk. Step 1 First thing to do, of course, is unzip the package. I did this in a temporary directory. Step 2 I then moved the required portions to my web servers public tree. In my case, using Apache, it was htdocs. This is what it now looks like: C:Program FilesApache GroupApache2htdocscatalogadmin Contrary to what I had read somewhere in this forum, I went with a straightforward directory structure. Others had recommended htdocscatalogcatalog and htdocsadminadmin. I didn't see the advantage in that; and the install "recommended" the structure I went with. Step 3 So, the install is next. Apparently this was missing in PR 2.1. From your browser, enter URL: http://localhost/catalog/install/index.php Then just follow the instructions and fill in the forms. I did notice a small issue. When I entered my paths, with ugly Windows backslashes, the scripts would double them, then double them again. It started looking really ugly, though the scripts seemed to be working just fine with them. When it got out of hand, I editted them out, and things proceeded swimmingly. Step 4 The install then shows you to your newly installed osCommerce site! There were two issues that osCommerce warned me about with pink backgrounds at the top of the page: - The configure.php file needed to be made read-only. - The install directory needed to be removed. I did both those things and the pink lines went away. Wow! Step 5 After having run around the demo shop for a bit, it was time to have a look at the administration page. Use URL: http://localhost/catalog/admin/index.php I read somewhere that it's up to me to safeguard the admin site, so regular users wouldn't be able to access it and change things. I haven't yet decided how I'm going to do that. I also want to be able to allow different levels of admins. More on that when I get to it. :) Link to comment Share on other sites More sharing options...
yezhou Posted September 22, 2002 Share Posted September 22, 2002 Very nice summary. Thanks! And please keep it going. What's Alfred said is pretty much similar to what I've been through .... well, I'm not really though yet (got one working on my local server, but failed on a hosted server...) Link to comment Share on other sites More sharing options...
Bill Porter Posted September 22, 2002 Share Posted September 22, 2002 Alfred, Good documentation of your efforts. One thing that helped me was the installation documentation from oscdox.com - especially in regards to password protecting "admin." Which was simply password protecting the sub-dir. Best of luck to you and may you NEVER have to run up against the Fatal Error wall that I'm up against. Apparently no one knows how to fix it. Weeks of work down the tubes? http://www.oscommerce.com/forums/viewtopic.php?t=24015 Bill Link to comment Share on other sites More sharing options...
edschaum Posted September 23, 2002 Share Posted September 23, 2002 Hi Alfred, I recently tried setting up an installation on Windows and had to abandon it in favor of a unix install. Are you able to get email working? For example, if you sign up a new customer, does that process complete successfully and send out email? If so, I'd be interested to know how you got that to work. Ed Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2002 Share Posted September 23, 2002 Are you able to get email working? For example, if you sign up a new customer, does that process complete successfully and send out email? If so, I'd be interested to know how you got that to work. Actually, I can't even get the sign up to start... I hit the Create an Account link, and nothing happens (in N6.2). then I hit it again and I get "The connection was refused when attempting to contact localhost." Aaaargh! Does anyone have any idea what to do next? In the meantime, I'm going to figure out how to change the box colours and configure the pages... Perhaps I'll have a little blurb about that soon. This morning I spent some time figuring out Virtual Hosts on Apache. Once I have it all down pat, I'll post something about that as well. Soldier on! Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2002 Share Posted September 23, 2002 VERY big thanks to Bill Porter for pointing me to http://www.oscdox.com. They have a very good pdf (about 47 pages) that describes the installation and modification of osCommerce. They also have a number of different versions in other languages (Dutch and Spanish). I'm surprised there wasn't a link in the official osc site. When you go to the downloads all it says is there isn't any documentation! :x Oh well... Soldier on. Link to comment Share on other sites More sharing options...
burt Posted September 27, 2002 Share Posted September 27, 2002 A quick follow, I installed an offline version of a live site onto a clients computer for them. Win98SE PHPTriad installed 1. Start MySQL 2. Start Apache - Put the OsC files into c:apachehtdocs 3. Hit http://localhost/phpmyadmin - make a database - load up the oscommerce.sql file 4. Make the necessary changes to includesconfigure.php: define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be NULL for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be NULL for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('DIR_WS_CATALOG', '/'); // absolute path required define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname 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', DIR_WS_CATALOG . 'pub/'); define('DIR_FS_DOCUMENT_ROOT', ''); define('DIR_FS_CATALOG', '/apache/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', 'localhost'); // eg, localhost - should not be NULL for productive servers define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'database_name'); define('USE_PCONNECT', ''); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' and adminincludesconfigure.php define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be NULL for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://localhost'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL', 'false'); // secure webserver for administration tool define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', ''); // where the pages are located on the server define('DIR_WS_ADMIN', '/admin/'); // absolute path required define('DIR_FS_ADMIN', '/apache/htdocs/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/'); // absolute path required define('DIR_FS_CATALOG', '/apache/htdocs/'); // absolute path required 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', 'localhost'); // eg, localhost - should not be NULL for productive servers define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'database_name'); define('USE_PCONNECT', 'false'); // use persisstent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' Spark up your browser, and point it to: http://localhost (for your catalog) http://localhost/admin for your admin Once you have done your offline changes, save the database by using http://localhost/phpmyadmin then upload using online phpmyadmin. Sounds complicated, but this all took about 15 minutes... HTH Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.