billsey Posted January 7, 2007 Share Posted January 7, 2007 OK, here's my system: Windows 2003 server, PHP 5.2.0, MySQL 5.0.27, oscommerce 2.2ms2-060817. I've setup a database in MySQL with two users (wwg_cat with SELECT, INSERT, UPDATE, DELETE, CREATE and wwg_cat_user with SELECT, INSERT, UPDATE). I have made the appropriate changes to php.ini to turn on register_long_arrays and register_globals. I go through the install process with the WWW adress set to 'www.myurl.com/catalog/' and the Webserver root directory set to 'e:/web files/ecommerce/catalog/'. When the install completes I get the page that shows the two buttons Catalog and Administration Tool. They point to 'http://www.myurl.com/catalog/install/://www.myurl.com/catalog/index.php' and 'http://www.myurl.com/catalog/install/://www.myurl.com/catalog/admin/index.php' which is obviously a problem. When I try to open 'http://www.myurl.com/catalog/admin/index' I get and error like this: 1046 - No database selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] and when I try to open 'http://www.myurl.com/catalog/index.php' I get a redirect to the install script. Anyone have any ideas what I've got wrong? As another thought, is it possible to setup my configuration to have both php 4.x and php 5.x, so I can continue to use 5.x on the rest of my pages and drop back tp 4.x for this application? Link to comment Share on other sites More sharing options...
usernamenone Posted January 7, 2007 Share Posted January 7, 2007 Once you complete your install and before you click any links you need to access your oscommerce folder and delete or rename your install folder. You then need to change permissions on your configure.php files, there are 2 of them, one in catalog/includes and one in admin/includes/. Then let us know what happens. Link to comment Share on other sites More sharing options...
billsey Posted January 8, 2007 Author Share Posted January 8, 2007 Once you complete your install and before you click any links you need to access your oscommerce folder and delete or rename your install folder. You then need to change permissions on your configure.php files, there are 2 of them, one in catalog/includes and one in admin/includes/. OK, I did a rename of the install directory to install_orig, then set the two configure.php files to read only. I now get the 1046 error on both index.php and admin/index.php. What can I do next? Bill Link to comment Share on other sites More sharing options...
usernamenone Posted January 8, 2007 Share Posted January 8, 2007 You have a database error. Please read this and see if it helps http://www.oscommerce.info/kb/69 Link to comment Share on other sites More sharing options...
billsey Posted January 8, 2007 Author Share Posted January 8, 2007 Unfortunately, it looks worse than that. More things are missing from the configure.php files than just the database names. Here's the config file from catalog/includes/ <?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 (c) 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' ?> As you can see, it's pretty empty in there. I'm not positive, but I believe the empty areas are everything that should have been filled in by the install script. I'm going to have to figure out what's really wrong before I can do a fix, since just manually entering data into the config files will most likely just mask the problem. I'm running phpBB2 on another URL on this system, so I believe that PHP and MySQL are configured correctly. I need to figure out what's wrong with the osCommerce install side... It's worth noting that phpMyAdmin reports the database is setup with something like 40-50 fields entered, so the MySQL portion seems to work. :-( Link to comment Share on other sites More sharing options...
usernamenone Posted January 8, 2007 Share Posted January 8, 2007 when you do an oscommerce install it is pretty smart and will know most of the questions........Suggestion is that you leave these be until you come to the database location, user name and password. Once you have a failed install you will need to delete your database or remove all the tables and start all over again. Your configure.php file starting with line 9 define('HTTP_SERVER', 'http://www.you.com/'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://www.you.com/'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.you.com'); define('HTTPS_COOKIE_DOMAIN', 'www.you.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', '/x/x/x/x/x/xxx/xxx/catalog/'); /**************this is the path on your server, oscommerce knows how to find it so let it be when installing*****************/ define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'xxxxx.secureserver.net'); // eg, localhost - should not be empty for productive servers /**************************this is the path to your database, it is different from your domain****contact your host or look in your control panel for the answer****/ define('DB_SERVER_USERNAME', 'xxxxx'); define('DB_SERVER_PASSWORD', 'xxxx'); define('DB_DATABASE', 'xxxx'); define('USE_PCONNECT', 'true'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> Link to comment Share on other sites More sharing options...
usernamenone Posted January 8, 2007 Share Posted January 8, 2007 I have a stupid question........did you just upload your files or did you run the installer. I think you need to read your documentation...... :rolleyes: Link to comment Share on other sites More sharing options...
billsey Posted January 8, 2007 Author Share Posted January 8, 2007 No question is stupid, only making an assumption would be. :-) Yes, I've run the install, several times. I haven't removed the contents of the database between installs however. I'll do that now and see what happens. Link to comment Share on other sites More sharing options...
billsey Posted January 8, 2007 Author Share Posted January 8, 2007 OK, I dropped all the table in the database, renamed the install directory back to install and verified that both the internet guest account and NETWORK SERVICE had full permissions on the two configure.php files. I then ran the install. On the first step I accepted the defaults (both boxes checked) and continued. On the second step I set the database server to localhost, put in the username, password and database name, turned on persistant connections and said to use the database for session storage. The results page said the connection was successful. Step three says the database import was successful. On step four I put www.mydomain.com (the documentation infers I should leave the http:// off, is this correct?), left the root directory alone (/), entered .mydomain.com for the cookie domain and /catalog/ for the path (again, the docs show a leading period, is that correct?), and finally left the SSL off. On step five I left the defaults except to use the second name and password (the one without CREATE). The final page says the installation was successful, but has the funky links for both buttons. When I look at the configure.php file, it's as I showed above. :-( Link to comment Share on other sites More sharing options...
usernamenone Posted January 9, 2007 Share Posted January 9, 2007 before as in, your install did not write to your configure.php file? Will this help? http://www.oscommerce.info/docs/english/e_...stallation.html Link to comment Share on other sites More sharing options...
billsey Posted January 9, 2007 Author Share Posted January 9, 2007 Nope, that deals with what happens after the install has been completed, but before you launch the web page. Since the configure.php files are not being updated with the appropriate information during the install process, re-setting the permissions back to normal (in a Windows environment, the 777 vs. 644 or 444 doesn't work quite the same) wouldn't do anything to help. I imagine that if I didn't have the files writable by the right user I could have problems like this, but I would assume I'd get an error message at the first failed attempt to write. Should I have full read/write permissions set for some user other than the ones I have listed above? Link to comment Share on other sites More sharing options...
usernamenone Posted January 9, 2007 Share Posted January 9, 2007 Are you on a local host or a hosted account? http://en.wikipedia.org/wiki/File_system_permissions Link to comment Share on other sites More sharing options...
billsey Posted January 9, 2007 Author Share Posted January 9, 2007 I'm on a local host. It's a Quad Xeon machine running Windows Server 2003. I'm hosting a half dozen or more web sites, none of which are complex. I recently added the MySQL and PHP support in, in anticipation of having customers who would want it, and verified the functionality by installing phpMyAdmin and phpBB2. I've got a potential customer who wishes to run an eCommerce site, and after looking over the various offerings, thought that osCommerce would be the best choice for his needs and budget. If I can't get this figured out soon, I'm going to try and install both PHP 5.2 and PHP 4.4 on the system, and try again using 4.4 for his application. I don't think that's really the problem though, since so many people seem to have it running with PHP 5. I'm leaning toward the problem being a permissions issue, with me needing to configure for a different user than I'm trying now. The Wikipedia article doesn't help much. I understand how permissions work on UNIX/Linux as well as on Windows. I'm working on the assumption that either NETWORK SERVICE or IUSR_SERVER is being used by the PHP script to access both the database and writing the configure.php files. It's possible that it's using a different account though. If anyone out there has this running on their 2003 server, which accounts did you have to provide full access to to get the install to work? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.